Imagine API Reference
  1. Image Generation
Imagine API Reference
  • Imagine API References
  • Image Generation
    • Text to Image API
      POST
    • Text to PNG API
      POST
  • Image Editing
    • Background Remover API
      POST
    • Image Upscale API
      POST
    • Generative Fill API
      POST
    • AI Resize API
      POST
    • Retouch API
      POST
  • E-Commerce
    • AI Backgrounds API
      POST
  • Video Generation
    • Text to Video API
      POST
    • Image to Video API
      POST
    • Status by ID
      GET
    • (Deprecated) Status by ID
      GET
    • Delete by ID
      DELETE
    • (Deprecated) Delete by ID
      DELETE
  1. Image Generation

Text to Image API

POST
/image/generations
image
Our Image Generation API enables users to create images based on descriptive text prompts and an artistic style id with various optional customization settings, such as aspect ratio, negative prompts, style, and more.

Request

Header Params
Authorization
string 
required
A bearer token that authenticates the user for making the request.
Example:
Bearer {{API Token}}
Body Params multipart/form-data
prompt
string 
required
A string describing the image to generate. It defines the textual description or concept for the image you wish to generate.
Example:
A futuristic cityscape at night with neon lights
style
enum<string> 
required
An ID representing the style to apply to the generated image. This parameter allows the user to choose from various artistic styles or themes provided by the API.
Allowed values:
realisticanimeflux-schnellflux-devflux-dev-fastsdxl-1.0imagine-turbo
Default:
imagine-turbo
Example:
realistic
aspect_ratio
enum<string> 
optional
An enum specifing the aspect ratio for the generated image.
Allowed values:
1:13:24:33:416:99:16
Default:
1:1
Example:
1:1
seed
integer 
optional
The seed parameter serves as the initial value for the random number generator. By setting a specific seed value, you can ensure that the AI generates the same image or outcome each time you use that exact seed.
>= 1
Example:
5

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.vyro.ai/v2/image/generations' \
--header 'Authorization: Bearer vk-ad08a8e86d1a84404e5837be47d39ab44474f982671c0a' \
--form 'prompt="A futuristic cityscape at night with neon lights"' \
--form 'style="realistic"' \
--form 'aspect_ratio="1:1"' \
--form 'seed="5"'

Responses

🟢200OK
application/octet-stream
Body
status
string 
required
Request status
code
integer 
required
Error code
error
string 
required
Error name
message
string 
required
Error message
Example
The response for 200 code is bytes.
🟠400Bad Request
🔴500Internal Server Error
🔴503Service Unavailable
Modified at 2024-11-26 10:41:59
Previous
Imagine API References
Next
Text to PNG API