POST /api/openrouter/models
Price: 20 credits
Get an OpenRouter model by alias
Resolve one model by its alias, its dated version alias, or its page URL; the author segment before the slash is required. A model sold in several billing variants returns one row per variant, distinguished by `id` and `variant`. The `endpoint` here is only the model's default provider — call /openrouter/models/endpoints for every provider serving it.
access-token string requiredtimeout integer — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)model string required — Model alias ('openai/gpt-4o'), dated version alias, or model page URL (examples: "openai/gpt-4o", "https://openrouter.ai/anthropic/claude-fable-5.1"; minLength: 1)@type string (default: "OpenrouterModel")id string requiredalias string requiredurl string requiredvariant string nullableversion_alias string nullablename string nullableshort_name string nullabledescription string nullableauthor string nullableauthor_display_name string nullableauthor_image string nullableauthor_flagship_modalities array (default: [])huggingface_id string nullablehuggingface_updated_at string nullablefamily string nullableversion_group_id string nullablecontext_length integer nullableinput_modalities array (default: [])output_modalities array (default: [])has_text_output boolean nullableis_hidden boolean nullableis_private boolean nullableis_trainable_text boolean nullableis_trainable_image boolean nullablesupports_reasoning boolean nullablereasoning_config object (default: {})features object (default: {})default_parameters object (default: {})default_order array (default: [])default_stops array (default: [])default_system string nullableinstruct_type string nullablequick_start_example_type string nullablerouter string nullablewarning_message string nullablepromotion_message string nullablerouting_error_message string nullablerequired_attestation_types array (default: [])display_required_attestation_types array (default: [])supported_tts_voices array (default: [])previews_by_modality object (default: {})thumbnail string nullablepreview_audio object (default: {})limit_rpm integer nullablelimit_rpd integer nullableknowledge_cutoff_at string nullablecreated_at string nullableupdated_at string nullableintelligence_index number nullablecoding_index number nullableagentic_index number nullabledefault_arena_elo number nullablearena_elo_by_category object (default: {})* numberendpoint object nullable@type string (default: "OpenrouterModelEndpoint")id string requiredname string nullablemodel_alias string nullablemodel_version_alias string nullableprovider object nullable@type string (default: "OpenrouterProvider")alias string requiredname string nullabledisplay_name string nullableadapter_name string nullablebase_url string nullableheadquarters string nullabledatacenters array (default: [])has_chat_completions boolean nullablehas_completions boolean nullableis_abortable boolean nullableis_moderation_required boolean nullableis_byok_enabled boolean nullablesends_client_ip boolean nullablepricing_strategy string nullablerequired_attestation_types array (default: [])status_page_url string nullableimage string nullabledata_policy object nullable@type string (default: "OpenrouterDataPolicy")is_training boolean nullableis_training_openrouter boolean nullableis_retaining_prompts boolean nullableretention_days integer nullablecan_publish boolean nullablerequires_user_ids boolean nullableterms_url string nullableprivacy_url string nullableprovider_name string nullableprovider_model_id string nullableprovider_region string nullableadapter_name string nullablevariant string nullablequantization string nullablecontext_length integer nullablemax_prompt_tokens integer nullablemax_completion_tokens integer nullablemax_tokens_per_image integer nullablecapacity_tpm integer nullablelimit_rpm integer nullablelimit_rpd integer nullablestatus integer nullableis_free boolean nullableis_hidden boolean nullableis_private boolean nullableis_byok boolean nullableis_byok_only boolean nullableis_deranked boolean nullableis_disabled boolean nullableis_hipaa_eligible boolean nullableis_pricing_unresolved boolean nullableis_moderation_required boolean nullablecan_abort boolean nullablesupports_reasoning boolean nullablesupports_tool_parameters boolean nullablesupports_multipart boolean nullablehas_chat_completions boolean nullablehas_completions boolean nullablesupported_parameters array (default: [])excluded_parameters array (default: [])allowed_passthrough_parameters array (default: [])supported_image_parameters object (default: {})supported_video_parameters object (default: {})features object (default: {})data_policy object nullable@type string (default: "OpenrouterDataPolicy")is_training boolean nullableis_training_openrouter boolean nullableis_retaining_prompts boolean nullableretention_days integer nullablecan_publish boolean nullablerequires_user_ids boolean nullableterms_url string nullableprivacy_url string nullablepricing object nullable@type string (default: "OpenrouterEndpointPricing")prompt number nullablecompletion number nullableinput_cache_read number nullableinput_cache_write number nullableimage number nullableimage_output number nullableimage_token number nullablerequest number nullableweb_search number nullableinternal_reasoning number nullablediscount number nullableaudio number nullableinput_audio_cache number nullableinput_cache_write_1h number nullableraw object (default: {})display_prices array (default: [])@type string (default: "OpenrouterPriceItem")kind string nullablelabel string nullableprice number nullableunit_label string nullabledisplay_multiplier number nullabletiers array (default: [])is_server_tool boolean nullableis_discount_exempt boolean nullableschedule_windows array (default: [])pricing_version_id string nullablestats object nullable@type string (default: "OpenrouterEndpointStats")latency_metric string nullablep50_latency number nullablep75_latency number nullablep90_latency number nullablep95_latency number nullablep99_latency number nullablep50_throughput number nullablep75_throughput number nullablep90_throughput number nullablep95_throughput number nullablep99_throughput number nullablelatency_request_count integer nullablethroughput_request_count integer nullablerequest_count integer nullablewindow_minutes integer nullableuptime array (default: [])@type string (default: "OpenrouterUptimePoint")date string requireduptime number nullablep50_latency number nullablep50_throughput number nullablecreated_at string nullabledeprecation_date string nullableusage object nullable@type string (default: "OpenrouterModelUsage")date string nullablevariant string nullablerequest_count integer nullableprompt_token_count integer nullablecompletion_token_count integer nullablereasoning_token_count integer nullablecached_token_count integer nullabletool_call_count integer nullabletool_call_error_request_count integer nullablemedia_prompt_count integer nullablemedia_completion_count integer nullableaudio_prompt_count integer nullablevideo_prompt_count integer nullableimage_output_request_count integer nullablevideo_output_seconds number nullablererank_document_count integer nullabletranscript_character_count integer nullablecategory_usage array (default: [])@type string (default: "OpenrouterCategoryUsage")category string requireddate string nullablerank integer nullablevolume number nullablerequest_count integer nullableprompt_token_count integer nullablecompletion_token_count integer nullable422 — The request body did not validate Check the fields against this schema. A URN with the wrong prefix is the most common cause.408 — The request ran past its time limit Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.412 — No model with that alias Retrying will not help: either the entity does not exist, or the input points at a different one.429 — Too many requests: a rate limit or a usage window is exhausted When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.500 — Something broke on our side Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.529 — Rate limit reached, or the endpoint is overloaded Wait at least 30 seconds, then retry.X-Error — Error message text (present only on error)X-Request-ID — Unique request identifierX-Execution-Time — Execution time in secondsX-Result-Count — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.X-Total-Available-Results — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.X-Warning — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.X-Retry-After — Seconds to wait before retrying. Present only on 429.