Every request to a protected MonoRelay endpoint must include a valid credential. MonoRelay supports two authentication methods: a static access key configured inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/MonoRelay/llms.txt
Use this file to discover all available pages before exploring further.
config.yml, and a short-lived JWT token obtained by logging in through the auth API. Both methods use the same Authorization: Bearer header pattern, making them compatible with standard OpenAI SDKs without any special client configuration.
Authentication methods
Method 1: Access key
Whenserver.access_key_enabled is true in your config.yml, you can authenticate by passing the configured access_key value directly. The key can be sent in either of two headers:
Bearer token header. Pass
Bearer <your-access-key> as the value.Alternative header for clients that cannot set a custom
Authorization value. Pass the raw key with no Bearer prefix.config.yml:
config.yml
curl with the Authorization header:
X-Access-Key header:
Method 2: JWT token
User accounts created throughPOST /api/auth/register can obtain a JWT token by logging in. Pass the token as a Bearer credential on subsequent requests. Tokens are short-lived; use the refresh token to obtain a new access token without re-authenticating.
Bearer <jwt-token> where the token is the access_token value returned by POST /api/auth/login.access_token:
Public endpoints
The following endpoints do not require authentication and can be called without any credentials:| Endpoint | Description |
|---|---|
GET /health | Server health check and provider status |
GET /v1/models | List available models |
GET /api/info | Server connection info and base URL |
POST /api/auth/login | Obtain a JWT token |
POST /api/auth/register | Create a new user account |
Python SDK example
Because MonoRelay is OpenAI-compatible, you can use the officialopenai Python library by pointing it at your MonoRelay instance. Pass your access key or JWT token as the api_key argument.
api_key value with the access_token string returned by POST /api/auth/login.
Error responses
| Status | Body | Cause |
|---|---|---|
401 | {"error": {"message": "Unauthorized", "type": "auth_error"}} | Missing credential, invalid access key, or expired/malformed JWT token |
If both
access_key_enabled is false and no valid JWT is present, all protected endpoints return 401 Unauthorized. Ensure at least one authentication method is configured before making API calls.