Generations: Text to Image Feature

Overview

Text-Img is an advanced feature of our API that generates an image based on the provided text input.

API Documentation

Endpoint Details

Endpoint: https://api.vyro.ai/v1/imagine/api/**generations**

Method: POST

Request Format: Requests must be sent as multipart/form-data to successfully send the image file along with the other data.

Request Parameters

The API accepts the following parameters:

Parameter Type Description Default Range / Values Optional
prompt String The text that guides the image generation. - - No
aspect_ratio String The aspect ratio of the generated image. '1:1' 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 5:4, 4:5, 8:10, 3:1 Yes
style_id Integer Determines the image style. 27 21, 26, 29, 27, 28, 30, 31, 32, 33, 34 Yes
negative_prompt String Text that guides the generator away from specified results. ' ' - Yes
cfg Float Configures the generator's function. 7.5 3-15 Yes
seed Integer The seed value for the random number generator. - - Yes
steps Integer The number of operations of the generator. - 30-50 Yes
high_res_results Integer Flag to request high-resolution results. 0 0/1 Yes

Headers

The following keys and values must be included in the request headers:

Response Format

The endpoint responds with a generated image. Each image style is represented by a unique enumerated value and ID.

Style ID: Enums (Text-Img)

Response Status

The status code of the response can be: