curl --request POST \
--url https://api.varg.ai/v2/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling_v3",
"prompt": "cat jumping over a fence",
"duration": 5
}
'{
"valid": true,
"model": "<string>",
"tool": "<string>",
"pricing": {
"provider_cost_cents": 123,
"user_price_cents": 123,
"markup_percent": 123,
"pricing_id": "<string>"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell"
}
}{
"error": {
"code": "invalid_request",
"message": "Body validation failed (text: Required)"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}Pricing & Billing
Estimate a price without creating a job
Send the same body you would send to a generation endpoint and get the
price back. Also accepts a batch format with an items array where each
item carries tool, model, and params.
POST
/
estimate
curl --request POST \
--url https://api.varg.ai/v2/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling_v3",
"prompt": "cat jumping over a fence",
"duration": 5
}
'{
"valid": true,
"model": "<string>",
"tool": "<string>",
"pricing": {
"provider_cost_cents": 123,
"user_price_cents": 123,
"markup_percent": 123,
"pricing_id": "<string>"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell"
}
}{
"error": {
"code": "invalid_request",
"message": "Body validation failed (text: Required)"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}Authorizations
varg API key (varg_...). Get one at app.varg.ai
or run bunx vargai login. App sessions may alternatively send a
Supabase JWT.
Was this page helpful?