← Docs

Image Model Guide

Image models use different request shapes by supplier recipe. Pick a protocol tab below.

1. Basic Calling Information

ItemDescription
Base URL https://tokenhub.link
Endpoint POST /v1/images/generations (sync)
Authentication Authorization: Bearer <TokenHub API Key>. Create the key in API Keys in console.
Model Identifier Use model in body. See Model Catalog — e.g. wan2.6-t2i, tokenhub/gpt-image-2.
Content-Type application/json

2. Request body by supplier protocol

TokenHub routes by invocation recipe (bodyShape). Use the tab that matches your model supplier.

cURL example

curl -sS "https://tokenhub.link/v1/images/generations" \
  -H "Authorization: Bearer $TOKENHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tokenhub/gpt-image-2",
    "prompt": "一只橘猫在窗边,摄影风格",
    "size": "1024x1024",
    "n": 1
  }'

Key fields

  • prompt — required text prompt (flat JSON, no input.messages)
  • size — e.g. 1024x1024
  • output_format, watermark — optional