Skip to content

Wan 2.7 Image API

Wan 2.7 text-to-image

wan27-imageSynchronousimageLive price on TokPort: $0.065 per image

Calling the API

Base URL https://api.tokport.io, authenticated with Authorization: Bearer <key>. Create a key in your dashboard; the examples read it from TOKPORT_API_KEY. Every response carries an X-Oneapi-Request-Id header you can search in your usage log.

Text to image

POST /v1/images/generations · sync
curl https://api.tokport.io/v1/images/generations \
  -H "Authorization: Bearer $TOKPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"wan27-image","prompt":"a neon koi swimming through clouds, cinematic lighting","size":"1024x1024","n":1}'

Synchronous. `data[]` holds one entry per generated image with `url` (or `b64_json` when requested). The `X-Oneapi-Request-Id` response header identifies the request in your usage log.

Example response
{
  "created": 1726400000,
  "data": [
    {
      "url": "https://cdn.example.com/generated/abc.png",
      "revised_prompt": "a neon koi swimming through clouds, cinematic lighting"
    }
  ]
}

All fields: schema.

Errors

Errors are OpenAI-shaped: {"error": {"message", "type", "code"}}. Failed requests and failed tasks are not billed. See errors & limits.