LLM Gatewaydocs

Models

The model catalog is served by the gateway in the OpenAI list shape with additional fields for pricing, discounts, capabilities and provider coverage.

GET/v1/modelsfiltered by your key's allowed_models / allowed_modalities
GET/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

bash
curl "https://api.smartapihub.com/v1/models" -H "Authorization: Bearer $LLM_API_KEY"
json
{
  "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

FieldTypeDescription
idstringvendor/name — pass this as model in requests.
owned_bystringThe vendor (author) of the model.
display_namestringHuman-readable name for UIs.
modalitystringPrimary output: text, image, audio, video, music, embedding. Decides which endpoint accepts the model.
input_modalities / output_modalitiesstring[]What the model accepts and produces (e.g. ["text","image"] for vision models).
context_windowint | nullMaximum total tokens (prompt + completion).
max_output_tokensint | nullMaximum completion tokens.
pricingobjectCustomer list price in micro-USD, with currency: "USD" and unit: "micro". See below.
discount_bpsintDiscount applied to your organization/key for this model, in basis points (100 bps = 1 %).
capabilitiesobjectBoolean flags such as streaming, tools, vision, json_mode. Only capabilities supported by at least one enabled provider are true.
supported_parametersstring[]Request parameters that will be honoured; others are ignored or rejected.
providersintNumber 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:

KeyUnitApplies to
input_per_mtokmicro-USD per 1,000,000 input tokenstext, embedding
output_per_mtokmicro-USD per 1,000,000 output tokenstext
cached_input_per_mtokmicro-USD per 1,000,000 cached input tokenstext (when the provider reports cached tokens)
per_requestmicro-USD per requestany
per_imagemicro-USD per generated imageimage
per_audio_secondmicro-USD per second of audiospeech, transcription
per_video_second / per_music_secondmicro-USD per second of generated mediavideo, music
per_charactermicro-USD per input charactersome 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.

typescript
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

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