API Reference
One endpoint for every model — text, image, audio, embeddings, and more. Authenticate with your virtual key and call any model below. Every endpoint is live-testable right here in the browser.
Text
2/v1/chat/completionsCreate a chat completion (streaming or not)
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| messages | array | required |
| temperature | number | optional |
| max_tokens | integer | optional |
| n | integer | optional |
| stream | boolean | optional |
| response_format | object | optional |
| tools | array | optional |
| tool_choice | object | optional |
Response200
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "gpt-4o",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello!"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 2,
"total_tokens": 11
}
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/chat/completions \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"","messages":[{"role":"user","content":"Hello!"}]}'/v1/completionsCreate a text completion (legacy prompt format)
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| prompt | string | required |
| max_tokens | integer | optional |
| temperature | number | optional |
Response200
{
"id": "cmpl-abc123",
"object": "text_completion",
"model": "gpt-4o-mini",
"choices": [
{
"text": " there!",
"index": 0,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 2,
"completion_tokens": 2,
"total_tokens": 4
}
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/completions \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"","prompt":"Once upon a time"}'Image
2/v1/images/generationsGenerate an image from a text prompt
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| prompt | string | required |
| size | 1024x1024 | 1024x1536 | 1536x1024 | optional |
| n | integer | optional |
Response200
{
"created": 1700000000,
"data": [
{
"b64_json": "<base64-png>"
}
]
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/images/generations \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"","prompt":"a red panda coding at night, neon"}'/v1/images/editsEdit an image given a source image (+ optional mask) and a prompt
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodymultipart/form-data
| Field | Type | Required |
|---|---|---|
| model | string | optional |
| image | file | required |
| mask | file | optional |
| prompt | string | required |
Response200
{
"created": 1700000000,
"data": [
{
"b64_json": "<base64-png>"
}
]
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/images/edits \ -H "Authorization: Bearer $NEMOROUTER_API_KEY" \ -F model="" \ -F prompt="make it brighter" \ -F image=@./image.png
Audio
2/v1/audio/speechSynthesize speech audio from text (TTS)
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| input | string | required |
| voice | string | required |
| response_format | mp3 | wav | opus | optional |
Response200
Returns binary audio (audio/mpeg). The Try-it panel plays it inline.
Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/audio/speech \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"","input":"Hello from Nemo Router.","voice":"alloy","response_format":"mp3"}'/v1/audio/transcriptionsTranscribe an uploaded audio file to text (STT)
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodymultipart/form-data
| Field | Type | Required |
|---|---|---|
| model | string | required |
| file | file | required |
| language | string | optional |
Response200
{
"text": "The transcribed speech."
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $NEMOROUTER_API_KEY" \ -F model="" \ -F file=@./audio.mp3
Video
1/v1/videosGenerate a video from a text prompt (async)
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| prompt | string | required |
| seconds | integer | optional |
| size | string | optional |
Response200
{
"id": "video_abc123",
"object": "video.generation",
"status": "queued"
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/videos \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":""}'Utility
5/v1/embeddingsCreate an embedding vector for input text
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| input | object | required |
Response200
{
"object": "list",
"model": "text-embedding-3-small",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0023,
-0.009,
0.015
]
}
],
"usage": {
"prompt_tokens": 5,
"total_tokens": 5
}
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/embeddings \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"","input":"The quick brown fox"}'/v1/moderationsClassify whether text violates content policy
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | optional |
| input | string | required |
Response200
{
"id": "modr-abc123",
"model": "omni-moderation-latest",
"results": [
{
"flagged": false,
"categories": {
"violence": false
},
"category_scores": {
"violence": 0.001
}
}
]
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/moderations \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"text-moderation-latest","input":"I want to learn to cook."}'/v1/rerankRerank documents by relevance to a query
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| query | string | required |
| documents | array | required |
| top_n | integer | optional |
Response200
{
"id": "rerank-abc123",
"results": [
{
"index": 1,
"relevance_score": 0.98
},
{
"index": 0,
"relevance_score": 0.41
}
],
"meta": {
"billed_units": {
"search_units": 1
}
}
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/rerank \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"","query":"capital of France","documents":["Paris is the capital of France.","Berlin is in Germany."]}'/v1/ocrExtract text + structure from a document
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| document | string | required |
Response200
{
"pages": [
{
"index": 0,
"markdown": "# Heading\n\nbody…"
}
]
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/ocr \
-H "Authorization: Bearer $NEMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"","document":"https://example.com/invoice.pdf"}'/v1/modelsList the models available to your key
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Response200
{
"object": "list",
"data": [
{
"id": "gpt-4o",
"object": "model",
"owned_by": "nemorouter"
}
]
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |
Test it
curl https://api.nemorouter.ai/v1/models \ -H "Authorization: Bearer $NEMOROUTER_API_KEY"