Geliştirici rehberi
Hızlı başlangıç
İlk Raywake API isteğini gönder: model seç, fiyat al, üretimi başlat ve cURL, Python veya JavaScript ile sonucu takip et.
Her üretim iki istek ve durum sorgulamasından oluşur. Fiyat teklifi (quote) gönderdiğin girdinin fiyatını sabitler. Üretim isteği (generation) bu teklifle işi başlatır; iş kaydı (job) ise sonucun ne zaman hazır olduğunu gösterir.
1. Anahtarını ayarla
export RAYWAKE_API_KEY="your key from the API keys page"2. Akışı çalıştır
# 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. Sonucu oku
Tamamlanan bir iş aşağıdaki gibi görünür. Çıktı URL’leri depolamamıza yönlenir ve 7 gün geçerli imza taşır. Yeni bir link almak için işi tekrar sorgula.
{
"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"
}Sıradaki: Kimlik doğrulama →