Build with the API
List the models you can call
GET /v1/models lists the models your key may call. Use it to find a model's id, check what it can do, and read what it costs, from code.
curl https://sven.swedishembedded.com/v1/models \
-H "Authorization: Bearer $SVEN_API_KEY"
What the list holds#
Clients written for OpenAI read the list unchanged, and each entry carries more:
| Field | Meaning |
|---|---|
id | The name you pass as model. |
name, description | What people call the model, and a line about it. |
context_length | How many tokens of conversation it can take; null where unknown. |
architecture | What it reads and writes: input_modalities, output_modalities and the tokenizer. |
top_provider.max_completion_tokens | The longest answer it can write; null where unknown. |
supported_parameters | The request parameters the model supports. |
capabilities | What you can do with it: chat, tools, embeddings, images or transcription. |
pricing | What it is sold for, in exact US dollars: see below. |
zero_data_retention | true when a call to it keeps no data anywhere. |
The list also carries default_model at the top: the model your account's sessions start with when none is named.
A model that has no price is absent: it is not for sale. A restricted key sees only the models it may call, and a model served only by providers that may keep data is marked needs_data_sharing until the person the key acts for allows it (see Models and data).
Prices#
pricing states what the model costs, in exact US dollars per unit, as text so that no digit is lost:
promptis the price per input token (per second of audio, for a speech-to-text model).completionis the price per output token.imageis what a typical image costs, for image models: about a megapixel, a short prompt and no reference image. A larger image or one with references costs more.image_maxis the most one image is ever charged; a call is held at it before it runs.- Fees that are not charged are
"0".
Read prices from here or from the pricing page rather than copying them into your code: they are the most a call is charged (many cost less, see How calls are charged), and they change in one place.
Pick a model by what it does#
Choose by capabilities: a chat model for chat completions, an embeddings model for embeddings, images for images and transcription for speech to text. A model used for something it is not sold for is refused with a 400 or 404.
Signed in, the Models page shows the same list with prices and which models keep no data.