Skip to content
Docs

Documentation

Quickstart

Make your first Raywake API request: choose a model, quote the input, start a generation and poll for results with curl, Python or JavaScript.

Every generation is two requests and a poll: a quote fixes the price of the exact input, a generation spends it, and the job tells you when the result is ready.

1. Set your key

Shell
export RAYWAKE_API_KEY="your key from the API keys page"

2. Run the full flow

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "nano-banana-pro",
  "input": {
    "prompt": "A red ceramic cup on a wooden table, soft morning light",
    "aspect_ratio": "1:1"
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "nano-banana-pro", "quote_id": "QUOTE_ID", "input": {"prompt":"A red ceramic cup on a wooden table, soft morning light","aspect_ratio":"1:1"}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

3. Read the result

A finished job looks like this. Output URLs point to our storage and are signed for 7 days; fetch the job again for a fresh link.

Response
{
  "job_id": "5b0e6c1e-9f5a-4a7e-8f3e-0c6f9d2a41b7",
  "status": "succeeded",
  "model": "nano-banana-pro",
  "prompt": "A red ceramic cup on a wooden table, soft morning light",
  "image_url": "https://…/media/outputs/…/0",
  "outputs": [
    { "type": "image", "url": "https://…/media/outputs/…/0", "mime_type": "image/png", "thumbnail_url": "https://…" }
  ],
  "error": null,
  "quote_id": "9c1d4b7e-2f6a-4e0b-8d3c-5a7f1e2b6c90",
  "credits": 24,
  "created_at": "2026-09-25T12:00:00Z",
  "completed_at": "2026-09-25T12:00:14Z"
}

Next: Authentication →