Production-oriented quickstarts for building with APIDot APIs.
APIDot gives developers one API key for production-ready image, video, chat, music, and 3D models. This repository contains small examples for server-side API calls, including async media generation and direct chat requests.
These focused repositories are built as model-level API quickstarts with cURL, Node.js, polling, webhooks, pricing context, and production notes.
| Model | Repository | APIDot links |
|---|---|---|
| GPT Image 2 | GPT Image 2 API examples | Model page · API docs |
| Nano Banana 2 | Nano Banana 2 API examples | Model page · API docs |
| Nano Banana Pro | Nano Banana Pro API examples | Model page · API docs |
| Seedream 4.5 | Seedream 4.5 API examples | Model page · API docs |
| Model | Repository | APIDot links |
|---|---|---|
| Seedance 2 | Seedance 2 API examples | Model page · API docs |
| Sora 2 Official | Sora 2 Official API examples | Model page · API docs |
| Happy Horse | Happy Horse API examples | Model page · API docs |
| Veo 3.1 | Veo 3.1 API examples | Model page · API docs |
| Example | What it covers |
|---|---|
| curl/image/gpt-image-2.md | Submit a GPT Image 2 text-to-image job with cURL. |
| curl/image/flux-2.md | Submit a FLUX.2 image job with cURL. |
| curl/image/flux-kontext.md | Submit a Flux Kontext image job with cURL. |
| curl/image/nano-banana-2.md | Submit a Nano Banana 2 image job with cURL. |
| curl/image/nano-banana-pro.md | Submit a Nano Banana Pro image job with cURL. |
| curl/image/seedream-4-5.md | Submit a Seedream 4.5 image job with cURL. |
| curl/image/seedream-5-0-lite.md | Submit a Seedream 5.0 Lite image job with cURL. |
| curl/image/wan-2-7-image.md | Submit a Wan 2.7 Image job with cURL. |
| curl/image/z-image.md | Submit a Z-Image text-to-image job with cURL. |
| curl/video/seedance-2.md | Submit a Seedance 2 video job with cURL. |
| curl/video/sora-2-official.md | Submit a Sora 2 Official video job with cURL. |
| curl/video/happy-horse.md | Submit a Happy Horse video job with cURL. |
| curl/video/veo-3-1.md | Submit a Veo 3.1 video job with cURL. |
| curl/music/generate-music.md | Submit a Generate Music job with cURL. |
| curl/music/minimax-music-2-6.md | Submit a MiniMax Music 2.6 job with cURL. |
| curl/3d/meshy-6-3d.md | Submit a Meshy 6 3D job with cURL. |
| curl/3d/tripo-h31-3d.md | Submit a Tripo H3.1 3D job with cURL. |
| curl/3d/tripo-p1-3d.md | Submit a Tripo P1 3D job with cURL. |
| curl/chat/claude-4-6.md | Send a Claude 4.6 Messages request with cURL. |
| curl/chat/gemini-3.md | Send a Gemini 3 native request with cURL. |
| curl/chat/claude-4-5.md | Send a Claude 4.5 Messages request with cURL. |
These examples show backend integration patterns with native fetch. They are not a model-by-model catalog; use the cURL quickstarts above for model-level request shapes.
| Example | What it covers |
|---|---|
| node/gpt-image-2 | Run a GPT Image 2 job from Node.js with native fetch. |
| node/seedance-2 | Run a Seedance 2 job from Node.js with native fetch. |
| node/gemini-3 | Send a direct Gemini 3 chat request from Node.js. |
| node/generate-music | Run a Generate Music job from Node.js with native fetch. |
| node/meshy-6-3d | Run a Meshy 6 3D job from Node.js with native fetch. |
| Example | What it covers |
|---|---|
| polling/task-status.md | Poll /api/generate/status/{task_id} until a task finishes. |
| webhooks/express-webhook | Receive APIDot callbacks with a minimal Express server. |
| webhooks/nextjs-route-handler.md | Receive APIDot callbacks in a Next.js App Router route handler. |
- APIDot API key.
- Node.js 18 or newer for Node.js and webhook examples.
curlfor cURL examples.
Create an API key in the APIDot dashboard, then keep it on the server side.
cp .env.example .envAPIDOT_API_KEY=YOUR_API_KEY_HERE
# Optional: uncomment only when you have a real public webhook receiver.
# APIDOT_CALLBACK_URL=https://example.com/api/apidot/webhook
# Optional for local webhook demos only. Do not use this in production.
# APIDOT_ALLOW_UNLISTED_TASK_IDS=true
# Optional local allowlist. Use a database lookup in production.
# APIDOT_KNOWN_TASK_IDS=task-unified-example- Submit a generation request:
POST https://api.apidot.ai/api/generate/submit
Authorization: Bearer <APIDOT_API_KEY>
Content-Type: application/json- Store the returned
data.task_idimmediately. - Retrieve the result with polling:
GET https://api.apidot.ai/api/generate/status/{task_id}
Authorization: Bearer <APIDOT_API_KEY>- Or pass
callback_urlduring submit and receive a webhook when the task reaches a terminal state.
- Keep API keys out of browser code and public repositories.
- Treat webhooks as idempotent. Duplicate deliveries should not create duplicate user-visible results.
- Only process webhook
task_idvalues that your system submitted and recorded. - Persist task ids before starting polling or waiting for callbacks.
- Make webhook idempotency durable. Do not rely only on an in-memory
Mapin production. - Retry transient failures with backoff, but do not retry invalid payloads unchanged.
- Check the dashboard and current docs for credit behavior, especially for failed or cancelled tasks.
- Website: https://apidot.ai
- Docs: https://apidot.ai/docs
- Models: https://apidot.ai/models
- Support: support@apidot.ai
- License: MIT
Issues and PRs are welcome.