Boogu Image API
Boogu Image API Reference
Create text-to-image generation tasks with your API key, then poll task status until the image is ready. Public documentation covers only the generate and status endpoints.
Quick Start
| 1 | curl -X POST 'https://booguimage.com/api/image/boogu-image/generate' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' \ |
| 3 | -H 'Content-Type: application/json' \ |
| 4 | -d '{ |
| 5 | "prompt": "A studio portrait with soft window light", |
| 6 | "size": "16:9", |
| 7 | "rendering_speed": "BALANCED", |
| 8 | "output_format": "png", |
| 9 | "public": true |
| 10 | }' |
Authentication
Send your Boogu Image API key as a Bearer token. These routes are server-side BFF endpoints and do not require a signed-in browser session.
API keys: Create and manage keys from the dashboard. Open API Keys
| 1 | Authorization: Bearer YOUR_API_KEY |
Async Workflow
- Call
POST /api/image/boogu-image/generatewith your prompt. - Read
data.task_idfrom the response. - Poll
GET /api/image/boogu-image/status?task_id=...until status becomes a final state.
Credits
| Operation | Cost | Notes |
|---|---|---|
| Text to image | 4 credits | Charged after request validation |
Endpoints
/api/image/boogu-image/generateAccepts a text prompt and returns a task_id immediately. Poll the status endpoint to retrieve the final image URL.
Request body
Text prompt describing the image to generate. Max 2000 characters.
Aspect ratio for the output image. Defaults to 1:1.
Generation speed preset. Supported values: TURBO, BALANCED, QUALITY. Defaults to BALANCED.
Output image format. Supported values: png, jpeg, webp. Defaults to png.
Whether the generated image can appear in public galleries. Defaults to true.
Example request
| 1 | { |
| 2 | "prompt": "A studio portrait with soft window light", |
| 3 | "size": "16:9", |
| 4 | "rendering_speed": "BALANCED", |
| 5 | "output_format": "png", |
| 6 | "public": true |
| 7 | } |
Responses
Task created successfully
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "boogu71e549f645122eb8db5f75af2c11", |
| 6 | "status": "IN_PROGRESS" |
| 7 | } |
| 8 | } |
/api/image/boogu-image/statusCheck generation progress with the task_id returned by the generate endpoint.
Query parameters
Task identifier returned by the generate endpoint.
Example request
| 1 | curl -X GET 'https://booguimage.com/api/image/boogu-image/status?task_id=YOUR_TASK_ID' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' |
When status is SUCCESS, read the image URL from the response payload.
| 1 | const imageUrl = data.response?.[0] ?? data.data?.response?.[0]; |
Responses
| 1 | { |
| 2 | "code": 200, |
| 3 | "message": "success", |
| 4 | "data": { |
| 5 | "task_id": "boogu71e549f645122eb8db5f75af2c11", |
| 6 | "status": "IN_PROGRESS", |
| 7 | "response": null, |
| 8 | "error_message": null |
| 9 | } |
| 10 | } |
API Playground
Send live requests from your browser. Replace YOUR_API_KEY with a real key before testing.
Error Codes
| Status | Scenario | Description |
|---|---|---|
| 400 Requisição Inválida | MISSING_PROMPT | The prompt field is required and cannot be empty. |
| 400 Requisição Inválida | INVALID_PROMPT_LENGTH | Prompt exceeds the 2000 character limit for text-to-image requests. |
| 401 Não autorizado | INVALID_API_KEY | Missing or invalid Bearer token in the Authorization header. |
| 402 | INSUFFICIENT_CREDITS | Account does not have enough credits for this generation. |
| 405 | METHOD_NOT_ALLOWED | Use POST for generate and GET for status. |
| 500 Erro Interno do Servidor | INTERNAL_ERROR | Unexpected server error while creating or polling the task. |
