Skip to content

Chat Completions

Use Chat Completions when your application already sends messages with role and content fields.

FieldValue
MethodPOST
Endpoint/chat/completions
Full URLhttps://supado.com/v1/chat/completions
AuthAuthorization: Bearer <SUPADO_API_KEY>

Common request fields:

FieldTypeNotes
modelstringUse a model available in your Supado account.
messagesarrayOpenAI-style chat messages.
temperaturenumberOptional. Support can depend on the model.
streambooleanOptional. Use true for SSE streaming if supported.
Terminal window
curl https://supado.com/v1/chat/completions \
-H "Authorization: Bearer $SUPADO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{ "role": "system", "content": "Answer in one short paragraph." },
{ "role": "user", "content": "What should I verify after changing API gateways?" }
]
}'
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.SUPADO_API_KEY,
baseURL: "https://supado.com/v1",
});
const completion = await client.chat.completions.create({
model: "gpt-4o-mini",
messages: [
{ role: "system", content: "Answer in one short paragraph." },
{ role: "user", content: "What should I verify after changing API gateways?" },
],
});
console.log(completion.choices[0]?.message?.content);

For a successful non-streaming request, read the assistant message from:

completion.choices[0]?.message?.content

For streaming requests, set stream: true and consume Server-Sent Events incrementally. See Streaming Responses for client behavior and proxy considerations.

Requests must use a messages array, a model available in Supado, and a JSON body. Preserve non-2xx response bodies in server-side logs without logging secrets.

Use the Errors page when a request reaches Supado but does not complete successfully.