Quickstart
1. Create an account and top up your balance. 2. Create an API key in your dashboard and export it as TOKPORT_API_KEY. 3. Call the API.
Generate an image
Synchronous. The official OpenAI SDKs work unchanged: point them at https://api.tokport.io/v1.
curl https://api.tokport.io/v1/images/generations \
-H "Authorization: Bearer $TOKPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"a neon koi swimming through clouds, cinematic lighting","size":"1024x1024","n":1}'Generate a video
Asynchronous: submit a task, poll until status is completed, then download the clip.
curl https://api.tokport.io/v1/videos \
-H "Authorization: Bearer $TOKPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"seedance-2-0","prompt":"slow dolly-in on a coral reef at sunrise, sunbeams through the water","seconds":"5","ratio":"16:9"}'
# poll until status is "completed", then download
curl https://api.tokport.io/v1/videos/{id} -H "Authorization: Bearer $TOKPORT_API_KEY"
curl https://api.tokport.io/v1/videos/{id}/content -H "Authorization: Bearer $TOKPORT_API_KEY" -o clip.mp4Where to next
Every model has its own generated reference with all parameters: model reference. Endpoint guides: images, videos. Machine-readable: OpenAPI.