Developers

Estimate the Credits of a generation

POST
/generations/estimate

The Credits a generation would cost, from the same pricing resolver that charges it. Pass the input assets by role only. Nothing is charged or started.

Request Body

application/json
  1. body
modelKey*"seedream-5-5"
Value in"seedream-5-5"
operation*string
Value in"text-to-image""image-to-image""text-to-video""image-to-video""video-to-video""text-to-audio""text-to-music"
options?
prompt?string
assets?array<>

Response Body

Success.

application/json
  1. response
appCredits*integer
Range0 <= value <= 9007199254740991
Example request
curl -X POST 'https://ximagesplitter.com/api/v1/generations/estimate' \
  -H 'Content-Type: application/json' \
  -d '{
  "modelKey": "seedream-5-5",
  "operation": "text-to-image"
}'
Example response
{
  "appCredits": 0
}