0% platform fee — first 1,000,000 customersClaim 0% fee
Developer API · OpenAI-compatible

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.

Base URLhttps://api.nemorouter.ai/v1
AuthBearer sk-nemo-…
Get a free key
12 of 12 endpoints

Text

2
POST/v1/chat/completions

Create a chat completion (streaming or not)

GuardrailsPrompt templatesA/B testingCredit meteringCaching

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodyapplication/json

FieldTypeRequired
modelstringrequired
messagesarrayrequired
temperaturenumberoptional
max_tokensintegeroptional
nintegeroptional
streambooleanoptional
response_formatobjectoptional
toolsarrayoptional
tool_choiceobjectoptional

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

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

Prompt
cURL
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!"}]}'
POST/v1/completions

Create a text completion (legacy prompt format)

Credit meteringCaching

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodyapplication/json

FieldTypeRequired
modelstringrequired
promptstringrequired
max_tokensintegeroptional
temperaturenumberoptional

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

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

Prompt
cURL
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
POST/v1/images/generations

Generate an image from a text prompt

Credit metering

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodyapplication/json

FieldTypeRequired
modelstringrequired
promptstringrequired
size1024x1024 | 1024x1536 | 1536x1024optional
nintegeroptional

Response200

{
  "created": 1700000000,
  "data": [
    {
      "b64_json": "<base64-png>"
    }
  ]
}

Errors

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

Prompt
cURL
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"}'
POST/v1/images/edits

Edit an image given a source image (+ optional mask) and a prompt

Credit metering

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodymultipart/form-data

FieldTypeRequired
modelstringoptional
imagefilerequired
maskfileoptional
promptstringrequired

Response200

{
  "created": 1700000000,
  "data": [
    {
      "b64_json": "<base64-png>"
    }
  ]
}

Errors

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

cURL
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
POST/v1/audio/speech

Synthesize speech audio from text (TTS)

Credit metering

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodyapplication/json

FieldTypeRequired
modelstringrequired
inputstringrequired
voicestringrequired
response_formatmp3 | wav | opusoptional

Response200

Returns binary audio (audio/mpeg). The Try-it panel plays it inline.

Errors

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

Text to speak
cURL
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"}'
POST/v1/audio/transcriptions

Transcribe an uploaded audio file to text (STT)

Credit metering

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodymultipart/form-data

FieldTypeRequired
modelstringrequired
filefilerequired
languagestringoptional

Response200

{
  "text": "The transcribed speech."
}

Errors

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

cURL
curl https://api.nemorouter.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $NEMOROUTER_API_KEY" \
  -F model="" \
  -F file=@./audio.mp3

Video

1
POST/v1/videos

Generate a video from a text prompt (async)

Credit metering

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodyapplication/json

FieldTypeRequired
modelstringrequired
promptstringrequired
secondsintegeroptional
sizestringoptional

Response200

{
  "id": "video_abc123",
  "object": "video.generation",
  "status": "queued"
}

Errors

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

Prompt
cURL
curl https://api.nemorouter.ai/v1/videos \
  -H "Authorization: Bearer $NEMOROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":""}'

Utility

5
POST/v1/embeddings

Create an embedding vector for input text

Credit meteringCaching

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodyapplication/json

FieldTypeRequired
modelstringrequired
inputobjectrequired

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

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

cURL
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"}'
POST/v1/moderations

Classify 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

FieldTypeRequired
modelstringoptional
inputstringrequired

Response200

{
  "id": "modr-abc123",
  "model": "omni-moderation-latest",
  "results": [
    {
      "flagged": false,
      "categories": {
        "violence": false
      },
      "category_scores": {
        "violence": 0.001
      }
    }
  ]
}

Errors

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

PromptPresets
cURL
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."}'
POST/v1/rerank

Rerank documents by relevance to a query

Credit metering

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodyapplication/json

FieldTypeRequired
modelstringrequired
querystringrequired
documentsarrayrequired
top_nintegeroptional

Response200

{
  "id": "rerank-abc123",
  "results": [
    {
      "index": 1,
      "relevance_score": 0.98
    },
    {
      "index": 0,
      "relevance_score": 0.41
    }
  ],
  "meta": {
    "billed_units": {
      "search_units": 1
    }
  }
}

Errors

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

cURL
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."]}'
POST/v1/ocr

Extract text + structure from a document

Credit metering

Authentication

Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.

Request bodyapplication/json

FieldTypeRequired
modelstringrequired
documentstringrequired

Response200

{
  "pages": [
    {
      "index": 0,
      "markdown": "# Heading\n\nbody…"
    }
  ]
}

Errors

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

cURL
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"}'
GET/v1/models

List the models available to your key

Caching

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

StatusMeaning
400400 — Guardrail blocked the request
402402 — Not enough credits
429429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded)
503503 — Credit system unavailable

Test it

cURL
curl https://api.nemorouter.ai/v1/models \
  -H "Authorization: Bearer $NEMOROUTER_API_KEY"