Skip to content
Try chatGet API key

Models

GET /models lists what your account can call. It needs no credential, which makes it useful as a connectivity check as well as a catalogue.

Terminal window
curl https://api.bayle.ai/models
{
"object": "list",
"data": [
{ "id": "some-model-id", "object": "model", "type": "text" }
]
}

For a browsable catalog with pricing, context length, and capabilities, see the Models page.

Pass an id back verbatim as the model field of a generation request. Don’t parse it, normalize its case, or infer capability from its name: identifiers change, and the parts that look meaningful aren’t a contract. If you need to know what a model does, read its type.

Pinning a specific id in your configuration is fine, and usually wise for reproducibility. Just re-check it against this endpoint when something stops working, rather than assuming the id is permanent.

Pass ?type= to narrow the list.

Terminal window
curl "https://api.bayle.ai/models?type=text"
Value Models for
text Chat completions
code Code-oriented completions
embedding Embeddings
image Image generation
inpaint Image inpainting
upscale Image upscaling
video Video generation
tts Text to speech
asr Speech recognition
music Music generation
all Everything, the same as omitting the parameter

An unrecognized value is rejected through the standard error envelope.

Note that a model class appearing here does not mean Bayle serves an endpoint for it. The API surface is the eight operations in the reference; GET /models reports what models exist, not what you can call.

models = client.models.list()
text_models = [m.id for m in models.data if getattr(m, "type", None) == "text"]

Or filter server-side, which is cheaper:

import httpx
data = httpx.get("https://api.bayle.ai/models", params={"type": "text"}).json()["data"]