OpenAPI Spec
The full machine-readable spec is available at /api/v1/openapi.json. Import it into Postman, Insomnia, or any OpenAPI-compatible tool.
curl https://www.pixola.ai/api/v1/openapi.jsonAuthentication
All API requests require a Bearer token. Create an API key from your Settings page.
curl https://www.pixola.ai/api/v1/models \
-H "Authorization: Bearer pxk_YOUR_API_KEY"Quick Start
Generation is async: submit a request and get a batchId, then poll for results.
# 1. Submit (returns batchId immediately)
curl -X POST https://www.pixola.ai/api/v1/generate \
-H "Authorization: Bearer pxk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A serene mountain lake at golden hour",
"model": "flux-2",
"style": "watercolor",
"shape": "landscape-wide",
"quality": "hd"
}'
# 2. Poll for results (replace BATCH_ID)
curl https://www.pixola.ai/api/v1/batches/BATCH_ID \
-H "Authorization: Bearer pxk_YOUR_API_KEY"Endpoints
Base URL: https://www.pixola.ai/api/v1
Try It
Playground
GET
Rate Limits
30 requests per minute per API key
1,000 requests per day per API key
When rate limited you'll receive a 429 response with a Retry-After header.
Error Codes
| Status | Code | Description |
|---|---|---|
| 400 | bad_request | Invalid parameters |
| 401 | unauthorized | Missing or invalid API key |
| 404 | not_found | Resource not found |
| 409 | content_flagged | Prompt flagged by moderation |
| 409 | insufficient_credits | Not enough credits |
| 429 | rate_limited | Too many requests |
| 500 | internal_error | Server error |