Documentation menu
AI Studio API

Create a generation

Submit an AI Studio generation request with a model and payload.

API playground

Send a real request to this site and inspect the HTTP response immediately.

POST
POST

Only same-origin /api/* paths are allowed.

Leave blank to use your current signed-in browser session. The key is never saved.

This is a real generation request and may reserve or consume account credits.

Response
Send a request to view its response here.
POST/api/ai-studio/execute

Start a new generation task. The request uses modelId, isPublic, and payload.

Request Headers

Authorization: Bearer YOUR_API_KEYContent-Type: application/json

Request Parameters

NameTypeRequiredDefaultOptionsDescription
modelIdstringYes-video:wan-text-to-video, video:grok-imagine-text-to-video, video:grok-imagine-image-to-video, video:wan-image-to-video, video:kling-2-6-text-to-video, video:kling-2-6-image-to-video, video:wan-2-7-text-to-video, video:wan-2-7-image-to-video, video:kling-3-0, video:kling-2-6-motion-control, video:wan-2-7-reference-to-video, video:wan-2-7-video-edit, video:kling-3-0-motion-control, image:z-image, image:grok-imagine-image-to-image, image:wan-2-7-image, image:grok-imagine-text-to-image, image:seedream5-0-lite-text-to-image, image:seedream5-0-lite-image-to-image, image:qwen2-text-to-image, image:qwen2-image-edit, image:seedream4-5-text-to-image, image:seedream4-5-edit, image:wan-2-7-image-proModel ID for the video style/version you choose.
isPublicbooleanNotrue-Whether this result can be shown publicly. Default is true.
payloadobjectYes--Main input data for generation. Nested fields change with the selected model.See Dynamic payload fields by model
Request
curl -X POST "https://spicyai.site/api/ai-studio/execute" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "modelId": "video:sora2-text-to-video-standard",
    "isPublic": true,
    "payload": {
      "model": "video:sora2-text-to-video-standard",
      "input": {
        "prompt": "A cinematic video of a cat walking in the rain"
      }
    }
  }'
Response Example
{
  "success": true,
  "data": {
    "modelId": "video:sora2-text-to-video-standard",
    "generationId": "b6a7f5c4-8a7c-4e2b-8cf6-6b8d9b3d8d21",
    "reservedCredits": 20,
    "taskId": "provider-task-id",
    "state": "queued",
    "raw": {},
    "selectedPricing": {}
  }
}
Error Example
{
  "success": false,
  "error": "User not authenticated"
}
Main input data for generation. Nested fields change with the selected model. See Dynamic payload fields by model