クレジット見積もり
POST
https://api.youvico.com/api/projects/:id/files/upload.generate/estimate- MCPツール
- 未対応
- レート制限
- Default
- スコープ
- ai:generate
同じリクエストでファイル生成を呼び出したときに予約されるクレジットを返します。生成を開始せずに、同じ検証と計算を行います。
APIキーまたは連携が属するワークスペースのプロジェクトでのみ利用できます。ほかのワークスペースから連携されたプロジェクトでは利用できません。
例
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
}
}
リクエスト
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"
}
}'
レスポンス200 OK
{
"data": {
"credits": 15
}
}
リクエスト
パス
idstringrequiredプロジェクトID
ボディ
modestringrequired生成モード
指定できる値: AUTOADVANCED
例: ADVANCED
outputobjectrequired出力形式とモデル
output.typestringrequired出力形式
指定できる値: PDFMARKDOWNIMAGEVIDEO3DMUSICTTSSTT
例: IMAGE
promptstringrequired0-20000 characters
生成プロンプト
例: A sneaker on a white marble table in soft morning light
attachmentsarrayrequired0-50 items, unique IDs
参考ファイル
attachments[].idstringrequiredプロジェクトファイルID(FX)またはAI生成添付ファイルID(GA)
例: GA1234567890ABCD
configsobject設定。モデルのモード別スキーマに一致させる
レスポンス
200 OK を返します。
dataobject見積もり結果
data.creditsnumber予約されるクレジット
例: 15