OpenAI

1. Overview

The industry's largest language model. Generate an image based on the text prompt.

Available model list:

  • gpt-image-1

  • gpt-image-1.5

2. Request Description

  • Request method: POST

  • Request address: https://gateway.theturbo.ai/v1/images/generations

3. Input Parameters

3.1 Header Parameters

Parameter Name
Type
Required
Description
Example Value

Content-Type

string

Yes

Set the request header type, which must be application/json

application/json

Accept

string

Yes

Set the response type, which is recommended to be unified as application/json

application/json

Authorization

string

Yes

API_KEY required for authentication. Format: Bearer $YOUR_API_KEY

Bearer $YOUR_API_KEY

3.2 Body Parameters (application/json)

Parameter Name
Type
Required
Description
Example (Default Value)

model

string

Yes

Model ID to use. See available models listed in the Overview for details, such as gpt-image-1.5.

gpt-image-1.5

prompt

string

Yes

A text describing the required image. The maximum length of the gpt-image description is 32000 characters.

A cute baby sea otter

n

number

No

The number of generated images must be between 1 and 10. gpt-image-1.5 only supports n=1.

1

size

string

No

The size of the generated image. gpt-image-1.5 supports 1024x1024, 1792x1024, 1024x1792, and gpt-image-1 supports 1024x1024, 1536x1024, 1024x1536.

1024x1024

quality

string

No

Quality options for generated images. gpt-image supports high, medium, and low.

high

4. Request Example

5. Response Example

Last updated