Skip to main content

Text to Image

generating images from textual descriptions.

Path Parameters
text_to_image_api_id integer REQUIRED

The API ID.

Header Parameters
Authorization string REQUIRED

Bearer Auth

Example: Bearer #your_token
Request Body
params object

The passed-in fields will partially override the API config.

model string

Possible values: [runwayml/stable-diffusion-v1-5]

Name of the model to use.

num_inference_steps integer

Possible values: 1 ≤ value ≤ 300

num_inference_steps controls the sampling step for DDIM, larger value will lead to more complete audio but cost more time. Currently, we only support values in [1, 300].

guidance_scale number

Possible values: 1 < value

guidance_scale controls the guidence power of input text, Large => better quality and relavancy to text; Small => better diversity.

inputs object REQUIRED

Parameters for invoking the API.

session_id string

Possible values: length ≤ 32

Unique identifier used to maintain user session state. If not provided, a new session_id will be generated and returned in the response.

prompt string REQUIRED

Textual description.

Responses
200

OK

Schema OPTIONAL
code integer

Error code. 0 when success.

msg string

Error message. Please use "code" instead of "msg" to determine errors.

data object OPTIONAL

Business data.

session_id string

Unique identifier used to maintain user session state.

imageURL string

URL of generated image.

400

Invalid input

401

Unauthorized

404

Record not found