Model ids
Every model has an id of the form provider/model-name. Pass it in the model field of POST /chat/completions. Switching provider is a one-line change: the rest of the request and the response format stay identical.
| Model id | Good for |
|---|---|
openai/gpt-4o-mini | Fast and inexpensive general model, a good default. |
openai/gpt-4o | OpenAI multimodal flagship (text and images). |
anthropic/claude-sonnet-4 | Strong at reasoning, writing and code. |
google/gemini-2.5-flash | Very long context at a low price. |
meta-llama/llama-3.3-70b-instruct | Open-weight model from Meta. |
deepseek/deepseek-chat | Capable open model at a very low price. |
The catalog changes as providers release and retire models. Always pick ids from the model catalog, where you can filter by provider, context length, price and modality, and copy the id of each model.
Listing models
The public model list is available without an API key. Note that it lives at /api/models, outside the /api/v1 base URL. It returns a compact array, refreshed daily, with prices already converted to TND.
curl https://promptix.tn/api/models[ { "id": "openai/gpt-4o-mini", "n": "OpenAI: GPT-4o-mini", "d": "GPT-4o mini is OpenAI's most cost-efficient small model...", "p": "openai", "pr": { "i": 0.594, "o": 2.376 }, "c": 128000, "f": false, "cr": 1721260800, "sp": ["max_tokens", "temperature", "top_p", "stop", "frequency_penalty", "presence_penalty", "seed", "response_format"] }]| Field | Description |
|---|---|
id | Model id to pass as model in requests. |
n | Display name. |
d | Description (optional). |
p | Provider, the part of the id before the slash. |
pr.i / pr.o | Input (prompt) and output (completion) price in TND per 1 million tokens. |
c | Context length in tokens (prompt plus completion). |
f | true for free models. |
cr | Date the model was added, as a Unix timestamp. |
sp | Some of the request parameters the model supports (up to eight). |
models.list() in the OpenAI SDKs
There is no GET /models under the /api/v1 base URL, so client.models.list() does not work. Fetch /api/models directly as shown above.
Prices and cost
Prices are in TND per million tokens, with separate rates for input (your prompt, including the conversation history and system message) and output (the generated answer). Output tokens usually cost more.
cost (TND) = prompt_tokens × input price / 1,000,000 + completion_tokens × output price / 1,000,000 example: 2,000 prompt tokens and 500 completion tokens on openai/gpt-4o-mini = 2,000 × 0.594 / 1,000,000 + 500 × 2.376 / 1,000,000 = 0.001188 + 0.001188 ≈ 0.002 TNDUse the calculator on the pricing page to estimate a workload. The exact amount charged for each request is available afterwards; see Billing and credits.
Choosing a model
- Start small. Small models such as
openai/gpt-4o-minihandle most extraction, classification and chat tasks at a fraction of the price of flagship models. - Check the context length (
c) against your longest prompt plusmax_tokens. - Check capabilities. Tool calling, JSON output and image input are not available on every model; the catalog lists supported parameters and modalities.
- Free models (
f: true) cost nothing but have tighter rate limits upstream and can be slower. They suit prototypes more than production. - Compare on your own data. Try several models in the playground, which shows tokens and cost for each message.