Skip to main content
POST
/
api
/
v2
/
models
/
{slug}
/
calculate-price
Calculate Price
curl --request POST \
  --url https://api.example.com/api/v2/models/{slug}/calculate-price \
  --header 'Content-Type: application/json' \
  --data '
{
  "params": {},
  "count": 123
}
'

Path Parameters

slug
string
required
Model slug, e.g. dall-e-3, kling-v2.1

Body Parameters

params
object
Generation parameters (same as you’d pass to /generate). Used to compute variable pricing based on size, quality, duration, etc.
count
integer
default:"1"
Number of generations to calculate for.

Request Example

curl -X POST https://neuralbox.top/api/v2/models/dall-e-3/calculate-price \
  -H "Authorization: Bearer nb_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params": {"size": "1792x1024", "quality": "hd"}, "count": 1}'

Response

{
  "token_cost": 13,
  "min_token_cost": 5,
  "max_token_cost": 13,
  "pricing_type": "matrix"
}

Pricing Types

pricing_typeDescription
fixedSame cost regardless of params
matrixVaries by size/quality (DALL-E 3, GPT Image)
per_secondScales with video duration (Kling, Luma)
per_pointBased on MidJourney points (MidJourney)
Always call this before generating expensive assets — video and HD images can cost significantly more than the base price.
See List Models for all available slugs.