Request and Response Formats
Imagine API primarily uses JSON for data interchange to maximize compatibility with various programming languages. This guide focuses on the Generations service, which generates images from text prompts, and these principles apply to other API services as well.
Request Format
Our API requests use POST method with multipart/form-data content to accommodate image file uploads and additional data.
Response Status Codes
When a request is successful, you will receive an image as output. Below are the status codes that you might encounter:
200
Success
The request completed successfully, and the image was generated as expected.
400
Bad Request
The request is malformed or incomplete.
401
Unauthorized
Authentication is required or failed.
429
Too Many Requests
Too many requests have been sent within a given timeframe.
500
Internal Server Error
An unexpected issue occurred.
For comprehensive API reference details, please visit our API References.
Last updated