Documentation Index
Fetch the complete documentation index at: https://docs.akool.com/llms.txt
Use this file to discover all available pages before exploring further.
API Endpoints
Image Generate Operations
- Text to Image / Image to Image - Create images from text prompts or transform existing images
- Generate 4K or Variations - Upscale images to 4K or generate variations from existing results
- Get Image Result - Retrieve image generation results by ID
Getting Started
Basic Workflow
-
Create Image:
- Prepare your text prompt describing the desired image
- Optionally provide a source image for image-to-image transformation
- Call the Create By Prompt API with your parameters
-
Check Results:
- Use the Get Image Result API to check the status
- Download the result URL when the status is “Completed” (image_status = 3)
-
Upscale or Generate Variations (Optional):
- Get available buttons from the Get Image Result API response (
buttonsfield) - Call the Generate 4K or Variations API with the desired operation
- Get available buttons from the Get Image Result API response (
Response Code Description
Please note that if the value of the response code is not equal to 1000, the request
has failed or encountered an error.
| Code | Description |
|---|---|
| 1000 | Success |
| 1003 | Parameter error or Parameter cannot be empty |
| 1008 | The content you get does not exist |
| 1009 | You do not have permission to operate |
| 1010 | You cannot operate this content |
| 1101 | Invalid authorization or The request token has expired |
| 1102 | Authorization cannot be empty |
| 1108 | Image generate error, please try again later |
| 1200 | The account has been banned |
Image Status Codes
When checking results, theimage_status field indicates the current state:
| Status | Description |
|---|---|
| 1 | In Queue - Your request is waiting to be processed |
| 2 | Processing - Image is currently being generated |
| 3 | Success - Image completed, result URL is available |
| 4 | Failed - Image generation failed, please check your input |
Best Practices
Prompt Tips
- Be Descriptive: Use detailed prompts with specific adjectives, styles, and compositions
- Source Image: For image-to-image, provide a clear high-quality source image
- Aspect Ratio: Choose the appropriate
scaleparameter based on your use case (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3)
API Usage Tips
- Webhook: Use the
webhookUrlparameter to receive notifications when processing is complete - 4K Upscale: Use buttons U1-U4 to upscale specific images to 4K resolution
- Variations: Use buttons V1-V4 to generate variations of specific images
- Result Cleanup: Save generated images promptly as they expire after 7 days