OttoPort
Documentation

API reference

One OpenAI-compatible API for chat, image, and video generation across every provider. Point any OpenAI SDK at the base URL, swap the model string, and ship.

https://ottoport.ai/api/v1
Open playground
Overview

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.
Get started

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 openai
curl 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.

Get started

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-xxxxxxxxxxxxxxxxxxxxxxxx
A key is shown only once at creation. Store it in a secret manager or an environment variable such as OTTOPORT_API_KEY.
API reference

Chat completions

POST/v1/chat/completions

OpenAI-compatible chat across GPT, Claude, and Gemini. Streaming, tool use, and function calling work unchanged — OttoPort translates between the OpenAI schema and each provider.

ParameterTypeDescription
modelrequiredstringAny chat model id, e.g. claude-sonnet-5.
messagesrequiredarrayConversation as role/content objects.
streamoptionalbooleanStream tokens as server-sent events. Defaults to false.
temperatureoptionalnumberSampling temperature, 0–2.
max_tokensoptionalintegerCap on generated tokens.
top_poptionalnumberNucleus sampling cutoff.
stopoptionalstring | 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 }
}
API reference

Image generation

POST/v1/images/generations

Generate 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.

ParameterTypeDescription
modelrequiredstringImage model id, e.g. nano-banana-pro.
promptrequiredstringText description of the image.
sizeoptionalstringe.g. 1024x1024 or 16:9.
noptionalintegerNumber of images to return.
seedoptionalintegerSeed for reproducible output.
image_urloptionalstringSource 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 }
}
API reference

Video generation

POST/v1/videos/generations

Generate 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).

ParameterTypeDescription
modelrequiredstringVideo model id, e.g. kling-3.0.
promptrequiredstringText description of the shot.
image_urloptionalstringFirst frame for image-to-video.
durationoptionalintegerClip length in seconds.
aspect_ratiooptionalstringe.g. 16:9, 9:16.
seedoptionalintegerSeed 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 }
}
API reference

List models

GET/v1/models

Returns the catalog in OpenAI list format, enriched with modality, provider, and pricing. Filter by modality with the modality query parameter.

ParameterTypeDescription
modalityoptionalstringFilter 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 }
    }
  ]
}
Reference

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 IDModalityProviderPricing
gpt-5.6-solchatopenai$5 / $30 per 1M
gpt-5.6-terrachatopenai$2.5 / $15 per 1M
gpt-5.6-lunachatopenai$1 / $6 per 1M
gpt-5.5chatopenai$5 / $30 per 1M
gpt-5.4chatopenai$2.5 / $15 per 1M
gpt-5.4-minichatopenai$0.75 / $4.5 per 1M
gpt-5.4-nanochatopenai$0.2 / $1.25 per 1M
claude-fable-5chatanthropic$10 / $50 per 1M
claude-opus-4.8chatanthropic$5 / $25 per 1M
claude-sonnet-5chatanthropic$2 / $10 per 1M
claude-haiku-4.5chatanthropic$1 / $5 per 1M
gemini-3.5-flashchatgoogle$1.5 / $9 per 1M
gemini-3.1-pro-previewchatgoogle$2.25 / $18 per 1M
gemini-3.1-flash-litechatgoogle$0.25 / $1.5 per 1M
kimi-k3chatmoonshotai$3 / $15 per 1M
kimi-k2.7-codechatmoonshotai$0.72 / $3.5 per 1M
kimi-k2.6chatmoonshotai$0.66 / $3.41 per 1M
kimi-k2.5chatmoonshotai$0.375 / $2.025 per 1M
kimi-k2-thinkingchatmoonshotai$0.6 / $2.5 per 1M
kimi-k2-0905chatmoonshotai$0.6 / $2.5 per 1M
kimi-k2chatmoonshotai$0.57 / $2.3 per 1M
glm-5.2chatz-ai$1.4 / $4.4 per 1M
grok-4.5chatx-ai$2 / $6 per 1M
gpt-image-2imageopenai
gpt-image-1.5imageopenai
gpt-image-1-miniimageopenai
nano-banana-2imagegoogle$0.134 / image
nano-banana-proimagegoogle$0.24 / image
nano-banana-liteimagegoogle$0.039 / image
midjourney-v7imagemidjourney$0.08 / image
midjourney-v8.1imagemidjourney$0.086 / image
veo-3.1videogoogle$0.4 / sec
veo-3.1-fastvideogoogle$0.1 / sec
veo-3.1-litevideogoogle$0.05 / sec
gemini-omni-flashvideogoogle$0.1 / sec
kling-3.0videokuaishou$0.084 / sec
kling-3.0-turbovideokuaishou$0.095 / sec
seedance-2.0videobytedance$0.112 / sec
seedance-2.0-fastvideobytedance$0.09 / sec
seedance-2.0-minivideobytedance$0.056 / sec
hailuo-2.3videominimax$0.12 / sec
hailuo-2.3-fastvideominimax$0.09 / sec
hailuo-02videominimax$0.1 / sec
wan2.7-t2vvideoalibaba$0.12 / sec
wan2.7-i2vvideoalibaba$0.12 / sec
wan2.6-t2vvideoalibaba$0.1 / sec
wan2.6-i2vvideoalibaba$0.1 / sec
wan2.6-i2v-flashvideoalibaba$0.075 / sec
wan2.5-t2vvideoalibaba$0.085 / sec
wan2.5-i2vvideoalibaba$0.085 / sec
seedream-5.0imagebytedance$0.075 / image
seedream-5.0-liteimagebytedance$0.035 / image
gpt-4o-mini-ttsttsopenai
eleven-v3ttselevenlabs
eleven-turbo-2.5ttselevenlabs
gemini-2.5-flash-ttsttsgoogle
suno-v5musicsuno
lyria-2musicgoogle
seed-musicmusicbytedance
Reference

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"
  }
}
StatusCodeWhen
400invalid_requestMissing or malformed body (e.g. no model or messages).
401missing_api_keyNo Authorization: Bearer header was sent.
401invalid_api_keyKey is malformed or not recognized.
402insufficient_creditsThe account's credit balance is exhausted.
404model_not_foundThe requested model id is not in the catalog.
429rate_limitedToo many requests — back off and retry.
502upstream_errorThe upstream provider failed or timed out.
Reference

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.

Reference

SDKs & tools