IN ENGLISH · API DOCS

The machine-readable price list: GET /api/models and GET /api/image-prices

The prices the pricing page shows are also available as JSON, with no key and no sign-in. GET /api/models gives each model's price per thousand input and output tokens in Toman, GET /api/image-prices the price of one picture at each quality, and GET /api/pricing-meta the dollar rate these prices use and when it took effect. Each answer is computed when it is asked for.

Last updated:

[01]PRICE FEED

Model prices: GET /api/models

GET /api/modelscurl
curl https://1xai.ir/api/models

The answer is one JSON document, {"models": [ … ]}, with one row per model. Rows come grouped by vendor, newest first within each vendor; the models page shows them in this order.

The fields of a row
FieldTypeMeaning
providerType:stringMeaning:The vendor: openai, anthropic, gemini, deepseek, xai, moonshot, zhipu, alibaba, minimax, tencent
modelType:stringMeaning:The model id, as you send it in a request's model field
input_per_1k_tomanType:numberMeaning:Toman per thousand input tokens; not rounded
output_per_1k_tomanType:numberMeaning:Toman per thousand output tokens; not rounded
kindType:stringMeaning:chat, reasoning or embedding: the section the site lists the model under, read from its id; not a billing unit
familyType:stringMeaning:The model family's display name, such as GPT-5.5
versionType:integerMeaning:A sort key within the family (newer is larger); not a version number to display
context_tokensType:integerMeaning:The input tokens the model accepts; absent when not known
advertiseType:booleanMeaning:true when GET /v1/models lists the model. A false row can still be called and is billed
catalogueType:booleanMeaning:true for the text models the models page and the pricing page show
taglineType:stringMeaning:A one-line description in Persian; absent when none has been written
privateType:booleanMeaning:Present only as true: a model that can be called but is kept off the public pages; its advertise and catalogue are false
offerType:booleanMeaning:Present only as true: a special offer, a model sold at a low price on limited capacity, with no fallback route behind it
One row (the figures are an example; they change daily)json
{
  "provider": "openai",
  "model": "gpt-5.5",
  "input_per_1k_toman": 1565.725,
  "output_per_1k_toman": 9394.35,
  "advertise": true,
  "catalogue": true,
  "kind": "chat",
  "family": "GPT-5.5",
  "version": 5005,
  "context_tokens": 1050000
}

Which models are listed

  • Every model with a per-token price that its vendor has not retired (deprecations).
  • For the text models (catalogue: true) the two figures are a call's per-token price, and tools such as web search are billed apart (caching and tools). Other rows may be models also billed by another unit, such as pictures, audio or realtime voice; their full price is on the pricing page.
  • The list of models the API answers to, image, audio and video models included, is GET /v1/models, which takes a key (models).
  • New fields may be added; a program should ignore the fields it does not know.
[02]PRICE FEED

What the prices are

The prices are in Toman, with each model's own markup (markup), at today's dollar rate. They are list prices: an account's volume discount or own rate is not in them, and neither is the cached-input price. A call's actual amount is on its usage row and, for a non-streamed answer, in the X-1xai-Cost-Toman header (response metadata).

Each answer is computed from the price list when it is asked for, and is sent with Cache-Control: no-store. The prices move when the dollar rate is refreshed, every day at 9 in the morning, Tehran time, or when a vendor changes a price; reading the feed once an hour is enough.

The dollar rate: GET /api/pricing-meta

GET /api/pricing-meta · With an example answercurl
curl https://1xai.ir/api/pricing-meta

{"toman_per_usd": 272300, "update_hour_tehran": 9, "as_of": "2026-11-22T09:00:00+03:30"}

/api/models carries no time. GET /api/pricing-meta gives the rate the prices use: toman_per_usd, the daily refresh hour in Tehran time (update_hour_tehran) and as_of, the last daily refresh time up to now (RFC3339, with the Tehran offset). On a day the refresh does not happen, the rate in use is older than as_of.

[03]PRICE FEED

Image prices: GET /api/image-prices

GET /api/image-pricescurl
curl https://1xai.ir/api/image-prices

No key. For each model of the image studio, the studio's own estimate of one picture at each quality, with that model's own markup, in Toman: what an account with no rate of its own sees beside the Generate button.

The fields of the image prices
FieldTypeMeaning
models[].idType:stringMeaning:The model id
models[].availableType:booleanMeaning:false when the model has no price now
models[].unavailable_reasonType:string or nullMeaning:null, or unpriced
models[].per_image_tomanType:objectMeaning:Quality (low, medium, high, …) to the Toman of one picture
models[].per_input_tomanType:number or nullMeaning:The Toman of one input image (a picture you send to edit); null for a model with no input-image price
toman_per_usdType:numberMeaning:The dollar rate these figures use
as_ofType:stringMeaning:The same as_of as GET /api/pricing-meta

These figures estimate one picture from a short prompt. The amount a call is billed is on that call's usage row.

1xAi is an independent gateway. It is not affiliated with, endorsed by, or a reseller for OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot AI, Z.ai, Alibaba Qwen, MiniMax or Tencent Hunyuan. Requests are relayed upstream rather than answered by models of our own, so each provider's own usage policies apply to what their models will and will not do, and their model availability is theirs to change. Current reachability is published on the status page.