list_models
List every text model and price
Every chat, embedding, rerank and transcription model on RelaySwitch with its id, type, the routes and tools that take it, our price (per million tokens, or per audio minute for transcription), the developer's list price where recorded, the wire formats it answers (openai, anthropic, gemini) and its specs. Image, video, speech, music and 3D models are in list_media_models. No key needed. Live from GET /v1/catalog.
輸入參數typesearchdeveloper
list_media_models
List image, video, speech and 3D models and prices
Every media model on RelaySwitch with its id, kind, endpoint, unit and price per image, second, generation or minute at each setting, next to the developer's price where recorded. No key needed. Live from GET /v1/catalog/media.
輸入參數kindsearch
media_model
One media model's settings and prices
Everything generate needs to call one image, video, speech, music or 3D model: each setting under params with its type, the values it takes, its range and its default, and the price per unit at each setting under pricing. No key needed. Live from GET /v1/catalog/media.
輸入參數model必填
estimate
Estimate what a request costs
The cost of a request on every chat model (or the ids given), cheapest first, with the developer's list cost and the saving. Give input_tokens, or a prompt / messages to count from. With the caller's key, prices are the key's own (price locks included). Live from POST /v1/estimate.
輸入參數modelspromptmessagesinput_tokensoutput_tokens
media_quote
Price a generation before running it
What generate would charge for exactly these settings, at the key's own rates: the units billed, the charge, and the developer's own price for the same request where one is on record. The settings are checked as a real request's would be, so a wrong value fails here, not at the model. Nothing runs and nothing is charged. Needs the key. Live from POST /v1/generations/quote.
輸入參數input必填model必填
proof
Daily real-model check
Whether each model is still the model it says it is: every day one fixed prompt goes to every model and the verdict per model is stable, changed, failed or unchecked, with the time of the last check and how long the answer has been unchanged. No key needed. Live from GET /v1/proof.
輸入參數model
Sends messages to any chat model id through POST /v1/chat/completions and returns the answer, the token usage and what the request cost. system adds instructions, image_urls lets a model that sees images look at them (a file generate made works), web_search lets the model search while it answers. Billed to the key in the MCP request's Authorization header (Bearer sk-relay-live-...); without one it fails.
輸入參數model必填systemmessages必填image_urlsmax_tokensweb_searchtemperature
compare
Ask several models the same thing
Sends the same conversation (or one prompt) to 2 to 5 chat model ids at once through POST /v1/chat/completions and returns every answer side by side with its token usage, cost and time, plus the total. For a second opinion from another model, or to pick the model that answers a kind of question best. Completions are capped at max_tokens each (default 1024). Each model is billed to the key in the MCP request's Authorization header; a model that fails is reported and not charged.
輸入參數models必填promptsystemmessagesimage_urlsmax_tokenstemperature
One web search through POST /v1/search: titles, URLs, snippets and publish dates, up to 10 results, optionally only from the last day, week, month or year. Billed as one search to the key in the MCP request's Authorization header (the price in GET /v1/catalog server_tools); a search that fails is not charged.
輸入參數query必填freshnessmax_results
embed
Turn text into vectors
Embeds one text or up to 64 through POST /v1/embeddings with an embedding model id from list_models (type embedding) and returns one vector per text, in order, with the token usage and the charge. Billed to the key in the MCP request's Authorization header.
輸入參數input必填model必填
rerank
Rank documents by relevance
Orders up to 100 documents by relevance to a query through POST /v1/rerank with a rerank model id from list_models (type rerank): each result's index into documents, its score and its text, best first. Billed per input token to the key in the MCP request's Authorization header.
輸入參數model必填query必填top_ndocuments必填
transcribe
Transcribe audio or video
Turns the speech in an audio or video file at an https URL (25 MB at most; a file generate made works) into text through POST /v1/audio/transcriptions, or into English with translate. Use a transcription model id from list_models (type transcription). Billed per second of audio to the key in the MCP request's Authorization header; a request that fails is not charged.
輸入參數model必填promptlanguageaudio_url必填translate
generate
Generate an image, video, speech, music or 3D file
Runs any media model id from list_media_models with its settings (see media_model) through POST /v1/generations, waits up to wait_seconds for the files, and returns the generation: a link per file (kept 30 days), a finished image inline, and the charge. A video that is still running when the wait ends is returned as it stands; call generation with its id to keep waiting. Charged to the key in the MCP request's Authorization header when the model accepts the task; a failed generation is refunded in full. To go from an image to a video or an edit, pass the image's URL in image_urls.
輸入參數input必填model必填previewwait_seconds
generation
A generation's status and files
One generation by id: its status, progress, files and charge, waiting up to wait_seconds for it to finish first. Use it after generate answers with a video still running. Needs the key the generation was made with. Live from GET /v1/generations/{id}.
輸入參數id必填previewwait_seconds
generations
List the generations made on this key's organization
The organization's generations, newest first, each with its status, model, files and charge: the asset library behind generate. Filter by kind, model or status; page with before. Files are kept 30 days. Needs the key. Live from GET /v1/generations.
輸入參數kindlimitmodelbeforestatus