AI Gateway: one endpoint, a choice of models
Chat completions, streaming, per-key controls, available models, and request rounding on one gateway.
The AI Gateway is SetCloud’s front door to language models: one endpoint for the available model catalog and your own eligible fine-tuned models, under one gateway key and credit balance.
Use the documented endpoints
The gateway supports the chat-completions and embeddings formats in the API reference. Other endpoints or optional SDK features are not implied.
curl https://setcloud.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-sc-YOUR_API_KEY" \
-d '{
"model": "nova-micro",
"messages": [
{"role": "user", "content": "Hello, world!"}
],
"max_tokens": 256
}'
The official OpenAI SDKs work as-is:
import openai
client = openai.OpenAI(
api_key="sk-sc-YOUR_API_KEY",
base_url="https://setcloud.com/v1",
)
response = client.chat.completions.create(
model="nova-micro",
messages=[{"role": "user", "content": "Hello, world!"}],
max_tokens=256,
)
print(response.choices[0].message.content)
Set "stream": true and you get server-sent events in the OpenAI chunk format — token by token, parsed by the same client code you’d use anywhere else. GET /v1/models lists every model your key can call.
The models
| model | API id | input /1M | output /1M |
|---|---|---|---|
| Loading current model prices… | |||
per 1M tokens · each nonzero request rounds up to cents ·
The table is live — the same numbers the gateway bills against your credits.
Pricing without a decoder ring
Requests use the selected model’s input and output rates, including any published long-context rate. Each nonzero request rounds up to a whole cent, with a $0.01 minimum. Short requests therefore may cost more than multiplying aggregate monthly tokens by the table rates.
Keys have no separate fee. Requests require available credits and budget. New accounts start with a $50 monthly spend budget; metering lag and in-flight requests mean it is not a hard bill ceiling. Auto-reload can fail or require bank verification. See spend limits.
Per-key controls
API keys (sk-sc-…) are minted in the dashboard under AI Gateway → API Keys; you can hold up to 25. A key can be scoped to specific models — choose an available model for each environment — and each key carries its own request and token rate limits, enforced at the gateway. Usage is tracked per key, so you can see which environment or feature is spending.
Your models, same endpoint
Fine-tuning runs through the same surface. Upload a CSV of prompt/response pairs, pick a base model, and the platform converts the data, runs the fine-tuning job, and deploys the result. The finished model gets a custom- model id that works everywhere a built-in model does — the playground, the API, GET /v1/models:
{ "model": "custom-support-tone-v2", "messages": [{"role": "user", "content": "..."}] }
Custom models are private to your account: only your keys can call them. Review and accept the fixed dataset-size training quote before starting. Successful training charges that quote once; custom model storage bills until deletion, and inference bills per request. See current prices.
Try it
Sign up, deposit credits ($50 minimum, shared with every other SetCloud product), and mint a key. Use the playground to try available models. It runs one selected model at a time, and inference uses credits.