Status and pricing
Two public endpoints that need no key and no sign-in — GET /api/status (the site's public settings) and GET /api/pricing (the Model Square data — model names, available groups, supported endpoints, billing type).
The two endpoints below are public: they need neither an API key nor a sign-in. They suit programs that read the site's quota display setting, or that list which models exist and which groups offer them. They come from new-api, the open-source gateway CodaAPI is built on, follow the upstream version, and their fields may change between versions. The responses also contain many fields used by the console pages; this page only lists the stable ones that are useful for integration.
| Method and path | What it returns |
|---|---|
GET /api/status |
The site name, version, and public settings such as the quota display type |
GET /api/pricing |
The Model Square data: model names, available groups, supported endpoints, billing type |
Request headers
No authentication header is needed.
Site status
GET https://codaapi.com/api/status
No request parameters.
curl
curl https://codaapi.com/api/status
Response
{
"success": true,
"message": "",
"data": {
"system_name": "CodaAPI",
"version": "v1.0.0…",
"server_address": "https://codaapi.com",
"start_time": 1764460800,
"quota_display_type": "…",
"quota_per_unit": "…",
"usd_exchange_rate": "…",
"custom_currency_symbol": "…",
"custom_currency_exchange_rate": "…",
"…": "…"
}
}
The example only shows where the fields are. The display type, conversion factor and exchange rates are settings of the site's back end, so the example leaves their values out; what the endpoint actually returns is authoritative. quota_per_unit, usd_exchange_rate and custom_currency_exchange_rate come back as numbers.
| Field | Description |
|---|---|
data.system_name |
The site name |
data.version |
The gateway version |
data.server_address |
The site address |
data.start_time |
When the gateway last started (Unix timestamp, seconds) |
data.quota_display_type |
How quota is displayed: USD, CNY, CUSTOM or TOKENS. It decides how amounts appear in the console and what unit /v1/dashboard/billing/* returns; see Quota units |
data.quota_per_unit |
A number: quota points per US dollar. Divide the quota points returned by /api/usage/token/ and /api/log/token by it to get US dollars |
data.usd_exchange_rate |
A number: the exchange rate used with the CNY display type (yuan per US dollar) |
data.custom_currency_symbol, data.custom_currency_exchange_rate |
The currency symbol and rate (a number, units per US dollar) used with the CUSTOM display type |
A normal response only means the gateway is answering requests; it doesn't mean every model's upstream is available.
Models and prices
GET https://codaapi.com/api/pricing
Returns all of the Model Square data. No request parameters.
curl
curl https://codaapi.com/api/pricing
Python (pip install requests): list the models that support the Claude format, with their billing type and groups
import requests
body = requests.get("https://codaapi.com/api/pricing", timeout=30).json()
for model in body["data"]:
if "anthropic" in (model.get("supported_endpoint_types") or []):
if model.get("billing_mode") == "tiered_expr":
billing = "dynamic pricing" # priced by an expression; quota_type doesn't describe it
elif model.get("quota_type") == 1:
billing = "per request"
else:
billing = "per token"
print(model["model_name"], billing, ", ".join(model.get("enable_groups") or []))
Response
{
"success": true,
"data": [
{
"model_name": "gemini-2.5-flash",
"vendor_id": 1,
"quota_type": 0,
"enable_groups": ["…"],
"supported_endpoint_types": ["gemini", "openai"],
"description": "…",
"tags": "…",
"…": "…"
}
],
"vendors": [{"id": 1, "name": "Google", "icon": "…"}],
"usable_group": {"…": "…"},
"supported_endpoint": {
"gemini": {"path": "/v1beta/models/{model}:generateContent", "method": "POST"},
"openai": {"path": "/v1/chat/completions", "method": "POST"}
},
"…": "…"
}
| Field | Description |
|---|---|
data[].model_name |
The model name; this is what you put in model when calling. A name containing * is a wildcard that stands for a family of names (for example thinking budgets with different numbers) and can't be used as is |
data[].quota_type |
Billing type: 0 per token, 1 per request. If billing_mode is present, check it first |
data[].billing_mode |
Present only on models priced by an expression, with the value tiered_expr; Model Square shows these as Dynamic Pricing, and the price comes from a billing expression (see Billing methods). Don't treat such a model as per-token or per-request based on quota_type. Other models don't have this field |
data[].enable_groups |
The groups that offer this model; all means every group. For what the groups mean, see Groups |
data[].supported_endpoint_types |
Supported endpoint types, for example openai, openai-response, anthropic, gemini and image-generation |
data[].vendor_id |
The provider, matching vendors[].id |
data[].description, data[].tags |
Description and tags, filled in by the site; may be empty |
vendors[] |
The list of providers (id, name) |
usable_group |
Group name → group description |
supported_endpoint |
The method and path for each endpoint type |
The response also has billing fields such as model_ratio, model_price, completion_ratio and group_ratio. Their meaning and calculation follow upstream's billing rules, may change between versions, and don't reflect the top-up price. Use Model Square and the price list for prices, and don't compute costs from these fields in your code. For how charges work, see Pricing and multipliers.
A few things to note:
- Without a sign-in, the response covers the groups open to all users and their models.
- The data is cached in the gateway; changes made in the back end show up here within about a minute.
- The site can turn off Model Square or make it visible only after sign-in; this endpoint then returns 403 or 401.
Errors
Errors come back as {"success": false, "message": "…"}; for example, 403 when Model Square is turned off. For what to do about each status code, see Troubleshooting.
Billing
These two endpoints aren't billed.