Skip to main content
POST
/
v1
/
images
/
generations
Text-to-Image Generation
curl --request POST \
  --url https://www.anyfast.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "wan2.6-t2i",
  "prompt": "A cute cat in Studio Ghibli style",
  "n": 1,
  "size": "1024x1024",
  "response_format": "url"
}
'
{
  "created": 1773803391,
  "data": [
    {
      "url": "https://example.com/generated.png",
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Model ID

Available options:
wan2.6-t2i
Example:

"wan2.6-t2i"

prompt
string
required

Text description of the image to generate.

Example:

"A cute cat in Studio Ghibli style"

n
integer
default:1

Number of images to generate.

Required range: x >= 1
size
string

Output image size, e.g. 1024x1024, 768x1344.

Example:

"1024x1024"

response_format
enum<string>
default:url

Return a URL or base64-encoded JSON.

Available options:
url,
b64_json
Example:

"url"

Response

Image generated successfully

created
integer
Example:

1773803391

data
object[]