Image and video APIs
Choose a model from the model catalog, then use its documented parameters. The catalog lists connected image and video models with links to their parameters. Check models and pricing for current prices and account access.
Start here
| Goal | Documentation |
|---|---|
| Find an image or video model | All models |
| Check image parameters and reference limits | Image model parameters |
| Check video parameters and reference limits | Video model parameters |
| Create, query, and download a video | Video task workflow |
| Generate directly in the browser | Open Canvas on the main site |
Address and authentication
The Base URL for OpenAI-compatible clients is https://api.popgo.site/v1. For direct HTTP requests, use the complete paths below with Authorization: Bearer YOUR_API_KEY.
| Purpose | Method | Path |
|---|---|---|
| Generate images | POST | /v1/images/generations |
| Edit images | POST | /v1/images/edits, only for models listed as supporting editing |
Shared image requests
Replace YOUR_MODEL with a model ID from the model catalog. Fill in the required fields shown for that model and refer to its table for documented optional fields and values.
Text to image
curl https://api.popgo.site/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL",
"prompt": "A quiet garden at sunrise",
"n": 1
}'
Submitting references
Reference input is not a universal interchangeable URL field. Check the model’s endpoint, Content-Type, field names, and count limits, then choose the applicable method:
JSON references: add the image array below to the generation request only when the model parameter table lists image as string | string[] and the reference request endpoint as /v1/images/generations. Use public direct image URLs or complete image Data URLs if that model supports them.
{ "image": ["YOUR_IMAGE_URL"] }
File references: use this template only when the model parameter table lists image as file[] and the reference request endpoint as /v1/images/edits. Repeat image for multiple files. Download URL media to a file first; do not put URL strings into file fields or set the multipart boundary manually.
curl https://api.popgo.site/v1/images/edits \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=YOUR_MODEL" \
-F "prompt=Keep the subject and change the background to a garden" \
-F "image=@reference.png"
Reading responses
For an HTTP 200 image result, process every item in data[]. Download data[].url promptly. Decode data[].b64_json, which has no Data URL prefix, and save the binary image. The model determines the response form; set response_format only if its parameter table lists it.
For HTTP 202, save id and the Location response header. Wait for Retry-After, then GET that site’s Location with the same API Key. An HTTP 200 query still requires checking status: keep waiting for pending, submitted, or processing; read data[] for succeeded; stop and read error for failed. For uncertain, retain the original task and query it or contact support instead of automatically generating again. Image and video task states differ.
For HTTP errors, read error and correct the fields or media. Do not automatically repeat POST after a network timeout, HTTP 202, or failed download: a new request may incur another charge. Never send your API Key to an external image download address.