Skip to main content

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.

The resources (image, video, voice) generated by our API are valid for 7 days. Please save the relevant resources as soon as possible to prevent expiration.

API Endpoints

Image Generate Operations

Getting Started

Basic Workflow

  1. 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
  2. Check Results:
    • Use the Get Image Result API to check the status
    • Download the result URL when the status is “Completed” (image_status = 3)
  3. Upscale or Generate Variations (Optional):

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.
CodeDescription
1000Success
1003Parameter error or Parameter cannot be empty
1008The content you get does not exist
1009You do not have permission to operate
1010You cannot operate this content
1101Invalid authorization or The request token has expired
1102Authorization cannot be empty
1108Image generate error, please try again later
1200The account has been banned

Image Status Codes

When checking results, the image_status field indicates the current state:
StatusDescription
1In Queue - Your request is waiting to be processed
2Processing - Image is currently being generated
3Success - Image completed, result URL is available
4Failed - 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 scale parameter 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 webhookUrl parameter 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

Support

For additional help and examples, check out our: