Skip to content

Get the Current Identity

GET/v1/me

Authorization

Authorizationstring · headerRequired

Workspace session token sent as Bearer <token>. Authentication guide

Responses

200Current user session or API key context.
application/json
principalobject | objectRequired
Show nested fields
Option 1: object
typestringRequired
userobjectRequired
Show nested fields
idstringRequired
emailstringRequired
namestring | null
statestringRequired

Values: "active""disabled"

created_atstringRequired
avatar_urlstring | null

HTTPS URL of the profile picture from the user's identity provider.

workspacesobject[]Required
Show nested fields

See the OpenAPI schema for this nested object.

Option 2: object
typestringRequired
keyobjectRequired
Show nested fields
idstringRequired
workspace_idstringRequired
namestringRequired
prefixstringRequired

Non-secret key prefix for display and lookup.

kindstringRequired

Values: "api"

statestringRequired

Values: "active""disabled""revoked"

scopesstring[]Required
Show nested fields

See the OpenAPI schema for this nested object.

spend_limitnumber | null
rate_limitinteger | null
expires_atstring | null
last_used_atstring | null
created_atstringRequired
revoked_atstring | null
budgetsobject

Spend limits in USD per UTC calendar period. null means no limit.

Show nested fields

See the OpenAPI schema for this nested object.

access_policyobject | null
Show nested fields

See the OpenAPI schema for this nested object.

usageobject

USD spent in the current UTC day, week and month, and in total, including holds for requests in progress. Spend counts in the period its request started.

Show nested fields

See the OpenAPI schema for this nested object.

workspaceobjectRequired
Show nested fields
idstringRequired
namestringRequired
slugstringRequired
planstringRequired
statestringRequired

Values: "active""suspended""closed"

rolestring

Values: "owner""admin""developer""viewer""billing"

created_atstringRequired
401Authentication is missing or invalid.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.

500Internal server error.
application/json
errorobjectRequired
Show nested fields
codestringRequired
messagestringRequired
paramstring | null
request_idstring | null
metadataobject

Typed detail for some refusals. budget_exceeded (402): limit (key_budget or workspace_budget) and budget with scope, period, limit, usage and resets_at. key_limit_exceeded (402): limit key_spend_limit. access_denied (403): policy (workspace or key), rule (models, providers or products), product, provider and model.