DOCUMENTATION
Meldport API
Make your first request, generate media, and track usage.
QUICKSTART
Your first request
Choose a published model, create one project API key in the console, and send a request to the shared gateway endpoint. GET /v1/models lists the Meldport model IDs; existing model IDs remain valid for requests.
https://api.meldport.com/v1curl https://api.meldport.com/v1/chat/completions \
-H "Authorization: Bearer $MELDPORT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: request-123" \
-d '{
"model": "YOUR_MODEL_ID",
"messages": [{"role": "user", "content": "Hello"}]
}'import os
import requests
response = requests.post(
"https://api.meldport.com/v1/chat/completions",
headers={
"Authorization": f"Bearer {os.environ['MELDPORT_API_KEY']}",
"Idempotency-Key": "request-123",
},
json={
"model": "YOUR_MODEL_ID",
"messages": [{"role": "user", "content": "Hello"}],
},
)
print(response.json())const response = await fetch(
"https://api.meldport.com/v1/chat/completions",
{
method: "POST",
headers: {
Authorization: "Bearer " + process.env.MELDPORT_API_KEY,
"Content-Type": "application/json",
"Idempotency-Key": "request-123",
},
body: JSON.stringify({
model: "YOUR_MODEL_ID",
messages: [{ role: "user", content: "Hello" }],
}),
},
);
console.log(await response.json());AUTHENTICATION
Use a scoped API key
Send the key as a Bearer token. Keys are scoped to a project and can be revoked or rotated from the console without changing your application code.
API KEY POLICY
One key covers the published catalog
A project key created in the dashboard includes catalog reads, LLM inference, image generation, video generation, and audio generation scopes. The model allowlist is intentionally empty, which means every currently published model in that project is available.
- Keys are project-scoped and can carry request, daily, spend, and output limits.
- API keys with a daily spend limit can use fixed-price media only. Actual-cost jobs require a key without a daily spend limit.
- Existing older keys may still have narrower scopes; create a new all-product key when Media access is needed.
- Reusing an
Idempotency-Keywith another payload is rejected rather than creating a second request.
REQUESTS
Request body
The gateway accepts the familiar Chat Completions shape. Model IDs and capabilities are listed in the public model catalog.
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | Yes | Stable public model ID. |
messages | array | Yes | Ordered system, user, assistant, or tool messages. |
stream | boolean | No | Use Server-Sent Events when true. |
max_tokens | integer | No | Output limit; defaults to 512 when omitted. Requests above 65,536 are capped to 65,536. |
max_completion_tokens | integer | No | Alternative output limit for clients that include reasoning tokens. The same 65,536 cap applies. |
tools | array | No | Tool definitions for models that publish tool support. |
In an OpenAI-compatible IDE, set the base URL above, use a published meldport/... model ID, and configure the model's output limit at or below 65,536 tokens. Meldport accepts larger client-advertised limits but runs the request with the supported cap. A key's own output limit can be lower.
Idempotency-Key is recommended for non-stream requests. Reusing a key with a different payload returns a conflict instead of silently creating a second request.
{
"id": "req_01J...",
"object": "chat.completion",
"model": "meldport/qwen3.8-max",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello"
}
}
],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 3,
"total_tokens": 11
}
}STREAMING
Read the response as events
Streaming responses use Server-Sent Events. Process each data frame in order and treat data: [DONE] as the terminal marker.
curl -N https://api.meldport.com/v1/chat/completions \
-H "Authorization: Bearer $MELDPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"stream": true,
"stream_options": {"include_usage": true},
"messages": [{"role": "user", "content": "Hello"}]
}'IMAGE API
Run an asynchronous image job
List published image configurations, select one by ID, then submit a prompt. The configuration owns its accepted inputs, output types, maximum charge, and retention window. Use the images:generate scope.
curl https://api.meldport.com/v1/media/configurations \
-H "Authorization: Bearer $MELDPORT_API_KEY"
# Quote the exact prompt and options before reserving wallet credit
curl -X POST https://api.meldport.com/v1/media/quotes \
-H "Authorization: Bearer $MELDPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"configuration_id":"<published-configuration-id>","prompt":"A quiet studio desk"}'
# Use the same prompt, options and uploaded asset IDs as the quote.
# Include billing_policy_version: actual-cost-v1 when returned by the quote.
# Create a job with a published configuration
curl -X POST https://api.meldport.com/v1/media/jobs \
-H "Authorization: Bearer $MELDPORT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: media-request-123" \
-d '{"configuration_id":"<published-configuration-id>","prompt":"A quiet studio desk","accepted_customer_price_microusd":"<customer_price_microusd from quote>","accepted_maximum_reservation_microusd":"<maximum_reservation_microusd from quote>"}'
# Poll the job until it is succeeded or failed
curl https://api.meldport.com/v1/media/jobs/<job-id> \
-H "Authorization: Bearer $MELDPORT_API_KEY"{
"job": {
"id": "8f05b647-1a44-4f13-9a4e-7be283221ad2",
"configuration_id": "e06a4324-3b43-4c55-ae84-c6a9b6a6d452",
"state": "queued",
"billing_state": "held",
"maximum_charge_microusd": "125000",
"output_asset_id": null
},
"idempotent": false
}Idempotency-Key replays the same compatible job; a new key intentionally requests a new (stochastic) generation even when its prompt and options match an earlier job.VIDEO API
Submit once, then follow the job state
Video uses /v1/media/jobs with a published video configuration and the videos:generate scope. A create call returns a job, not a finished file. Poll the job until it reaches a terminal state, then request its project-owned output.
curl https://api.meldport.com/v1/media/configurations \
-H "Authorization: Bearer $MELDPORT_API_KEY"
# Quote the exact prompt and options before reserving wallet credit
curl -X POST https://api.meldport.com/v1/media/quotes \
-H "Authorization: Bearer $MELDPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"configuration_id":"<published-configuration-id>","prompt":"A quiet studio desk"}'
# Use the same prompt, options and uploaded asset IDs as the quote.
# Include billing_policy_version: actual-cost-v1 when returned by the quote.
# Create a job with a published configuration
curl -X POST https://api.meldport.com/v1/media/jobs \
-H "Authorization: Bearer $MELDPORT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: media-request-123" \
-d '{"configuration_id":"<published-configuration-id>","prompt":"A quiet studio desk","accepted_customer_price_microusd":"<customer_price_microusd from quote>","accepted_maximum_reservation_microusd":"<maximum_reservation_microusd from quote>"}'
# Poll the job until it is succeeded or failed
curl https://api.meldport.com/v1/media/jobs/<job-id> \
-H "Authorization: Bearer $MELDPORT_API_KEY"{
"job": {
"id": "8f05b647-1a44-4f13-9a4e-7be283221ad2",
"configuration_id": "e06a4324-3b43-4c55-ae84-c6a9b6a6d452",
"state": "queued",
"billing_state": "held",
"maximum_charge_microusd": "125000",
"output_asset_id": null
},
"idempotent": false
}AUDIO API
Generate with a published audio configuration
List configurations and select one with modality audio. Quote your exact text with POST /v1/media/quotes, then submit POST /v1/media/jobs with the audio:generate scope. Supply required options such as voice, and accept actual-cost billing when the configuration requires it. Poll the job and download the settled output.
Model API references
This index uses the current published catalog. Each model page contains its request example, capabilities and prices. Media pages list every published configuration, its options and its exact API configuration ID.
| Model | API | Request reference |
|---|---|---|
MiniMax M2.7meldport/minimax-m2.7 | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K2.7 Codemeldport/kimi-k2.7 | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M3meldport/minimax-m3 | POST /v1/chat/completions | Parameters, examples and pricing |
Gemini 4 Argonmeldport/gemini-4-argon | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4.1 Flashmeldport/deepseek-v4.1-flash | POST /v1/chat/completions | Parameters, examples and pricing |
claude-sonnet-5meldport/claude-sonnet-5 | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V3.2 (Kiro)meldport/deepseek-3.2-kiro | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Opus 4.8meldport/claude-opus-4.8 | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Opus 5meldport/claude-opus-5 | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Sonnet 5.5meldport/claude-sonnet-5.5 | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen3 Coder Next (Kiro)meldport/qwen3-coder-next-kiro | POST /v1/chat/completions | Parameters, examples and pricing |
claude-haiku-4.5meldport/claude-haiku-4.5 | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4 Flash 0731meldport/deepseek-v4-flash-0731-alicn | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K2.7 Code HighSpeedmeldport/kimi-k2.7-code-highspeed | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M2.5 HighSpeedmeldport/minimax-m2.5-highspeed | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M3.1 Flash Previewmeldport/minimax-m3.1-flash-preview | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M2.7 HighSpeedmeldport/minimax-m2.7-highspeed | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M2.1 HighSpeedmeldport/minimax-m2.1-highspeed | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M2meldport/minimax-m2 | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M3.1 Flashmeldport/minimax-m3.1-flash | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M2.1meldport/minimax-m2.1 | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4.1 Flash Fastmeldport/deepseek-v4.1-flash-fast | POST /v1/chat/completions | Parameters, examples and pricing |
MiMo V2.6 Flashmeldport/mimo-v2.6-flash | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen3.7 Maxmeldport/qwen3.7-max | POST /v1/chat/completions | Parameters, examples and pricing |
MiMo V2.6 Promeldport/mimo-v2.6-pro | POST /v1/chat/completions | Parameters, examples and pricing |
Mistral Large 4meldport/mistral-large-4 | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen3.7 Plusmeldport/qwen3.7-plus | POST /v1/chat/completions | Parameters, examples and pricing |
GLM 5.3 FlashXmeldport/glm-5.3-flashx | POST /v1/chat/completions | Parameters, examples and pricing |
LongCat 2.0meldport/longcat-2.0 | POST /v1/chat/completions | Parameters, examples and pricing |
Grok 4.7 Fastmeldport/grok-4.7-build-fast | POST /v1/chat/completions | Parameters, examples and pricing |
Grok 4.7meldport/grok-4.7 | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K3.1 Pro HighSpeedmeldport/kimi-k3.1-pro-highspeed | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi For Coding (K2.8 Preview)meldport/kimi-for-coding | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K3.1 Promeldport/kimi-k3.1-pro | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi For Coding HighSpeed (K2.7 Code)meldport/kimi-for-coding-highspeed | POST /v1/chat/completions | Parameters, examples and pricing |
Muse Spark 1.2meldport/muse-spark-1.2 | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Sonnet 4.6meldport/claude-sonnet-4.6 | POST /v1/chat/completions | Parameters, examples and pricing |
MiniMax M2.5meldport/minimax-m2.5 | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen3.8 Flashmeldport/qwen3.8-flash | POST /v1/chat/completions | Parameters, examples and pricing |
GPT 6.1 Solmeldport/gpt-6.1-sol | POST /v1/chat/completions | Parameters, examples and pricing |
GPT 6 Astrameldport/gpt-6-astra | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Opus 4.1meldport/claude-opus-4.1 | POST /v1/chat/completions | Parameters, examples and pricing |
claude-sonnet-4.5meldport/claude-sonnet-4.5 | POST /v1/chat/completions | Parameters, examples and pricing |
GPT-6 Astra Promeldport/gpt-6-astra-pro | POST /v1/chat/completions | Parameters, examples and pricing |
GPT-6.1 Sol Promeldport/gpt-6.1-sol-pro | POST /v1/chat/completions | Parameters, examples and pricing |
GPT-6 Luna Promeldport/gpt-6-luna-pro | POST /v1/chat/completions | Parameters, examples and pricing |
GPT-6 Sol Promeldport/gpt-6-sol-pro | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Opus 4.7 (1M)meldport/claude-opus-4.7 | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Opus 4.5meldport/claude-opus-4.5 | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Opus 4.6meldport/claude-opus-4.6 | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Haiku 5.5meldport/claude-haiku-5.5 | POST /v1/chat/completions | Parameters, examples and pricing |
GPT 6.1 Terrameldport/gpt-6.1-terra | POST /v1/chat/completions | Parameters, examples and pricing |
GPT 6 Solmeldport/gpt-6-sol | POST /v1/chat/completions | Parameters, examples and pricing |
GLM 5.3 Flashmeldport/glm-5.3-flash | POST /v1/chat/completions | Parameters, examples and pricing |
Muse Wonder 1.0meldport/muse-wonder-1.0 | POST /v1/chat/completions | Parameters, examples and pricing |
Muse Spark 1.1meldport/muse-spark-1.1 | POST /v1/chat/completions | Parameters, examples and pricing |
Gemini 3.1 Promeldport/gemini-3.1-pro | POST /v1/chat/completions | Parameters, examples and pricing |
GPT 5.3 Codexmeldport/gpt-5.3-codex | POST /v1/chat/completions | Parameters, examples and pricing |
Gemini 2.5 Flash Imagemeldport/gemini-2.5-flash-image | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen3.8 27Bmeldport/qwen3.8-27b | POST /v1/chat/completions | Parameters, examples and pricing |
glm-5.2meldport/glm-5.2 | POST /v1/chat/completions | Parameters, examples and pricing |
GLM 5.3meldport/glm-5.3 | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen3.8 Omni Flashmeldport/qwen3.8-omni-flash | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen 3.8 Maxmeldport/qwen3.8-max | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K3 (256K)meldport/k3-256k-kc | POST /v1/chat/completions | Parameters, examples and pricing |
GLM-5.1 (flagship)meldport/glm-5.1 | POST /v1/chat/completions | Parameters, examples and pricing |
GLM-4.6V (vision)meldport/glm-4.6v | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen3.8 2.4T-A95Bmeldport/qwen3.8-2.4t-a95b | POST /v1/chat/completions | Parameters, examples and pricing |
Qwen3.8 Max 0902meldport/qwen3.8-max-0902 | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4 Pro 0813meldport/deepseek-v4-pro-0813-ali | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4 Flashmeldport/deepseek-v4-flash | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4 Promeldport/deepseek-v4-pro | POST /v1/chat/completions | Parameters, examples and pricing |
Muse Spark 1.2 Contributormeldport/muse-spark-1.2-contributor | POST /v1/chat/completions | Parameters, examples and pricing |
Grok 4.5meldport/grok-4.5 | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Opus 4.6meldport/claude-opus-4.6-thinking | POST /v1/chat/completions | Parameters, examples and pricing |
claude-fable-5meldport/claude-fable-5 | POST /v1/chat/completions | Parameters, examples and pricing |
Claude Fable 5.1meldport/claude-fable-5.1 | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K3 (256K)meldport/k3-256k-kcai | POST /v1/chat/completions | Parameters, examples and pricing |
GPT 5.6 Solmeldport/gpt-5.6-sol | POST /v1/chat/completions | Parameters, examples and pricing |
Terrameldport/gpt-5.6-terra | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K3meldport/kimi-k3 | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4.1 Flash 1017meldport/deepseek-v4.1-flash-1017 | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K2.7 Codemeldport/kimi-k2.7-code | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4 Pro 0813meldport/deepseek-v4-pro-0813-alicn | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K2.6meldport/kimi-k2.6 | POST /v1/chat/completions | Parameters, examples and pricing |
GPT 5.6 Lunameldport/gpt-5.6-luna | POST /v1/chat/completions | Parameters, examples and pricing |
DeepSeek V4 Flash 0731meldport/deepseek-v4-flash-0731-ali | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K2.5meldport/kimi-k2.5 | POST /v1/chat/completions | Parameters, examples and pricing |
Hy3meldport/hy3 | POST /v1/chat/completions | Parameters, examples and pricing |
Gemini 4 Argon Contributormeldport/gemini-4-argon-contributor | POST /v1/chat/completions | Parameters, examples and pricing |
MiMo V2.5meldport/mimo-v2.5 | POST /v1/chat/completions | Parameters, examples and pricing |
Step 5 Previewmeldport/step-5-preview | POST /v1/chat/completions | Parameters, examples and pricing |
Space Bunnymeldport/space-bunny | POST /v1/chat/completions | Parameters, examples and pricing |
Kimi K2.8 Previewmeldport/kimi-k2.8-preview | POST /v1/chat/completions | Parameters, examples and pricing |
GPT 6 Lunameldport/gpt-6-luna | POST /v1/chat/completions | Parameters, examples and pricing |
Gemini 3.8 Flashmeldport/gemini-3.8-flash | POST /v1/chat/completions | Parameters, examples and pricing |
Muse Spark 1.3 Contributormeldport/muse-spark-1.3-contributor | POST /v1/chat/completions | Parameters, examples and pricing |
| Fish Audio S2.1 Pro | POST /v1/media/jobstext to audio | Configurations and request examples |
| HeyGen Voice 1.0 | POST /v1/media/jobstext to audio | Configurations and request examples |
| HeyGen Voice 1.0 Turbo | POST /v1/media/jobstext to audio | Configurations and request examples |
| MiniMax Music 2.6 | POST /v1/media/jobstext to audio | Configurations and request examples |
| MiniMax Speech 2.8 | POST /v1/media/jobstext to audio | Configurations and request examples |
| Qwen3-TTS 1.7B CustomVoice | POST /v1/media/jobstext to audio | Configurations and request examples |
| xAI Text-to-Speech | POST /v1/media/jobstext to audio | Configurations and request examples |
| Bria 3.2 | POST /v1/media/jobstext to image | Configurations and request examples |
| Bria FIBO 2.0 | POST /v1/media/jobstext to image | Configurations and request examples |
| Bria FIBO 2.0 Edit | POST /v1/media/jobsimage to image | Configurations and request examples |
| Bria FIBO Lite | POST /v1/media/jobstext to image | Configurations and request examples |
| FLUX 3 Image | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| FLUX.1 Kontext [max] | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| FLUX.1 Kontext [pro] | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| FLUX.1.1 [pro] | POST /v1/media/jobstext to image | Configurations and request examples |
| FLUX.1.1 [pro] Ultra | POST /v1/media/jobstext to image | Configurations and request examples |
| FLUX.2 [flex] | POST /v1/media/jobstext to image | Configurations and request examples |
| FLUX.2 [max] | POST /v1/media/jobstext to image | Configurations and request examples |
| FLUX.2 [pro] | POST /v1/media/jobstext to image | Configurations and request examples |
| Grok Imagine Image | POST /v1/media/jobstext to image | Configurations and request examples |
| Grok Imagine Image 2.0 | POST /v1/media/jobstext to image | Configurations and request examples |
| Ideogram 2.0 | POST /v1/media/jobstext to image | Configurations and request examples |
| Ideogram 2.0 Remix | POST /v1/media/jobsimage to image | Configurations and request examples |
| Ideogram 2a | POST /v1/media/jobstext to image | Configurations and request examples |
| Ideogram 2a Remix | POST /v1/media/jobsimage to image | Configurations and request examples |
| Ideogram 3.0 | POST /v1/media/jobstext to image | Configurations and request examples |
| Ideogram 3.0 Remix | POST /v1/media/jobsimage to image | Configurations and request examples |
| Ideogram 4.0 | POST /v1/media/jobstext to image | Configurations and request examples |
| Ideogram 4.0q | POST /v1/media/jobstext to image | Configurations and request examples |
| Ideogram 4.5 | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Ideogram 4.5 Precise Edit | POST /v1/media/jobsimage to image | Configurations and request examples |
| ImagineArt 1.5 | POST /v1/media/jobstext to image | Configurations and request examples |
| ImagineArt 1.5 Pro | POST /v1/media/jobstext to image | Configurations and request examples |
| ImagineArt 2.0 | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Kling IMAGE 3.0 | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Kling IMAGE O1 | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Kling IMAGE O3 | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Krea 2 Large | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Krea 2 Medium | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Krea 2 Medium Turbo | POST /v1/media/jobstext to image | Configurations and request examples |
| Krea 2 Raw | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Krea 2 Turbo | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Muse Image | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| P-Image | POST /v1/media/jobstext to image | Configurations and request examples |
| P-Image-Edit | POST /v1/media/jobsimage to image | Configurations and request examples |
| P-Image-Ideogram | POST /v1/media/jobstext to image | Configurations and request examples |
| Qwen-Image-2.0 | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Qwen-Image-2.0-Pro | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Qwen-Image-2.1-Pro | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Qwen-Image-2.1-Turbo | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Qwen-Image-3.0 | POST /v1/media/jobstext to image | Configurations and request examples |
| Qwen-Image-3.0-Pro | POST /v1/media/jobstext to image | Configurations and request examples |
| Qwen-Image-Edit-2511 | POST /v1/media/jobsimage to image | Configurations and request examples |
| Recraft V4 | POST /v1/media/jobstext to image | Configurations and request examples |
| Recraft V4 Pro | POST /v1/media/jobstext to image | Configurations and request examples |
| Recraft V4.1 | POST /v1/media/jobstext to image | Configurations and request examples |
| Recraft V4.1 Flash | POST /v1/media/jobstext to image | Configurations and request examples |
| Recraft V4.1 Pro | POST /v1/media/jobstext to image | Configurations and request examples |
| Recraft V4.1 Utility | POST /v1/media/jobstext to image | Configurations and request examples |
| Recraft V4.1 Utility Pro | POST /v1/media/jobstext to image | Configurations and request examples |
| Runway Gen-4 Image | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Runway Gen-4 Image Turbo | POST /v1/media/jobsimage to image | Configurations and request examples |
| Seedream 4.0 | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Seedream 4.5 | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Seedream 5.0 Flash | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Seedream 5.0 Lite | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Seedream 5.0 Pro | POST /v1/media/jobstext to image | Configurations and request examples |
| UNI-1 | POST /v1/media/jobstext to image | Configurations and request examples |
| UNI-1 Max | POST /v1/media/jobstext to image | Configurations and request examples |
| Vidu Q1 | POST /v1/media/jobsimage to image | Configurations and request examples |
| Wan2.5-Preview Image | POST /v1/media/jobstext to image | Configurations and request examples |
| Wan2.6 Image | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Wan2.7 Image | POST /v1/media/jobsimage to image, text to image | Configurations and request examples |
| Wan2.7 Image Pro | POST /v1/media/jobstext to image, image to image | Configurations and request examples |
| Grok Imagine Video | POST /v1/media/jobsimage to video, text to video | Configurations and request examples |
| LTX-2 | POST /v1/media/jobsimage to video | Configurations and request examples |
| MiniMax 01 Live | POST /v1/media/jobsimage to video | Configurations and request examples |
| MiniMax H3 Max Turbo | POST /v1/media/jobsimage to video | Configurations and request examples |
| MiniMax Hailuo 2.3 | POST /v1/media/jobstext to video, image to video | Configurations and request examples |
| Runway Gen-4 Turbo | POST /v1/media/jobsimage to video | Configurations and request examples |
| Vidu 2.0 | POST /v1/media/jobsimage to video | Configurations and request examples |
| Vidu Q1 | POST /v1/media/jobsimage to video, text to video | Configurations and request examples |
| Vidu Q1 Classic | POST /v1/media/jobsimage to video | Configurations and request examples |
| Vidu Q2 Pro | POST /v1/media/jobsimage to video | Configurations and request examples |
| Vidu Q2 Turbo | POST /v1/media/jobsimage to video | Configurations and request examples |
| Wan2.6 | POST /v1/media/jobstext to video, image to video | Configurations and request examples |
Upload an input image
Image editing and image-to-video configurations need an uploaded input asset. Upload and generate with the same API key and project. An asset uploaded in the browser session cannot be used as an API-key input.
Read input_requirements, max_input_bytes and allowed_options from GET /v1/media/configurations. They define the input dimensions, prompt limits, required voice and other permitted options for the selected configuration. The example uploads one PNG and does not generate anything.
import {readFile} from "node:fs/promises";
import {createHash} from "node:crypto";
const api = "https://api.meldport.com";
const key = process.env.MELDPORT_API_KEY;
const image = await readFile("./input.png");
const response = await fetch(api + "/v1/media/assets/upload-url", {
method: "POST", headers: {Authorization: `Bearer ${key}`, "Content-Type": "application/json"},
body: JSON.stringify({configuration_id: "YOUR_CONFIGURATION_ID", modality: "image",
content_type: "image/png", size_bytes: image.length,
sha256: createHash("sha256").update(image).digest("hex")})
});
const upload = await response.json();
if (!response.ok) throw new Error(JSON.stringify(upload.error));
const stored = await fetch(upload.upload_url, {method: "PUT", headers: {"Content-Type": "image/png"}, body: image});
if (stored.status !== 201) throw new Error(`Upload failed: ${stored.status}`);
console.log(upload.asset_id);For an image-to-video configuration, set modality to video. The file remains an image. Use the returned asset_id in input_asset_ids for both the quote and the job.
Poll and download the result
Keep the job ID returned by the create request. Poll that job with backoff. A new job ID or idempotency key starts a separate paid generation.
const api = "https://api.meldport.com";
const key = process.env.MELDPORT_API_KEY;
const id = process.env.MELDPORT_JOB_ID;
const headers = {Authorization: `Bearer ${key}`};
const response = await fetch(api + "/v1/media/jobs/" + id, {headers});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result.error));
if (result.job.state === "succeeded" && result.job.billing_state === "settled") {
const response = await fetch(api + "/v1/media/jobs/" + id + "/download-url", {method: "POST", headers});
const ticket = await response.json();
if (!response.ok) throw new Error(JSON.stringify(ticket.error));
console.log(new URL(ticket.download_url, api).href);
} else {
console.log(result.job.state, result.job.error_code);
}A failed job releases its hold once failure is verified. A reconciling job has an unresolved provider, output or billing state. Continue checking the same job. Signed download URLs expire; request a fresh link for the existing job instead of generating again.
MODELS
A catalog record is not automatically available
Meldport uses one identity, project hierarchy, and USD service-credit wallet while keeping each product contract separate.
| Surface | Available now | How it works |
|---|---|---|
| LLM Gateway | Yes, for published models | Chat Completions requests, streaming, tools, and usage. |
| Image, video, and audio | Only when a verified configuration is published | API-first async jobs, private assets, polling, and signed delivery. |
| GPU Compute | Planned, not provisionable | Future whole-server SSH profile after contract and reliability gates. |
Variable media charges
Call POST /v1/media/quotes with the same configuration, prompt, options, and input assets before submitting a job. Copy its exact customer_price_microusd and maximum_reservation_microusd values into the job fields accepted_customer_price_microusd and accepted_maximum_reservation_microusd. If either amount changes, the API rejects the job so you can quote and accept the current values again. For speech models priced per character or UTF-8 byte, the quote uses the exact text length. It does not reserve credit or start a generation. A required voice appears in the configuration's allowed options and must be supplied as options.voice. If the input requirements specify billing_policy_version: actual-cost-v1, the displayed quote is an initial reservation, not a fixed final price. Quote again if the configuration or text changes.
To accept this billing policy, send "billing_policy_version": "actual-cost-v1" in the job request. Without consent, the request is rejected before generation. Final pricing is the recorded generation cost plus the configuration markup saved when the request was accepted, rounded up to one micro-USD.
Unused reserved credit is released. An additional charge is recorded in wallet history if the final amount is higher. Your wallet can reach at most -$0.10 across all completed jobs; new paid requests require sufficient available credit. Top-ups repay an outstanding balance first.
Poll the job for billing_adjustment: total charge, additional charge, and released credit, all in micro-USD. A confirmed failed generation releases its hold. An uncertain provider outcome stays pending reconciliation; retry the same idempotency key rather than creating another generation.
GPU COMPUTE · PLANNED
Compute is discovery-only for now
GPU compute is not available yet. Check the Compute page for availability.
ERRORS AND RETRIES
Handle request states and retries
Errors are JSON responses with a stable type and code. Keep the request ID when opening a support ticket.
x-request-id. Never include API keys, prompts, or customer content in a support ticket unless support explicitly asks for a redacted sample.| Status | Meaning | What to do |
|---|---|---|
401 | Missing or invalid API key. | Check the Bearer token and project scope. |
402 | No selected funding source can cover the hold. | Top up PAYG credit or buy value for the exact model. |
403 | Account, policy, or model access is not eligible. | Review the console state before retrying. |
409 | Idempotency key was reused with another payload. | Use a new key for a new request. |
429 | Rate or capacity limit. | Respect Retry-After when present. |
5xx | Temporary gateway or upstream failure. | Retry only when the response is safely retryable. |
PAY AS YOU GO
Settle the actual request against wallet credit
Prices are shown per model in the catalog. Input, output, and cache usage are recorded in the wallet ledger with a request ID for reconciliation.
x-request-ididentifies the request across support and usage views.x-meldport-request-statusexposes the safe terminal or in-progress state.x-meldport-fundingrecords the selected wallet, promo, or package source.- Model pricing is the customer-facing source of truth before traffic is sent.
- Admin analytics reports gateway customer charge, recorded cost, gross margin, request volume, and success rate. It does not collect visitor page-view profiles.
MODEL PACKAGES
Prepay value for one exact model
Send X-Meldport-Funding as wallet, promo, package, or auto. Auto checks an eligible promotion, then an exact-model package, then wallet credit when the API key allows fallback.
- PAYG wallet charges use the active price version recorded on the request.
- A model ending in
:freealways uses a matching promotion allowance. It never falls back to wallet or package value. Remove the suffix to use the paid model ID. - Monthly free allowances share one input-and-output token pool and reset at 00:00 UTC on the first day of each month. Launch grants are claimed once and use the displayed expiry date.
- Model Package value is usable only for its stable model ID and expires on the displayed date.
- Input, output, and cache usage debit their actual micro-USD customer charge, not a combined raw-token counter.
package_allowance_unavailablemeans no active exact-model value can cover the request bound.
A package-funded request reserves its maximum customer charge. Settlement returns unused value. Concurrent requests cannot reserve more than the remaining allowance.
See current offers and expiry terms on the Model Packages page. Use X-Meldport-Funding: package to require package value, or auto to allow the documented fallback order.
LIMITS
Bound traffic at the project and key level
Keys can carry request, daily, spend, and maximum-output limits. The strictest active account, project, key, and route rule wins. Limits are checked before a hold is placed.
- A
429response is safe to retry only after the indicated delay or client backoff. - A validation error is not transient; correct the model, capability, payload size, or output limit before retrying.
- Streaming and media retain their own concurrency and output boundaries. Do not infer one product limit from another.
WEBHOOKS · UNAVAILABLE
Polling is the only published media completion contract
Meldport does not currently accept customer webhook destinations or sign completion callbacks. Poll /v1/media/jobs/:id with backoff. No callback URL, signing secret, or event name is valid until it appears in this section and the OpenAPI contract.
CHANGELOG AND AVAILABILITY
Contract changes are recorded with readiness
Last updated: 2026-11-01
| Date | Change | Availability |
|---|---|---|
| 2026-10-04 | Added media preflight quotes and text-length pricing for eligible published speech configurations. | Available only for published configurations |
| 2026-09-18 | Added free-model funding guidance, exact-model package controls, and safer support logging guidance. | Available for published offers |
| 2026-09-12 | PAYG and exact-model value funding documented separately; catalog metadata no longer implies an active route. | Available where a route or configuration is published |
| 2026-09-12 | Audio requests and customer webhooks were withheld at that stage. | Historical state; webhooks remain unavailable |
On this page
QuickstartAuthenticationAPI key policyLLM requestsStreamingImage jobsVideo jobsAudio jobsAll model referencesUpload media inputsGet media resultsModel availabilityCompute availabilityPay as you goModel packagesVariable media chargesErrors and retriesLimitsWebhooksChangelog