codai Models API
Discovery of what the calling key can address. `/v1/models` is OpenAI-compatible and adds a `codai` object per entry with routing and capability flags that editors (VS Code, Cline, Cursor) use to drive their UI.
Discovery of what the calling key can address. `/v1/models` is OpenAI-compatible and adds a `codai` object per entry with routing and capability flags that editors (VS Code, Cline, Cursor) use to drive their UI.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/codai-ro:codai-ro-models-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Codai Ro Models API
version: '1'
description: 'Operations tagged Models across 2 of this provider''s published API definitions: codai-ro-gateway-openapi.json, codai-ro-gateway-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://ai.codai.ro
description: Production
security:
- bearerAuth: []
tags:
- name: Models
description: 'Discovery of what the calling key can address. `/v1/models` is OpenAI-compatible and adds a `codai` object per
entry with routing and capability flags that editors (VS Code, Cline, Cursor) use to drive their UI.'
paths:
/v1/models:
get:
operationId: listModels
tags:
- Models
summary: List addressable models
description: 'OpenAI-compatible model list, filtered to what the calling key can actually address using the SAME predicate
the request path enforces (a tier that allows `codai` also allows `codai-fast` etc.). Hidden internal aliases
are omitted unless the key''s allow-list names them explicitly; keys without an allow-list see the full public
catalog. Embedding models are included with `codai.type: embedding` and are usable only on `/v1/embeddings`.
Each entry adds a non-OpenAI `codai` object (`kind`, `type`, `routesTo`, `capabilities`) that clients may
ignore. `created` is always `0`; `owned_by` is `codai` for aliases and `codai-upstream` for concrete models.
Authentication is required so the list can be filtered per key.'
parameters:
- $ref: '#/components/parameters/RequestId'
responses:
'200':
description: The models this key may address.
content:
application/json:
schema:
$ref: '#/components/schemas/CoreModelList'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
servers:
- url: https://ai.codai.ro
description: Production
components:
schemas:
CoreModelPricing:
type: object
title: Model pricing
description: List price in USD per million tokens, so a client can show a per-turn cost and a pre-turn estimate from the token counts it already has. For an alias the top-level numbers are the FIRST route's price (what the cascade tries first); `by_route` prices every route so the response header `x-codai-routed-to` can be priced exactly. Absent on embedding entries.
required:
- input_usd_per_mtok
- output_usd_per_mtok
- cached_input_usd_per_mtok
- cache_write_usd_per_mtok
- exact
properties:
input_usd_per_mtok:
type: number
output_usd_per_mtok:
type: number
cached_input_usd_per_mtok:
type: number
description: Prompt-cache read rate (Anthropic `cache_read_input_tokens`, OpenAI `cached_tokens`).
cache_write_usd_per_mtok:
type: number
description: Prompt-cache write rate (5-minute ephemeral).
exact:
type: boolean
description: '`false` when the model has no dedicated row and bills at the conservative fallback rate.'
by_route:
type: object
additionalProperties:
$ref: '#/components/schemas/CoreModelPricing'
description: Alias entries only — price per concrete route id.
CoreModelCapabilities:
type: object
title: Model capabilities
required:
- tools
- vision
- streaming
- maxInputTokens
- maxOutputTokens
properties:
tools:
type: boolean
description: Supports function-calling style tools.
vision:
type: boolean
description: Accepts `image_url` content parts.
streaming:
type: boolean
description: Server-sent events streaming supported end to end.
maxInputTokens:
type: integer
description: Conservative maximum input context window in tokens.
maxOutputTokens:
type: integer
description: Maximum output tokens per response (`0` for embedding models).
CoreModelList:
type: object
title: Model list
required:
- object
- data
properties:
object:
type: string
enum:
- list
data:
type: array
items:
$ref: '#/components/schemas/CoreModel'
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- message
- type
- code
properties:
message:
type: string
description: Human-readable, provider names redacted.
type:
type: string
enum:
- invalid_request_error
- subscription_required
- rate_limit_error
- upstream_error
- server_error
code:
type: string
enum:
- bad_request
- invalid_api_key
- subscription_inactive
- forbidden
- not_found
- payload_too_large
- rate_limit_exceeded
- quota_exceeded
- upstream_error
- internal_error
- not_a_member
- lease_held
- seq_conflict
- host_offline
- host_timeout
- rules_refused
- search_unavailable
- task_not_confirmable
- slug_taken
- project_has_environments
- already_has_env
- not_enrollable
- not_byo
- invalid_transition
- already_member
- vm_per_dev_single_member
- last_owner
- insufficient_balance
- key_scope_forbidden
- assets_unavailable
- asset_not_found
- too_many_renders
- renders_unavailable
- timeline_too_long
- not_a_timeline
- invalid_cursor
- templates_unavailable
- url_blocked
- invalid_tokens
- unsupported_media
- kind_mismatch
- node_not_found
- invalid_pick
- duplicate_key
- unknown_var
- invalid_var_value
- unsupported_kind
- too_long
- stale
- not_supported_for_kind
- unsupported_format
- too_large
- not_implemented
- version_conflict
- settings_unavailable
- ai_label_required
- sandbox_concurrency_limit
- sandbox_busy
- sandbox_daily_limit
- invalid_ttl
- workspace_too_large
- sandbox_paused_limit
- sandbox_capacity
details:
description: Present on `bad_request` (flattened Zod field errors), `invalid_tokens` (`issues`) and `rules_refused` (`tool`, `rule_id`, `decision`). Other codes never forward details over HTTP.
type: object
additionalProperties: true
examples:
- error:
message: Invalid or missing API key.
type: invalid_request_error
code: invalid_api_key
CoreModel:
type: object
title: Model
required:
- id
- object
- created
- owned_by
- codai
properties:
id:
type: string
examples:
- codai
- codai-fast
- codai-embed
object:
type: string
enum:
- model
created:
type: integer
description: Always `0` — codai does not track model creation time.
enum:
- 0
owned_by:
type: string
enum:
- codai
- codai-upstream
description: '`codai` for aliases, `codai-upstream` for concrete upstream models.'
codai:
type: object
description: Non-OpenAI extension with routing and capability flags.
required:
- kind
- type
- capabilities
properties:
kind:
type: string
enum:
- alias
- concrete
type:
type: string
enum:
- chat
- embedding
description: Surface the model serves; `embedding` entries are usable only on `/v1/embeddings`.
routesTo:
type: array
items:
type: string
description: For aliases, the concrete upstream models in its routing chain. Absent on concrete entries.
examples:
- - claude-fable-5-1
- gpt-5
capabilities:
$ref: '#/components/schemas/CoreModelCapabilities'
pricing:
$ref: '#/components/schemas/CoreModelPricing'
responses:
Unauthorized:
description: Missing, malformed, revoked or paused API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PaymentRequired:
description: The subscription behind this key is inactive.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
RequestId:
name: x-request-id
in: header
required: false
description: Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row.
schema:
type: string
maxLength: 128
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: codai_…
description: A codai API key (`codai_` prefix). Ephemeral tokens from `POST /v1/tokens` are accepted only by the media surfaces matching their scope (`/v1/realtime`, `/v1/audio/*`, `/v1/embeddings`).
x-refined-from:
- codai-ro-gateway-openapi.json
- codai-ro-gateway-openapi.yml