Merius
API referenceCompletions

Create a completion (legacy)

Generate a text completion from a prompt. Provided for compatibility; prefer `/chat/completions` for new work — it gives better control over context and system instructions.

POST
/completions

Authorization

bearerAuth
AuthorizationBearer <token>

Send your Merius API key as a bearer token: Authorization: Bearer riv_.... Create keys in the dashboard; the full key is shown once. Keep it server-side.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/completions" \  -H "Content-Type: application/json" \  -d '{    "model": "z-ai/glm-5.1",    "prompt": "string"  }'
{}
{  "error": {    "message": "Unknown model: gpt-foo",    "type": "invalid_request_error",    "param": "model",    "code": "model_not_found"  }}
{  "error": {    "message": "Unknown model: gpt-foo",    "type": "invalid_request_error",    "param": "model",    "code": "model_not_found"  }}
{  "error": {    "message": "Unknown model: gpt-foo",    "type": "invalid_request_error",    "param": "model",    "code": "model_not_found"  }}