List available models
const url = 'https://api.bayle.ai/models?type=asr';const options = {method: 'GET', headers: {'Accept-Language': 'pt-BR'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.bayle.ai/models?type=asr' \ --header 'Accept-Language: pt-BR'Lists the models available through Bayle, newest capabilities included. Model identifiers are opaque strings: pass one back verbatim as the model field of a generation request rather than parsing or normalizing it. No credential is required to call this endpoint.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Example
pt-BRChooses the language of any error message in this request’s response. A tag beginning with the two letters pt, in any case, selects Brazilian Portuguese; anything else, including an absent header, selects English. The tag may appear anywhere in a multi-tag header, for example fr-FR;q=0.9,pt;q=0.5,en;q=0.3. Quality values are accepted but ignored, since this is a presence check rather than weighted negotiation.
Query Parameters
Section titled “Query Parameters”Restricts the list to a single class of model. Omit it, or pass all, to receive every model. An unrecognized value is rejected through the standard error envelope described below.
Responses
Section titled “Responses”The list of available models.
object
Always list.
The class of model this list was filtered to.
One entry per available model.
object
The model identifier. Pass this value back verbatim as the model field of a generation request.
When the model was added, as a Unix timestamp in seconds.
The model’s class, matching the values accepted by the type query parameter.
Maximum input tokens, when available for a given model. Applies to text models only.
Details about the model. Only capabilities is described here; other keys may appear.
object
A representative set of capability flags, when available for a given model. Additional flags may appear beyond the ones listed here.
object
Whether the model can think before it answers. A model can reason without taking a reasoning_effort level.
Whether the model takes a reasoning_effort level on chat completions.
The reasoning_effort levels this model lists. Absent for a model that does not take a level.
The level this model uses when a request leaves reasoning_effort out. It differs by model: many default to low, others to medium, high, xhigh or max. Absent for a model that does not take a level.
Examples
Text models (`?type=text`)
{ "object": "list", "type": "text", "data": [ { "id": "qwen3-5-35b-a3b", "object": "model", "type": "text", "created": 1771977600, "context_length": 256000, "model_spec": { "name": "Qwen 3.5 35B A3B", "description": "Qwen 3.5 35B A3B is a highly efficient MoE model with 35B total parameters and only 3B active parameters, excelling at reasoning, coding, and general knowledge tasks.", "pricing": { "input": { "usd": 0.15, "diem": 0.15 }, "cache_input": { "usd": 0.05, "diem": 0.05 }, "output": { "usd": 1, "diem": 1 } }, "availableContextTokens": 256000, "maxCompletionTokens": 16384, "capabilities": { "optimizedForCode": true, "quantization": "not-available", "supportsAudioInput": false, "supportsFunctionCalling": true, "supportsLogProbs": true, "supportsMultipleImages": true, "maxImages": 10, "supportsReasoning": true, "supportsReasoningEffort": true, "reasoningEffortOptions": [ "none", "low", "medium", "high" ], "defaultReasoningEffort": "low", "supportsResponseSchema": true, "supportsTeeAttestation": false, "supportsE2EE": false, "supportsVideoInput": true, "supportsVision": true, "supportsWebSearch": true, "supportsXSearch": false }, "constraints": { "temperature": { "default": 1 }, "top_p": { "default": 0.95 }, "repetition_penalty": { "default": 1 } }, "offline": false, "privacy": "private", "traits": [] } }, { "id": "mistral-small-3-2-24b-instruct", "object": "model", "type": "text", "created": 1768435200, "context_length": 256000, "model_spec": { "name": "Mistral Small 3.2 24B Instruct", "description": "Mistral Small 3.2 is a 24B parameter model optimized for efficiency and performance. Ideal for general-purpose tasks with balanced speed and capability.", "pricing": { "input": { "usd": 0.09375, "diem": 0.09375 }, "output": { "usd": 0.25, "diem": 0.25 } }, "availableContextTokens": 256000, "maxCompletionTokens": 16384, "capabilities": { "optimizedForCode": false, "quantization": "fp8", "supportsAudioInput": false, "supportsFunctionCalling": true, "supportsLogProbs": false, "supportsMultipleImages": true, "maxImages": 10, "supportsReasoning": false, "supportsReasoningEffort": false, "supportsResponseSchema": true, "supportsTeeAttestation": false, "supportsE2EE": false, "supportsVideoInput": false, "supportsVision": true, "supportsWebSearch": true, "supportsXSearch": false }, "offline": false, "privacy": "private", "traits": [] } } ]}Embedding, image and video models (`?type=all`, excerpt)
{ "object": "list", "type": "all", "data": [ { "id": "text-embedding-qwen3-0-6b", "object": "model", "type": "embedding", "created": 1776384000, "model_spec": { "name": "Qwen3 Embedding 0.6B", "pricing": { "input": { "usd": 0.0125, "diem": 0.0125 }, "output": { "usd": 0.0125, "diem": 0.0125 } }, "embeddingDimensions": 1024, "maxInputTokens": 32768, "supportsCustomDimensions": true, "offline": false, "privacy": "private", "traits": [] } }, { "id": "z-image-turbo", "object": "model", "type": "image", "created": 1764758779, "model_spec": { "name": "Z-Image Turbo", "pricing": { "generation": { "usd": 0.01, "diem": 0.01 }, "upscale": { "2x": { "usd": 0.02, "diem": 0.02 }, "4x": { "usd": 0.08, "diem": 0.08 } } }, "constraints": { "promptCharacterLimit": 7500, "steps": { "default": 8, "max": 8 }, "widthHeightDivisor": 8 }, "supportsWebSearch": false, "supportsOptimizePromptThinking": false, "supportsStyleReferences": false, "offline": false, "privacy": "private", "traits": [ "default", "fastest" ] } }, { "id": "seedance-2-0-mini-text-to-video-basic", "object": "model", "type": "video", "created": 1782345600, "model_spec": { "name": "Seedance 2.0 Mini", "privacy": "anonymized", "constraints": { "model_type": "text-to-video", "aspect_ratios": [ "21:9", "16:9", "4:3", "1:1", "3:4", "9:16" ], "resolutions": [ "720p", "480p" ], "durations": [ "4s", "5s", "6s", "7s", "8s", "9s", "10s", "11s", "12s", "13s", "14s", "15s" ], "audio": true, "audio_configurable": true, "audio_input": false, "per_reference_audio": false, "video_input": false, "prompt_character_limit": 10000 }, "model_sets": [ "audio", "long_duration", "cinematic", "photorealistic" ], "offline": false, "traits": [] } } ]}Headers
Section titled “Headers”Confirms which of the two supported locales, en or pt-BR, this response was rendered in, so a caller can detect it without reading the message text. Present on every response, success and error alike. On a chat completions stream it is committed together with the initial 200, so it appears whichever way the stream ends.
default
Section titled “default”The request failed. The body uses the shared error envelope, rendered in the locale negotiated through Accept-Language. type and code identify the specific failure when Bayle recognizes it, and fall back to type: api_error with a null code when it does not. Where a failure carries a meaningful status code, Bayle preserves it; a transport failure, such as a timeout or a refused connection, is reported as 502. The exception is an operation that documents its own time limit, which reports running past it as 504 with the request_timeout code.
Bayle’s OpenAI-shaped error envelope, shared by every error response this API returns.
object
object
A human-readable description of the failure, in the negotiated locale. See the Accept-Language request parameter for how that locale is chosen, and the Content-Language response header for which one was served.
OpenAI’s error type vocabulary, for example api_error, authentication_error, invalid_request_error, or rate_limit_error, matching the class of failure so an OpenAI SDK’s exception mapping keeps working.
The request field the failure names, when it names one. Null when the failure is not field-specific, as with authentication or rate limiting.
Bayle’s semantic error code, reusing OpenAI’s vocabulary where an equivalent exists, for example invalid_api_key or rate_limit_exceeded. Null when Bayle could not identify the specific failure; the envelope is still valid and carries a generic message. The full list lives in Bayle’s error reference rather than being enumerated here.
Examples
400: a missing or invalid parameter, for example an unknown `type` on `GET /models`, no `input` on `POST /embeddings`, `n` above 1 or an unlisted `size` on `POST /images/generations`, a numeric or unlisted `duration` on the video endpoints, or no `queue_id`
{ "error": { "message": "Bayle could not process this request because one or more parameters are invalid.", "type": "invalid_request_error", "param": null, "code": "invalid_request" }}404: a `model` that does not exist
{ "error": { "message": "The upstream model provider could not complete this request. Please try again.", "type": "api_error", "param": null, "code": null }}400: `POST /video/retrieve` or `POST /video/complete` with a `queue_id` that matches no job
{ "error": { "message": "Bayle could not find a request matching the given request ID.", "type": "invalid_request_error", "param": "request_id", "code": "request_id_not_found" }}402: the key's balance is exhausted
{ "error": { "message": "Your Bayle account does not have enough balance to complete this request.", "type": "insufficient_quota", "param": null, "code": "insufficient_quota" }}422: a prompt the content policy does not permit
{ "error": { "message": "Bayle's content policy does not permit this prompt.", "type": "invalid_request_error", "param": null, "code": "content_policy_violation" }}429: too many requests
{ "error": { "message": "You have exceeded the rate limit for Bayle's API.", "type": "rate_limit_error", "param": null, "code": "rate_limit_exceeded" }}500: the model could not complete the request, for example an embedding `dimensions` the model cannot produce
{ "error": { "message": "Bayle could not complete inference for this request.", "type": "api_error", "param": null, "code": "inference_failed" }}504: an image generation still running after four minutes
{ "error": { "message": "This request took too long to complete on Bayle and was timed out. For long-running requests, use streaming.", "type": "api_error", "param": null, "code": "request_timeout" }}Headers
Section titled “Headers”Confirms which of the two supported locales, en or pt-BR, this response was rendered in, so a caller can detect it without reading the message text. Present on every response, success and error alike. On a chat completions stream it is committed together with the initial 200, so it appears whichever way the stream ends.