Skip to main content
Serverless Quickstart

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 images array and the request cost.
  • A request waiting for a worker returns status: "processing" and a poll_url. Poll that URL with your API key until status: "completed" or status: "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

ModelRequest model IDPer successful requestFirst-start estimate
Flux Schnellflux-schnell$0.017About 30 sec
Flux Devflux-dev$0.017About 30 sec
Stable Diffusion XLsdxl$0.014About 25 sec
Z-Image Turbozimage$0.014About 25 sec

Speech · POST /api/v1/generate/audio

ModelRequest model IDPer successful requestFirst-start estimate
Kokoro TTSkokoro$0.009About 15 sec
Chatterbox Turbochatterbox$0.017About 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.

ModelRequest model IDPer successful requestFirst-start estimate
Qwen3 4Bqwen3-4b$0.014About 3 min
Qwen3 8Bqwen3-8b$0.019About 4 min
DeepSeek R1 8Bdeepseek-r1-8b$0.019About 4 min
GLM-Z1 9Bglm-z1-9b$0.019About 5 min
DeepSeek R1 14Bdeepseek-r1-14b$0.047About 7 min
Qwen3 32Bqwen3-32b$0.138About 12 min
GLM-Z1 32Bglm-z1-32b$0.138About 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.

Full API reference · Pricing · Your dashboard