Quick Start

Get up and running in minutes with generation, media editing, and blueprint workflows.


1. Generate an image and poll for the result

Submit a generation request, then poll the job endpoint until it completes.

Generate an image

# Step 1 — Submit the generation job
curl -X POST https://api.wondercat.ai/api/v1/image/generate \
  -H "Authorization: Bearer sk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cat wearing astronaut gear, floating in space",
    "model": "nano-banana-2"
  }'

# Response:
# { "inferenceJobId": "ij_abc123" }

# Step 2 — Poll for completion
curl https://api.wondercat.ai/api/v1/jobs/inference/ij_abc123 \
  -H "Authorization: Bearer sk_your_api_key_here"

# Response (when complete):
# {
#   "inferenceJobId": "ij_abc123",
#   "status": "succeeded",
#   "outputs": [
#     {
#       "media": {
#         "mediaId": "med_generated123",
#         "url": "https://storage.googleapis.com/..."
#       }
#     }
#   ]
# }

2. Upload media and trim a video

Upload a video file, then apply a trim edit to extract a specific segment.

Upload and trim

# Step 1 — Upload the media file
curl -X POST https://api.wondercat.ai/api/v1/media/upload \
  -H "Authorization: Bearer sk_your_api_key_here" \
  -F "file=@my-video.mp4"

# Response:
# { "mediaId": "med_xyz789", "url": "https://storage.googleapis.com/..." }

# Step 2 — Trim the video (start at 5s, end at 15s)
curl -X POST https://api.wondercat.ai/api/v1/video/edit \
  -H "Authorization: Bearer sk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "trim",
    "mediaIds": ["med_xyz789"],
    "params": { "trimStartMs": 5000, "trimEndMs": 15000 }
  }'

# Response:
# { "editorJobId": "ej_def456" }

# Step 3 — Poll for the result
curl https://api.wondercat.ai/api/v1/jobs/editor/ej_def456 \
  -H "Authorization: Bearer sk_your_api_key_here"

# Response (when complete):
# {
#   "editorJobId": "ej_def456",
#   "status": "succeeded",
#   "outputs": [
#     {
#       "mediaId": "med_trimmed456",
#       "url": "https://storage.googleapis.com/..."
#     }
#   ]
# }

3. Create a blueprint and run it

Use the REST blueprint lifecycle endpoints when you want a direct create-and-execute flow. Chat remains the better option when you want AI to shape the workflow first.

Create and run a blueprint

# Step 1 — Create the blueprint
curl -X POST https://api.wondercat.ai/api/v1/blueprints \
  -H "Authorization: Bearer sk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Product teaser"
  }'

# Response:
# { "blueprintId": "bp_abc123" }

# Step 2 — Run the blueprint
curl -X POST https://api.wondercat.ai/api/v1/blueprints/bp_abc123/runs \
  -H "Authorization: Bearer sk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{}'

# Response:
# { "runId": "run_def456" }

Next steps