The unified
AI endpoint
OpenAI-compatible, every model as provider/model, and the cost of the call on the response. Switching model is one word.
One endpoint for every model. https://api.squiid.io/v1/ai is OpenAI-compatible, so the OpenAI SDK in any language works against it with the base URL changed. Models are named provider/model: anthropic/claude-sonnet-5, openai/gpt-5, google/gemini-flash. Streaming, tools, JSON mode and vision pass through. Coming from OpenRouter? Only the base URL changes.
Streaming, and switching model
curl https://api.squiid.io/v1/ai/chat/completions \
-H "Authorization: Bearer $SQUIID_API_KEY" \
-d '{ "model": "openai/gpt-5", "stream": true, "messages": [...] }'
const stream = await ai.chat.completions.create({
model: "openai/gpt-5", // or google/gemini-flash, anthropic/claude-sonnet-5 …
stream: true,
messages,
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
stream = ai.chat.completions.create(
model="openai/gpt-5", # or google/gemini-flash, anthropic/claude-sonnet-5 …
stream=True,
messages=messages,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
What it costs
Each model is billed at its provider's list price against your prepaid balance, with no Squiid margin on the call. The cost of the request comes back as x-sq-cost, and the balance after it as x-sq-balance. On a stream there are no trailing headers to read, so the last SSE line is a comment every parser ignores:
: sq-cost=0.004120 sq-balance=142.18
You can also read the same numbers back later with GET /v1/requests/:id, using the x-sq-request-id from the response. Headers and errors lists all of them.
When to use passthrough instead
The unified endpoint speaks one request shape, which is what makes model switching a one-word change. When you want a provider's own API — Anthropic's Messages API with its own parameters, say, or anything the OpenAI shape does not express — call the provider directly through raw passthrough. Same key, same host, the provider's own path.
Every model,
one endpoint.
One key, provider list prices, and the cost of each call on the response.