Models
The model catalog is served by the gateway in the OpenAI list shape with additional fields for pricing, discounts, capabilities and provider coverage.
/v1/modelsfiltered by your key's allowed_models / allowed_modalities/v1/models/{id}Model ids
Model ids are always vendor/name, lower-case, e.g. openai/gpt-4o-mini, anthropic/claude-3-5-haiku, meta/llama-3.1-70b-instruct. The vendor is the model's author, not the provider that serves it: a Llama model may be routed to any of several hosting providers, and the one actually used is returned in the provider field and X-LLM-Provider header of each response.
List models
curl "https://api.smartapihub.com/v1/models" -H "Authorization: Bearer $LLM_API_KEY"{
"object": "list",
"data": [
{
"id": "openai/gpt-4o-mini",
"object": "model",
"created": 0,
"owned_by": "openai",
"display_name": "GPT-4o mini",
"modality": "text",
"input_modalities": ["text", "image"],
"output_modalities": ["text"],
"context_window": 128000,
"max_output_tokens": 16384,
"pricing": { "input_per_mtok": 150000, "output_per_mtok": 600000, "currency": "USD", "unit": "micro" },
"discount_bps": 0,
"capabilities": { "streaming": true, "tools": true, "vision": true },
"supported_parameters": ["temperature", "top_p", "max_tokens", "tools", "response_format", "seed"],
"providers": 2
}
]
}Fields
| Field | Type | Description |
|---|---|---|
id | string | vendor/name — pass this as model in requests. |
owned_by | string | The vendor (author) of the model. |
display_name | string | Human-readable name for UIs. |
modality | string | Primary output: text, image, audio, video, music, embedding. Decides which endpoint accepts the model. |
input_modalities / output_modalities | string[] | What the model accepts and produces (e.g. ["text","image"] for vision models). |
context_window | int | null | Maximum total tokens (prompt + completion). |
max_output_tokens | int | null | Maximum completion tokens. |
pricing | object | Customer list price in micro-USD, with currency: "USD" and unit: "micro". See below. |
discount_bps | int | Discount applied to your organization/key for this model, in basis points (100 bps = 1 %). |
capabilities | object | Boolean flags such as streaming, tools, vision, json_mode. Only capabilities supported by at least one enabled provider are true. |
supported_parameters | string[] | Request parameters that will be honoured; others are ignored or rejected. |
providers | int | Number of enabled providers that can serve this model — more providers means more fallback capacity. |
Pricing fields and how to convert
All prices are integers in micro-USD (1,000,000 micro-USD = $1.00). Keys depend on the modality:
| Key | Unit | Applies to |
|---|---|---|
input_per_mtok | micro-USD per 1,000,000 input tokens | text, embedding |
output_per_mtok | micro-USD per 1,000,000 output tokens | text |
cached_input_per_mtok | micro-USD per 1,000,000 cached input tokens | text (when the provider reports cached tokens) |
per_request | micro-USD per request | any |
per_image | micro-USD per generated image | image |
per_audio_second | micro-USD per second of audio | speech, transcription |
per_video_second / per_music_second | micro-USD per second of generated media | video, music |
per_character | micro-USD per input character | some speech models |
To convert to dollars divide by 1,000,000. input_per_mtok: 150000 is $0.15 per million tokens; a 2,000-token prompt costs 2000 × 150000 / 1_000_000 = 300 micro-USD = $0.0003.
const usd = (micro: number) => micro / 1_000_000;
const promptCostMicro = Math.round((promptTokens * pricing.input_per_mtok) / 1_000_000);The price shown is the list price for your organization. Your discount_bps is applied on top; the amount actually charged is returned per request in usage.x_llm_cost_micro. See Pricing for the full formula.
Get one model
curl "https://api.smartapihub.com/v1/models/openai%2Fgpt-4o-mini" -H "Authorization: Bearer $LLM_API_KEY"Returns a single model object (same shape as list items). The slash in the id may be sent literally or percent-encoded. Unknown or disabled ids return 404 model_not_found; ids outside your key's scope return 403 model_not_allowed.
created is 0 for catalog entries — the platform does not track vendor release dates. Use display_name and capabilities to present models in a UI.