API Documentation

Welcome to the AI Image Generation Service API. This powerful tool allows you to convert textual prompts into stunning AI-generated images with a simple POST request to our /api/generate endpoint. Ideal for a wide range of applications, from digital art to content creation, our API blends advanced AI technology with ease of use to provide a seamless image generation experience.

Key Features

Get started today to explore the capabilities of AI-driven creativity at your fingertips.

Usage

curl -X POST https://imaginix.ai/api/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer undefined" \
-d '{"prompt": "Your prompt here", "quality": "Standard"}'

Response Example

{
    "status": "success",
    "images": [
      "https://cdn.imaginix.ai/images/cfdf4bff-9bea-4291-bf05-91e08e36d18f.webp",
      "https://cdn.imaginix.ai/images/a9e29e20-ce1a-447e-855b-61110508203c.webp",
      "https://cdn.imaginix.ai/images/74206169-f160-4175-b763-4f582205a4ac.webp"
    ],
    "remaining_credits": 96
}

Input Parameters

ParameterLocationDescriptionRequiredTypeExample Values
AuthorizationHeaderBearer token for API access.YesStringBearer nYF5CAM9qpB0...
Content-TypeHeaderSpecifies the format of the data being sent (should be application/json).YesStringapplication/json
promptBodyTextual prompt based on which the image is generated.YesString"A cozy, trendy café corner, perfect for Instagram, with hanging plants, vintage furniture, and a latte art heart in a sunlit ambiance."
negative_promptBodyTextual negative prompt to specify what the image should not include.NoString"War, racism, violence, mutated hands"
qualityBodyDefines the quality of the generated image.No
(default: Standard)
StringStandard, High Quality

Output Parameters

ParameterDescriptionTypeExample Values
statusIndicates the status of the API response.String"success" or "error"
imagesURLs to the generated images.Array of Strings[
"https://cdn.imaginix.ai/images/IMAGE_ID.webp",
"https://cdn.imaginix.ai/images/IMAGE_ID.webp",
"https://cdn.imaginix.ai/images/IMAGE_ID.webp",
]
remaining_creditsRemaining credits for the user.Number96
errorsList of error messages.Array of Strings["Unauthorized request", "Insufficient credits."]