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>",
"resolved_model_key": "<string>",
"pricing": {
"user_price_cents": 123,
"pricing_id": "<string>",
"children_user_price_cents": 123,
"total_user_price_cents": 123
},
"breakdown": [
{
"capability": "<string>",
"model": "<string>",
"credits": 123,
"billing": "<string>",
"provider": "<string>"
}
],
"warnings": [
"<string>"
]
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key or JWT"
}
}{
"valid": false,
"code": "model_not_found",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"valid": false,
"code": "model_not_found",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"valid": false,
"code": "model_not_found",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}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>",
"resolved_model_key": "<string>",
"pricing": {
"user_price_cents": 123,
"pricing_id": "<string>",
"children_user_price_cents": 123,
"total_user_price_cents": 123
},
"breakdown": [
{
"capability": "<string>",
"model": "<string>",
"credits": 123,
"billing": "<string>",
"provider": "<string>"
}
],
"warnings": [
"<string>"
]
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key or JWT"
}
}{
"valid": false,
"code": "model_not_found",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"valid": false,
"code": "model_not_found",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"valid": false,
"code": "model_not_found",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}Authorizations
varg API key (varg_...). Get one at app.varg.ai
or run bunx vargai login. App sessions may alternatively send a
Supabase JWT.
Body
application/json
Response
Estimate
- Option 1
- Option 2
Was this page helpful?