/api/v1/generationsSubmit work
Validates the model request, reserves credits transactionally, creates provider work, and returns the internal generation ID.
Developer API
Submit Krea 2 image jobs, poll their status, and pay from the same credit balance used in the visual studio.
https://krea2.org/api/v1Keys belong to your Krea2 account. Create separate secrets for production, staging, and local development; the full value is shown once.
Your Google account connects the secret to the same credit balance used by the visual generator.
Keep the key on your server. A successful request returns HTTP 202 with the generation ID, credit charge, remaining balance, and estimated duration.
curl -X POST "https://krea2.org/api/v1/generations" \
-H "Authorization: Bearer $KREA2_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: render_2026_07_18_001" \
-d '{
"model": "krea/v2/medium/text-to-image",
"prompt": "Editorial photograph of a glass lamp on limestone",
"aspect_ratio": "4:5",
"creativity": "medium"
}'Idempotency: reuse the same key only when retrying the same logical generation. A different payload with the same key returns HTTP 409.
Three account-scoped endpoints cover submission, status polling, and balance checks.
/api/v1/generationsValidates the model request, reserves credits transactionally, creates provider work, and returns the internal generation ID.
/api/v1/generations/:idReturns queued, processing, succeeded, or failed. A successful response includes the archived output URL.
/api/v1/creditsReturns the balance after browser usage, API usage, purchases, subscription grants, and refunds.
There is no separate API wallet. Requests that definitely did not start and provider-confirmed terminal failures follow the same refund path as a studio generation; uncertain outcomes remain held for reconciliation.
krea/v2/medium/turbo/text-to-imageKrea 2 Medium Turbokrea/v2/medium/text-to-imageKrea 2 Mediumkrea/v2/large/text-to-imageKrea 2 LargeThe API is asynchronous. Persist the returned ID, poll with backoff, and use idempotency for safe retries.
Send the secret as a Bearer token from a trusted server. Revoked keys stop working immediately.
Add a unique Idempotency-Key. Replaying the same request returns the original generation instead of reserving credits again.
Use the returned ID with the status endpoint. Back off between requests instead of keeping one HTTP connection open.
Persist the generation ID and final output URL. Assets use the same archive path as studio results.
No. The API key belongs to the same Krea2 account used by the browser studio. API generations, browser generations, purchases, subscription grants, and refunds all update one shared credit ledger.
Credits are reserved transactionally before provider work is submitted. If the generation cannot start or later fails, the existing automatic refund path returns the charge once.
Send a unique Idempotency-Key with each logical generation. Repeating the same key and request returns the original generation; reusing the key with a different payload returns HTTP 409.
No. Store it in an environment variable or secret manager and call the API from your server. Revoke any key that is exposed.
The initial API supports Krea 2 Medium Turbo, Medium, and Large text-to-image routes. Their current costs are 1, 2, and 4 credits per image.