The REST API

A versioned, contract-first REST API with OpenAPI documentation, structured errors and job semantics.

Updated 2026-12-01

Contract first

The API is described by an OpenAPI 3.1 contract that is written before an endpoint is implemented. The documentation and the SDKs are generated from that same contract, so they cannot drift from the service. Live

The base is /v1. A new version is introduced rather than changing a published one. Live Developer documentation and an API reference are published. Live

Authentication

Send your key in the x-api-key header, or as a Bearer token, and send x-product-code: engine on every call. Keys begin with mre_. Live

Main resources

ResourcePurpose
POST /v1/engine/ttsSynchronous speech for up to 2,500 characters. Live
POST /v1/tts/jobs, POST /v1/tts/quoteLong-form speech jobs and quotes.
POST /v1/sttSpeech-to-text jobs.
GET /v1/jobs/{id}Job state, stages and output links.
GET /v1/jobs/{id}/eventsLive events over SSE; WebSocket is also available. Live
GET /v1/languages/capabilitiesThe public language registry.
GET/POST /v1/webhooksSigned completion callbacks.
POST /v1/uploadsSigned multipart upload.

Errors

Errors use application/problem+json with a stable code and a message_key. Common codes are insufficient_credits, rate_limited and capability_closed. Handle the code, not the wording.

Example

curl https://mredgeengine.com/api/v1/engine/tts \
  -H "x-api-key: $EDGE_API_KEY" \
  -H "x-product-code: engine" \
  -H "content-type: application/json" \
  -d '{"text":"Welcome. Your order has shipped.","language":"yor","format":"mp3"}' \
  --output speech.mp3

The API reference lists every public endpoint with its parameters. Not every capability in the contract is open; consult the registry and GET /v1/capabilities.

Statements and their status

Each labelled statement in this article, with what it rests on.

  • Live Developer documentation, an API reference and an SDK guide are published on mredgeengine.com. Evidence: a live endpoint, checked 2026-12-01.
  • Live A versioned OpenAPI 3.1 contract describes the media API. Evidence: source documentation, checked 2026-12-01.
  • Live The API accepts a bearer token or an API key in the X-API-Key header and answers unauthenticated or invalid-key calls with 401. Evidence: a live endpoint, checked 2026-12-01.
  • Live The Engine API accepts text-to-speech requests at POST /v1/engine/tts and refuses unauthenticated callers. Evidence: a live endpoint, checked 2026-12-01.
  • Live Long work runs as background jobs with status, events and cancel endpoints. Evidence: a live endpoint, checked 2026-12-01.

Back to the Knowledge Centre