English

Media jobs

Submit, poll, cancel, and retrieve the results of an asynchronous job.

Media jobs

Submit a quoted job

curl "https://api.apimodel.store/v1/jobs" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Idempotency-Key: YOUR_UNIQUE_REQUEST_KEY" \
  -H "Content-Type: application/json" \
  --data '{"model":"nano-banana-2-1","prompt":"A ceramic cup in soft morning light","parameters":{"resolution":"1K"},"max_price_usd":"0.05"}'

Poll the job

curl "https://api.apimodel.store/v1/jobs/$MODELPORT_JOB_ID" \
  -H "Authorization: Bearer $MODELPORT_API_KEY"

Request cancellation

curl -X POST "https://api.apimodel.store/v1/jobs/$MODELPORT_JOB_ID/cancel" \
  -H "Authorization: Bearer $MODELPORT_API_KEY"

Replace the example price cap with the maximum you accept. Reuse the same idempotency key when retrying the same request. Fetch files[].url with your key. Outputs are retained for 30 days and then return HTTP 410.

Create temporary download links

curl "https://api.apimodel.store/v1/jobs/$MODELPORT_JOB_ID/download-links" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"expires_in":900}'

After completion, anyone holding a temporary files[].url can download it until expires_at (Unix milliseconds). Links default to 15 minutes and can last up to 24 hours, within the output retention period.

Configure a completion webhook