Tokaify APITokaify API
API Reference
AI Model APIImagesOpenAI Images APIImage Generation

Create Image

Status: Published
Status basis: requires an enabled image-generation model

OpenAI-style image generation endpoint. Some upstream providers may expose additional fields, but the core parameters are model, prompt, size, and n. The endpoint request timeout is 150 seconds.

POST
/v1/images/generations

Authorization

BearerAuth

AuthorizationBearer <token>

Model relay interface recognition. Request heading: Autoration: Bearer .

In: header

Request Body

application/json

model*string

Picture model name.

Default"gpt-image-2"
prompt*string

Inverted words. Range: 1 to 200000 characters, with a specific upper limit based on the model official interface.

n?integer

Returns the number of pictures. Creates the number of candidates. Scope: 1 to 10; specific ceilings are based on the model official interface.

Range1 <= value <= 10
size?string

Generates dimensions, such as FD_PROTEC_0.

quality?string

Generates a quality slot.

style?string

Generates style.

response_format?string

Picture returns format, e. g. FD_PROTEC_0 or FD_PROTEC_1__.

user?string

End-user identification.

Response Body

application/json

curl -X POST "https://api.tokaify.com/v1/images/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-image-2",    "prompt": "The ability to describe this API gateway in plain Chinese."  }'
{
  "created": 1,
  "data": {}
}

How is this guide?

Last updated on