API Reference
request and response description
Image generation contract
Below you can see all possible options for the request body. See the Image Generation Options and Image Generation I/O sections to learn more about image operations.
Image Generate
Specifies:
- text prompt for image generation (
input
) - image generation options (
options
) - where results will be stored (
output
)
Text prompt that will be used to generate image(s). Should be from 3 to 1024 characters.
"A delicious ceviche cheesecake slice"
Customize the image generation process so that the output images meet your requirements.
URL of the output folder. If output
is not defined, we store the output image on our bucket and return the temporary URL, in this case images are stored for one day.
"storage://storage_1/output_folder/"
Successful Response
Request
Request headers:
In order to send a request, you should set Content-Type
header to let our system know that you provide a valid JSON payload and Authorization
header with a generated API key to identify yourself as a Claid user.
Read a response
Once you have made the request to https://api.claid.ai/v1-beta1/image/generate
you will get a response with information about input text and output images.
Image information is shown in the response:
Parameter | Type | Description |
---|---|---|
ext | string | File extension. Will have |
mps | integer | Megapixel count |
mime | string | MIME type (also known as ‘media type’) |
width | integer | Image width in pixels |
height | integer | Image height in pixels |
format | string | File format. Will have |
tmp_url | string | Temporary URL of a processed image. Will be empty if |
Response body
Response headers:
Rate limit headers will help you understand what number of requests you are able to send according to the current limits on your account:
Request ID header allows to identify your request during image processing, so we are able to help you with troubleshooting and profiling your request if needed.
Last updated