Quickstart
Supado provides an OpenAI-compatible API gateway at a single base URL:
https://supado.com/v1There are three common ways to integrate with Supado, depending on where you are starting:
| Approach | Best for |
|---|---|
| HTTP API | Full control, any language, no SDK dependency |
| OpenAI SDK | Existing OpenAI-style application code |
| Production rollout | Checking logs, usage, streaming, and error handling |
Create an API key in the Supado console before running the examples below. Store it in an environment variable:
export SUPADO_API_KEY="sk-supado-..."Do not put real API keys in browser JavaScript, mobile app bundles, screenshots, support tickets, or public Git repositories.
Using the Supado API
Section titled “Using the Supado API”Send a standard HTTP request to the OpenAI-compatible Chat Completions endpoint.
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": "user", "content": "Write one sentence explaining what an API gateway does." } ] }'If your account does not have access to the example model, use a model available in your Supado console.
Using the OpenAI SDK
Section titled “Using the OpenAI SDK”Point the OpenAI SDK at Supado by setting apiKey and baseURL.
TypeScript
Section titled “TypeScript”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: "user", content: "Write one sentence explaining what an API gateway does.", }, ],});
console.log(completion.choices[0]?.message?.content);Python
Section titled “Python”import osfrom openai import OpenAI
client = OpenAI( api_key=os.environ["SUPADO_API_KEY"], base_url="https://supado.com/v1",)
completion = client.chat.completions.create( model="gpt-4o-mini", messages=[ { "role": "user", "content": "Write one sentence explaining what an API gateway does.", } ],)
print(completion.choices[0].message.content)Migrating existing OpenAI code
Section titled “Migrating existing OpenAI code”Most existing OpenAI SDK integrations only need the Supado API key and base URL:
const client = new OpenAI({ apiKey: process.env.SUPADO_API_KEY, baseURL: "https://supado.com/v1",});Keep the first migration small. Change the gateway first, then test model changes, streaming behavior, retries, and optional parameters separately.
See Migrate from OpenAI for a focused migration walkthrough.
Moving to production
Section titled “Moving to production”Before sending production traffic, make sure your application:
- stores the API key server-side
- records status codes and sanitized response bodies for failed requests
- uses explicit timeout and retry behavior
- confirms Supado request logs for a known request
- handles streaming separately if you use
stream: true
For failed requests, see Errors and Troubleshooting.