List model provider credentials

Returns the LLM model provider credentials (API-key + OAuth alike) of the current organization. Plaintext keys / OAuth tokens are never exposed. Permission: model-provider-credentials:read lists every credential of the organization; a caller holding only model-provider-credentials:connect lists their own personal credentials and no organization or built-in one. Each credential carries its owner (owner_type, owner_id, owner_name).

GET/api/model-provider-credentials

Authorization

better-auth.session_token<token>

Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.

In: cookie

Header Parameters

X-Org-Id?string

Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).

Formatuuid
curl -X GET "https://your-instance/api/model-provider-credentials"
{
  "object": "list",
  "hasMore": false,
  "data": [
    {
      "id": "cm7stu901",
      "label": "OpenAI Production",
      "apiShape": "openai-completions",
      "base_url": "https://api.openai.com",
      "source": "custom",
      "authMode": "api_key",
      "owner_type": "org",
      "owner_id": null,
      "owner_name": null,
      "allowed_actions": [
        "edit",
        "delete",
        "test"
      ],
      "bindable": false,
      "serves_model_ids": [],
      "created_by": "usr_cm3abc123",
      "createdAt": "2026-01-10T08:00:00Z",
      "updatedAt": "2026-01-10T08:00:00Z"
    }
  ]
}
{
  "type": "https://docs.appstrate.dev/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid or missing session",
  "code": "unauthorized",
  "request_id": "req_abc123"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "param": "string",
  "retry_after": 0,
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string",
      "title": "string",
      "line": 1,
      "column": 1,
      "candidate_connections": [
        {
          "id": "string",
          "label": "string",
          "account_id": "string",
          "owned_by_actor": true,
          "needs_reconnection": true,
          "scopes_granted": [
            "string"
          ],
          "missing_scopes": [
            "string"
          ]
        }
      ],
      "connection_id": "string",
      "missing_scopes": [
        "string"
      ],
      "remedy": "new_connection",
      "owned_by_actor": true,
      "required_scopes": [
        "string"
      ],
      "auth_key": "string",
      "required_auth_key": "string",
      "available_auth_keys": [
        "string"
      ],
      "source": "admin_pin",
      "connect_url": "http://example.com",
      "expiresAt": "2019-08-24T14:15:22Z",
      "packageId": "string"
    }
  ]
}