GLM-5.2, MiniMax M3 and Opus 5 are now live. Try them now
EUrouter

OAuth

API reference for OAuth

OpenAPI JSON

Get authenticated identity

GET
/api/v1/me

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Response Body

application/json

curl -X GET "https://api.eurouter.ai/api/v1/me"
{
  "user_id": "string",
  "email": "string",
  "org_name": "string",
  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  "plan": "string",
  "credits": {
    "balance": "string",
    "total_credits": "string",
    "total_usage": "string"
  }
}
POST
/api/v1/auth/keys/authorize

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.eurouter.ai/api/v1/auth/keys/authorize" \  -H "Content-Type: application/json" \  -d '{    "callback_url": "http://example.com",    "code_challenge": "stringstringstringstringstringstringstrings",    "code_challenge_method": "S256"  }'
{
  "code": "string",
  "created_at": "string"
}

Create authorization code (programmatic)

POST
/api/v1/auth/keys/code

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.eurouter.ai/api/v1/auth/keys/code" \  -H "Content-Type: application/json" \  -d '{    "callback_url": "http://example.com",    "code_challenge": "stringstringstringstringstringstringstrings",    "code_challenge_method": "S256"  }'
{
  "code": "string",
  "created_at": "string"
}

Exchange authorization code for API key

POST
/api/v1/auth/keys

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.eurouter.ai/api/v1/auth/keys" \  -H "Content-Type: application/json" \  -d '{    "code": "string",    "code_verifier": "stringstringstringstringstringstringstrings"  }'
{
  "key": "string",
  "user_id": "string"
}

Begin OAuth authorization (browser redirect)

GET
/api/v1/auth

Query Parameters

callback_url*string

URL to redirect back to after authorization

Formaturi
code_challenge*string

Base64url-encoded PKCE code challenge

Length43 <= length <= 128
code_challenge_method*string

PKCE code challenge method (S256 recommended)

Default"S256"
Value in"S256" | "plain"
state?string

Opaque client state echoed back unchanged to the callback flow

response_type?string

Optional OAuth response type accepted for compatibility with hosted OAuth clients

Value in"code"
client_id?string

Optional OAuth client identifier accepted for compatibility with hosted OAuth clients

redirect_uri?string

Optional OAuth redirect URI accepted for compatibility; must match callback_url when both are present

Formaturi

Response Body

curl -X GET "https://api.eurouter.ai/api/v1/auth?callback_url=http%3A%2F%2Fexample.com&code_challenge=stringstringstringstringstringstringstrings&code_challenge_method=S256"
Empty

Was this page helpful?

Still stuck? Contact support