Register OAuth client (RFC 7591)
Dynamic Client Registration per RFC 7591. MCP clients (Claude Code, Cursor, etc.)
call this endpoint to obtain a client_id before initiating the authorization flow.
This endpoint is only available when at least one MCP client is configured with
auth_type: per_user_oauth. Returns 404 otherwise.
Authentication is not required - this is part of the unauthenticated OAuth bootstrap flow.
Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT.
Virtual keys (prefixed with sk-bf-) can also be passed here.
In: header
Human-readable name of the client application
List of allowed redirect URIs for this client
Supported grant types. Defaults to ["authorization_code"]
Supported response types
Token endpoint authentication method. Always "none" (public client)
Space-separated list of requested scopes
Response Body
curl -X POST "https://loading/{AI_GATEWAY_URL}/api/oauth/per-user/register" \ -H "Content-Type: application/json" \ -d '{ "client_name": "Claude Code", "redirect_uris": [ "http://localhost:54321/callback" ], "grant_types": [ "authorization_code" ], "response_types": [ "code" ], "token_endpoint_auth_method": "none" }'{
"client_id": "550e8400-e29b-41d4-a716-446655440000",
"client_name": "Claude Code",
"redirect_uris": [
"http://localhost:54321/callback"
],
"grant_types": [
"authorization_code"
],
"token_endpoint_auth_method": "none"
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}"string"{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}