Estimate Credits
POST
https://api.youvico.com/api/projects/:id/files/upload.generate/estimate- MCP Tool
- Not Supported
- Rate Limit
- Default
- Scope
- ai:generate
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
idstringrequiredProject ID
Body
modestringrequiredGeneration mode
Possible values: AUTOADVANCED
Example: ADVANCED
outputobjectrequiredOutput type and model
output.typestringrequiredOutput type
Possible values: PDFMARKDOWNIMAGEVIDEO3DMUSICTTSSTT
Example: IMAGE
promptstringrequired0-20000 characters
Generation prompt
Example: A sneaker on a white marble table in soft morning light
attachmentsarrayrequired0-50 items, unique IDs
Reference files
attachments[].idstringrequiredProject file ID (FX) or generation attachment ID (GA)
Example: GA1234567890ABCD
configsobjectSettings. Must match the model's schema for the mode
Response
Returns 200 OK.
dataobjectEstimate
data.creditsnumberCredits to reserve
Example: 15