Serverless API quickstart
Send an image or speech request without managing a dedicated GPU session. ModelPilot can prepare the configured endpoint for these generation routes. Use a dedicated deployment for a ComfyUI workflow with custom nodes, LoRAs, or a model outside this API catalog.
Make your first image request
Create an API key in your dashboard and add prepaid credit. The model IDs below are the values accepted by the public generation routes.
curl -X POST https://modelpilot.ai/api/v1/generate/image \
-H "Authorization: Bearer mp_live_..." \
-H "Content-Type: application/json" \
-d '{"model":"flux-schnell","prompt":"a red apple on a white table"}'- A completed response contains an
imagesarray and the request cost. - A request waiting for a worker returns
status: "processing"and apoll_url. Poll that URL with your API key untilstatus: "completed"orstatus: "failed". - Keep the job ID and poll an existing job rather than submitting the same request again; a new submission can create another billable result.
Image and speech models
These prices come from the configuration used by execution billing. The image and audio /api/v1/generate routes charge on successful completion. Failed generations are not charged as successful requests. Configuration is not a live capacity check: startup, provider availability, and generation failures can still prevent a result.
Images · POST /api/v1/generate/image
| Model | Request model ID | Per successful request | First-start estimate |
|---|---|---|---|
| Flux Schnell | flux-schnell | $0.017 | About 30 sec |
| Flux Dev | flux-dev | $0.017 | About 30 sec |
| Stable Diffusion XL | sdxl | $0.014 | About 25 sec |
| Z-Image Turbo | zimage | $0.014 | About 25 sec |
Speech · POST /api/v1/generate/audio
| Model | Request model ID | Per successful request | First-start estimate |
|---|---|---|---|
| Kokoro TTS | kokoro | $0.009 | About 15 sec |
| Chatterbox Turbo | chatterbox | $0.017 | About 30 sec |
Use kokoro or chatterbox as the audio request’s model ID, with a text field. See the audio reference for supported parameters.
Chat needs an existing deployment
POST /api/v1/chat/completions routes to a model you have already deployed, or an existing serverless text endpoint owned by your account. Sending an arbitrary model name does not provision a new text endpoint. Dedicated deployments retain their time-based compute charges; the following per-request prices apply to configured serverless text endpoints.
| Model | Request model ID | Per successful request | First-start estimate |
|---|---|---|---|
| Qwen3 4B | qwen3-4b | $0.014 | About 3 min |
| Qwen3 8B | qwen3-8b | $0.019 | About 4 min |
| DeepSeek R1 8B | deepseek-r1-8b | $0.019 | About 4 min |
| GLM-Z1 9B | glm-z1-9b | $0.019 | About 5 min |
| DeepSeek R1 14B | deepseek-r1-14b | $0.047 | About 7 min |
| Qwen3 32B | qwen3-32b | $0.138 | About 12 min |
| GLM-Z1 32B | glm-z1-32b | $0.138 | About 12 min |
The public GET /api/models lists dedicated catalog configurations. It is not a list of ready API endpoints in your account. Use your dashboard to confirm what is deployed before integrating chat.
Plan for startup and cost
- The first-start times in the tables are configuration estimates, not measured guarantees. Model downloads, worker reuse, queueing, and capacity affect the wait.
- Handle processing, failure, and retryable errors in your application. A warm worker can be recycled, so one fast request does not promise the next request will be fast.
- At the configured rate, 10 successful Flux Schnell requests cost $0.17; doing that every day for 30 days costs $5.10. This is a request-count example, not a promise of output quality.
- Custom ComfyUI workflows use the dedicated path, where billable GPU time can include model downloads and startup. Stop or delete those resources when finished.
Video and custom workflows
The configured Wan serverless entry has no deployment image, so it is not an available hosted video API. For the dedicated Photo Animator workflow, read its guideand setup requirements, including manual inputs and remaining limitations, before launching. A deployed ComfyUI workspace still needs your workflow and inputs.