SDKs

Call Stevai from your own code with our own official SDKs— no third‑party AI library required. They're small, dependency‑light, and hardened: HTTPS is enforced, requests time out and retry, and your key is never written to logs or errors.

JavaScript / TypeScript

Install @stevai-ai/sdk (Node 18+, Bun, Deno, edge):

install
npm install @stevai-ai/sdk
chat
import { Stevai } from "@stevai-ai/sdk";

const stevai = new Stevai({ apiKey: process.env.STEVAI_API_KEY });

const res = await stevai.chat.completions.create({
  messages: [{ role: "user", content: "Draft a friendly reminder email." }],
});
console.log(res.choices[0].message.content);

Stream tokens as they're generated:

streaming
for await (const chunk of stevai.chat.completions.stream({
  messages: [{ role: "user", content: "Write a haiku about the sea." }],
})) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Python

Install the stevai package (Python 3.8+):

install
pip install stevai
chat
from stevai import Stevai

stevai = Stevai(api_key="sk_live_...")  # or set STEVAI_API_KEY

res = stevai.chat.completions.create(
    messages=[{"role": "user", "content": "Draft a friendly reminder email."}],
)
print(res["choices"][0]["message"]["content"])

Everything the API can do

Both SDKs cover the full surface:

  • Chat — completions + streaming, with tool/function calling, vision (image inputs), and structured output.
  • Images & videostevai.images.generate(...) and stevai.videos.generate(...).
  • Audiostevai.audio.speech(...) and stevai.audio.transcriptions.create(...).
  • Moderationstevai.moderations.create(...), powered by the Stevai compliance classifier.
  • Modelsstevai.models.list(). Stevai serves one model; you never pick one — the network sizes it to the task.

Image, video and audio generation return a clear “not available yet” until those models are live on the network — we never return a fabricated result. Chat is live today.