Skip to main content
POST
/
api
/
v1
/
estimate
Estimate Request Costs
curl --request POST \
  --url https://ninjachat.ai/api/v1/estimate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "group": "chat",
      "model": "gpt-5",
      "count": 10
    },
    {
      "group": "images",
      "model": "flux-2-klein",
      "count": 5
    }
  ]
}
'
{
  "items": [
    {
      "group": "<string>",
      "model": "<string>",
      "count": 123,
      "estimated_cost": "$0.060"
    }
  ],
  "total": "$0.090"
}

Authorizations

Authorization
string
header
required

API key starting with nj_sk_

Body

application/json
items
object[]
required

Planned request shapes to estimate.

Required array length: 1 - 100 elements

Response

Estimated costs.

items
object[]
total
string
Example:

"$0.090"