Models API
Discover available models and their capabilities, pricing, and limits at runtime.
Yunxin's catalog is dynamic — models are configured at runtime and synced from providers. Always discover what's live (and what each model supports) through this API rather than hardcoding model lists.
List models
GET /v1/modelsQuery parameters
| Parameter | Type | Description |
|---|---|---|
provider | string | Filter by provider slug (e.g. openai, anthropic). |
type | string | Filter by model type (e.g. chat, embedding, image_generation). |
capability | string | Filter by capability (e.g. vision, thinking, function_calling). |
show_deprecated | boolean | Include deprecated models. Default false. |
include_yaml | boolean | Include models defined in static config. Default true. |
format | string | Response shape: openai (default) or anthropic / messages / claude. |
Passing format=anthropic (or sending an anthropic-version header) returns the catalog in Anthropic's
model-list shape, so the Anthropic SDK's models.list() works against Yunxin too.
Response (OpenAI shape)
{
"object": "list",
"data": [
{
"id": "provider/model-id",
"object": "model",
"created": 1709251200,
"owned_by": "provider",
"root": "model-id",
"display_name": "Model Name",
"description": "Short description.",
"developer": "openai",
"type": "chat",
"capabilities": ["streaming", "vision", "function_calling", "thinking"],
"context_length": 128000,
"max_output_tokens": 16384,
"pricing": {
"input": 2.5,
"output": 10.0,
"request": 0.0,
"thinking": 0.0,
"cache_read": 1.25,
"cache_write": 0.0
},
"supports": {
"streaming": true,
"functions": true,
"vision": true,
"thinking": false,
"json_mode": true
},
"reasoning_type": "none",
"min_tier": "free",
"deprecated": false,
"suspended": false,
"source": "database"
}
]
}All pricing.* values are in credits per 1,000,000 tokens (1 credit = $0.001). request is a
per-request price where applicable. See Pricing.
Key fields
| Field | Description |
|---|---|
id | Model identifier, addressable as provider/model-id. |
owned_by / developer | Serving provider / originating model family. |
type | Model type (see below). |
capabilities | Capability tags — the authoritative feature list for the model. |
context_length / max_output_tokens | Context window and max generated tokens. |
pricing | Per-1M-token prices in credits (input, output, cache_read, cache_write, thinking, request). |
supports | Quick booleans: streaming, functions, vision, thinking, json_mode. |
reasoning_type | How the model exposes reasoning (none, thinking_budget, reasoning_effort_*, …). See Reasoning. |
min_tier | Minimum account tier: free, basic, fellow, pro, or enterprise. |
deprecated / suspended | Lifecycle flags. |
Get a model
GET /v1/models/{model_id}Returns the full record for a single model.
Examples
# List every model id
for model in client.models.list().data:
print(model.id)# Only Anthropic models that support thinking
curl "https://api.yuhuanstudio.com/v1/models?provider=anthropic&capability=thinking" \
-H "Authorization: Bearer $YUNXIN_API_KEY"Model types
| Type | Description |
|---|---|
chat | Text generation / chat |
embedding | Text embeddings |
image_generation | Image creation |
audio_speech | Text-to-speech |
audio_transcription | Speech-to-text |
video_generation | Video creation |
music_generation | Music creation |
3d_generation | 3D object creation |
realtime | Realtime audio/text |
Runtime registry
Models are synced from configured providers and approved before they appear here; additional models can be defined in static config for custom deployments and pricing overrides. Because the catalog is runtime-driven, querying this API is always more accurate than any hardcoded list — including in this documentation.
How is this guide?