Introduction
OttoPort is a unified gateway that routes LLM, image, and video generation through a single OpenAI-compatible surface. Every request is authenticated with one key and billed against one credit balance — no per-provider accounts to juggle.
- Chat is synchronous. Responses stream token-by-token, exactly like the OpenAI API.
- Image & video wait on the queue. The gateway holds the request until the provider finishes and returns the result URL.
- One catalog. Discover every model, its provider, and its price at
GET /v1/models.
Quickstart
Install the OpenAI SDK, set base_url to the OttoPort gateway, and use your op- key as the API key. Your first chat request is three lines away.
pip install openai # or: npm install openaicurl https://ottoport.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OTTOPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [{ "role": "user", "content": "Hello!" }]
}'The same client works for images and video — switch the model id and call images.generate or the videos endpoint. See the sections below.
Authentication
Every request must include an Authorization header with your secret key. Keys are prefixed with op- and are created in API Keys. Keep them server-side — never ship a key in client code.
Authorization: Bearer op-xxxxxxxxxxxxxxxxxxxxxxxxOTTOPORT_API_KEY.Chat completions
/v1/chat/completionsOpenAI-compatible chat across GPT, Claude, and Gemini. Streaming, tool use, and function calling work unchanged — OttoPort translates between the OpenAI schema and each provider.
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | Any chat model id, e.g. claude-sonnet-5. |
messagesrequired | array | Conversation as role/content objects. |
streamoptional | boolean | Stream tokens as server-sent events. Defaults to false. |
temperatureoptional | number | Sampling temperature, 0–2. |
max_tokensoptional | integer | Cap on generated tokens. |
top_poptional | number | Nucleus sampling cutoff. |
stopoptional | string | string[] | Sequence(s) that halt generation. |
curl https://ottoport.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OTTOPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4",
"messages": [
{ "role": "system", "content": "You are concise." },
{ "role": "user", "content": "Explain MCP in one line." }
],
"temperature": 0.7,
"stream": false
}'Response
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "gpt-5.4",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 24, "completion_tokens": 18, "total_tokens": 42 }
}Image generation
/v1/images/generationsGenerate or edit images with GPT Image and Nano Banana models. Pass image_url to run image-to-image edits. The gateway waits for the provider and returns hosted URLs.
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | Image model id, e.g. nano-banana-pro. |
promptrequired | string | Text description of the image. |
sizeoptional | string | e.g. 1024x1024 or 16:9. |
noptional | integer | Number of images to return. |
seedoptional | integer | Seed for reproducible output. |
image_urloptional | string | Source image for edits / image-to-image. |
curl https://ottoport.ai/api/v1/images/generations \
-H "Authorization: Bearer $OTTOPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-pro",
"prompt": "a chrome torus on a black background, studio light",
"size": "1024x1024",
"n": 1
}'Response
{
"created": 1736200000,
"model": "nano-banana-pro",
"data": [{ "url": "https://cdn.ottoport.ai/img/9f2a...png" }],
"usage": { "cost": 0.24 }
}Video generation
/v1/videos/generationsGenerate video with Veo, Kling, and Seedance. OttoPort submits the job, waits on the provider queue, and returns a job object whose status is completed with the result URL (or failed with an error).
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | Video model id, e.g. kling-3.0. |
promptrequired | string | Text description of the shot. |
image_urloptional | string | First frame for image-to-video. |
durationoptional | integer | Clip length in seconds. |
aspect_ratiooptional | string | e.g. 16:9, 9:16. |
seedoptional | integer | Seed for reproducible output. |
curl https://ottoport.ai/api/v1/videos/generations \
-H "Authorization: Bearer $OTTOPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0",
"prompt": "cinematic product reveal, slow dolly, black background",
"duration": 5,
"aspect_ratio": "16:9"
}'Response
{
"id": "vid_7c1e...",
"model": "kling-3.0",
"status": "completed",
"created": 1736200000,
"data": [{ "url": "https://cdn.ottoport.ai/vid/7c1e....mp4" }],
"usage": { "cost": 0.42 }
}List models
/v1/modelsReturns the catalog in OpenAI list format, enriched with modality, provider, and pricing. Filter by modality with the modality query parameter.
| Parameter | Type | Description |
|---|---|---|
modalityoptional | string | Filter to chat, image, or video. |
curl "https://ottoport.ai/api/v1/models?modality=video" \
-H "Authorization: Bearer $OTTOPORT_API_KEY"Response
{
"object": "list",
"data": [
{
"id": "kling-3.0",
"object": "model",
"owned_by": "kuaishou",
"modality": "video",
"display_name": "Kling 3.0",
"description": "...",
"pricing": { "perSecond": 0.084 }
}
]
}Model catalog
Every model available today, straight from the gateway registry. Chat is priced per 1M tokens (input / output); image per image; video per second.
| Model ID | Modality | Provider | Pricing |
|---|---|---|---|
gpt-5.6-sol | chat | openai | $5 / $30 per 1M |
gpt-5.6-terra | chat | openai | $2.5 / $15 per 1M |
gpt-5.6-luna | chat | openai | $1 / $6 per 1M |
gpt-5.5 | chat | openai | $5 / $30 per 1M |
gpt-5.4 | chat | openai | $2.5 / $15 per 1M |
gpt-5.4-mini | chat | openai | $0.75 / $4.5 per 1M |
gpt-5.4-nano | chat | openai | $0.2 / $1.25 per 1M |
claude-fable-5 | chat | anthropic | $10 / $50 per 1M |
claude-opus-4.8 | chat | anthropic | $5 / $25 per 1M |
claude-sonnet-5 | chat | anthropic | $2 / $10 per 1M |
claude-haiku-4.5 | chat | anthropic | $1 / $5 per 1M |
gemini-3.5-flash | chat | $1.5 / $9 per 1M | |
gemini-3.1-pro-preview | chat | $2.25 / $18 per 1M | |
gemini-3.1-flash-lite | chat | $0.25 / $1.5 per 1M | |
kimi-k3 | chat | moonshotai | $3 / $15 per 1M |
kimi-k2.7-code | chat | moonshotai | $0.72 / $3.5 per 1M |
kimi-k2.6 | chat | moonshotai | $0.66 / $3.41 per 1M |
kimi-k2.5 | chat | moonshotai | $0.375 / $2.025 per 1M |
kimi-k2-thinking | chat | moonshotai | $0.6 / $2.5 per 1M |
kimi-k2-0905 | chat | moonshotai | $0.6 / $2.5 per 1M |
kimi-k2 | chat | moonshotai | $0.57 / $2.3 per 1M |
glm-5.2 | chat | z-ai | $1.4 / $4.4 per 1M |
grok-4.5 | chat | x-ai | $2 / $6 per 1M |
gpt-image-2 | image | openai | — |
gpt-image-1.5 | image | openai | — |
gpt-image-1-mini | image | openai | — |
nano-banana-2 | image | $0.134 / image | |
nano-banana-pro | image | $0.24 / image | |
nano-banana-lite | image | $0.039 / image | |
midjourney-v7 | image | midjourney | $0.08 / image |
midjourney-v8.1 | image | midjourney | $0.086 / image |
veo-3.1 | video | $0.4 / sec | |
veo-3.1-fast | video | $0.1 / sec | |
veo-3.1-lite | video | $0.05 / sec | |
gemini-omni-flash | video | $0.1 / sec | |
kling-3.0 | video | kuaishou | $0.084 / sec |
kling-3.0-turbo | video | kuaishou | $0.095 / sec |
seedance-2.0 | video | bytedance | $0.112 / sec |
seedance-2.0-fast | video | bytedance | $0.09 / sec |
seedance-2.0-mini | video | bytedance | $0.056 / sec |
hailuo-2.3 | video | minimax | $0.12 / sec |
hailuo-2.3-fast | video | minimax | $0.09 / sec |
hailuo-02 | video | minimax | $0.1 / sec |
wan2.7-t2v | video | alibaba | $0.12 / sec |
wan2.7-i2v | video | alibaba | $0.12 / sec |
wan2.6-t2v | video | alibaba | $0.1 / sec |
wan2.6-i2v | video | alibaba | $0.1 / sec |
wan2.6-i2v-flash | video | alibaba | $0.075 / sec |
wan2.5-t2v | video | alibaba | $0.085 / sec |
wan2.5-i2v | video | alibaba | $0.085 / sec |
seedream-5.0 | image | bytedance | $0.075 / image |
seedream-5.0-lite | image | bytedance | $0.035 / image |
gpt-4o-mini-tts | tts | openai | — |
eleven-v3 | tts | elevenlabs | — |
eleven-turbo-2.5 | tts | elevenlabs | — |
gemini-2.5-flash-tts | tts | — | |
suno-v5 | music | suno | — |
lyria-2 | music | — | |
seed-music | music | bytedance | — |
Errors
Errors use standard HTTP status codes and an OpenAI-style error object with a stable code. The type mirrors code for SDK compatibility.
{
"error": {
"message": "`model` and `messages` are required",
"type": "invalid_request",
"code": "invalid_request"
}
}| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Missing or malformed body (e.g. no model or messages). |
| 401 | missing_api_key | No Authorization: Bearer header was sent. |
| 401 | invalid_api_key | Key is malformed or not recognized. |
| 402 | insufficient_credits | The account's credit balance is exhausted. |
| 404 | model_not_found | The requested model id is not in the catalog. |
| 429 | rate_limited | Too many requests — back off and retry. |
| 502 | upstream_error | The upstream provider failed or timed out. |
Rate limits
Limits scale with your spend tier. When you exceed them the gateway returns 429 rate_limited — back off with exponential retry and honor any Retry-After header. Need higher throughput or dedicated capacity? Talk to us.
SDKs & tools
The gateway is the product; every other surface is a thin client over it. Use the one that fits your workflow — they all share the same model ids and one key.
OpenAI SDKs
Point base_url at the gateway from the Python or Node OpenAI SDK.
Quickstart →MCP & CLI
Drive OttoPort from agents, terminals, and CI with the MCP server and CLI.
MCP & CLI →Playground
Try any model interactively before wiring it into your app.
Open playground →API Keys
Create, rotate, and revoke your op- keys.
Manage keys →