Skip to main content
POST
/
v1
/
images
/
zimage
Z-Image
curl --request POST \
  --url https://api.tensorslab.com/v1/images/zimage \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'prompt=<string>' \
  --form 'resolution=1024*1024' \
  --form seed=123 \
  --form prompt_extend=0
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "taskid": "<string>",
    "url": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API Key authentication, please include the Authorization field in the request header

Body

multipart/form-data
prompt
string

Prompt (required)

resolution
string
default:1024*1024

Image resolution: 9:16, 16:9, 1:1, 3:4, 4:3 or WxH

seed
integer

Random seed

prompt_extend
enum<string>

Extend prompt content, 1 for enabled

Available options:
0,
1

Response

200 - application/json

Request successful

General response

code
integer
required

Response status code: 1000=Success, 9999=Failure, 9000=Insufficient Credits

msg
string
required

Response message

data
object
required

General data response