Quickstart

Send a streamed chat completion with any OpenAI-compatible client.

1. Create an API key

Sign in to the console and create a key. The full key is shown once. Store it in a secret manager or an environment variable.

2. Export the key

shell
export INFERE_API_KEY="ik_live_..."

3. Send a request

request.sh
curl https://api.infere.dev/v1/chat/completions \  -H "Authorization: Bearer $INFERE_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "deepseek-v3",    "stream": true,    "messages": [{"role": "user", "content": "Explain KV caching in one line."}]  }'

Python and TypeScript work the same way. Install the official OpenAI SDK and point its base URL at infere.dev.

main.py
from openai import OpenAI
client = OpenAI(    base_url="https://api.infere.dev/v1",    api_key=os.environ["INFERE_API_KEY"],)
stream = client.chat.completions.create(    model="deepseek-v3",    stream=True,    messages=[{"role": "user", "content": "Explain KV caching in one line."}],)for chunk in stream:    print(chunk.choices[0].delta.content or "", end="")
main.ts
import OpenAI from "openai";
const client = new OpenAI({  baseURL: "https://api.infere.dev/v1",  apiKey: process.env.INFERE_API_KEY,});
const stream = await client.chat.completions.create({  model: "deepseek-v3",  stream: true,  messages: [{ role: "user", content: "Explain KV caching in one line." }],});
for await (const chunk of stream) {  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");}

Next steps

Check the model ids, the full request reference, and how errors are returned.

Never call the API from a browser or a mobile app with a secret key embedded. Call it from your server.