Beta

Estimate Credits

POSThttps://api.youvico.com/api/projects/:id/files/upload.generate/estimate
MCP Tool
Not Supported
Rate Limit
Default
Project Role
OwnerManagerMember

Returns the credits that Generate File would reserve for the same request. It runs the same checks and calculation without starting a generation.

Available only in projects of the workspace your API key or connection belongs to, not in projects another workspace has linked to it.

Example

curl -X POST 'https://api.youvico.com/api/projects/bdbff5de-96d7-468f-9db0-85fe28bd6b62/files/upload.generate/estimate' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "mode": "ADVANCED", "output": { "type": "IMAGE", "model": "gemini-3.1-flash-image" }, "prompt": "A sneaker on a white marble table in soft morning light", "attachments": [{ "id": "GA1234567890ABCD" }], "configs": { "references": ["GA1234567890ABCD"], "aspectRatio": "1:1", "resolution": "2k" } }'
{
  "data": {
    "credits": 15
  }
}
Request
curl -X POST 'https://api.youvico.com/api/projects/bdbff5de-96d7-468f-9db0-85fe28bd6b62/files/upload.generate/estimate' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"mode": "ADVANCED",
"output": {
"type": "IMAGE",
"model": "gemini-3.1-flash-image"
},
"prompt": "A sneaker on a white marble table in soft morning light",
"attachments": [
{
"id": "GA1234567890ABCD"
}
],
"configs": {
"references": [
"GA1234567890ABCD"
],
"aspectRatio": "1:1",
"resolution": "2k"
}
}'
Response200 OK
{
  "data": {
    "credits": 15
  }
}

Request

Path

idstringrequired
Project ID

Body

modestringrequired
Generation mode

Possible values: AUTOADVANCED

Example: ADVANCED

outputobjectrequired
Output type and model
output.typestringrequired
Output type

Possible values: PDFMARKDOWNIMAGEVIDEO3DMUSICTTSSTT

Example: IMAGE

output.modelstringrequired
Model ID for output.type. See Models

Example: gemini-3.1-flash-image

promptstringrequired

0-20000 characters

Generation prompt

Example: A sneaker on a white marble table in soft morning light

attachmentsarrayrequired

0-50 items, unique IDs

Reference files
attachments[].idstringrequired
Project file ID (FX) or generation attachment ID (GA)

Example: GA1234567890ABCD

configsobject
Settings. Must match the model's schema for the mode

Response

Returns 200 OK.

dataobject
Estimate
data.creditsnumber
Credits to reserve

Example: 15