For the complete documentation index, see llms.txt. This page is also available as Markdown.

Users

List Users

get

List the users the caller's organization can name, with pagination.

users is deployment-global and has no organization column, so which of them this organization can name is derived: a key, usage, or a roster row puts one in reach, and one reached from nowhere at all (the shared default owner, or a user just created) is shared rather than hidden. See repositories.users_repository.in_organization.

parent_user_id with external_id finds the end user a service key created for a user value, which is how a caller maps its own ids to Otari's. include_total adds an Otari-Total-Count header counting every match, so limit=1 with it counts a service key's end users.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Query parameters
skipintegerOptionalDefault: 0
limitinteger · min: 1 · max: 1000OptionalDefault: 100
parent_user_idstring · nullableOptional

Only the end users of this owner: the user a service key belongs to.

external_idstring · nullableOptional

Only the end user a service key names with this user value.

blockedboolean · nullableOptional

Only blocked users (true) or only unblocked ones (false).

include_totalbooleanOptional

Also count every matching user, in the Otari-Total-Count response header.

Default: false
Responses
200

Successful Response

application/json

Response model for user information.

aliasstring · nullableRequired
allowed_modelsstring[] · nullableRequired
allowed_toolsstring[] · nullableRequired
blockedbooleanRequired
budget_idstring · nullableRequired
budget_started_atstring · nullableRequired
created_atstringRequired
current_requestsintegerRequired
current_tokensintegerRequired
external_idstring · nullableOptional
next_budget_reset_atstring · nullableRequired
parent_user_idstring · nullableOptional
reservednumberRequired
reserved_requestsintegerRequired
reserved_tokensintegerRequired
spendnumberRequired
updated_atstringRequired
user_idstringRequired
get/api/v1/users
GET /api/v1/users HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
[
  {
    "alias": "text",
    "allowed_models": [
      "text"
    ],
    "allowed_tools": [
      "text"
    ],
    "blocked": true,
    "budget_id": "text",
    "budget_started_at": "text",
    "created_at": "text",
    "current_requests": 1,
    "current_tokens": 1,
    "external_id": "text",
    "metadata": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "next_budget_reset_at": "text",
    "parent_user_id": "text",
    "reserved": 1,
    "reserved_requests": 1,
    "reserved_tokens": 1,
    "spend": 1,
    "updated_at": "text",
    "user_id": "text"
  }
]

Create User

post

Create a new user.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Body

Request model for creating a new user.

aliasstring · nullableOptional

Optional admin-facing alias

allowed_modelsstring[] · nullableOptional

Default model access-list this user's keys inherit; null = unrestricted, [] = deny all

allowed_toolsstring[] · nullableOptional

Default tool access-list this user's keys inherit, for POST /api/v1/search and /api/v1/fetch: null = the search tools allowed_models grants, [] = no tool, or search and fetch tool names ('*' for every tool).

blockedbooleanOptional

Whether user is blocked

Default: false
budget_idstring · nullableOptional

Optional budget ID

user_idstringRequired

Unique user identifier

Responses
200

Successful Response

application/json

Response model for user information.

aliasstring · nullableRequired
allowed_modelsstring[] · nullableRequired
allowed_toolsstring[] · nullableRequired
blockedbooleanRequired
budget_idstring · nullableRequired
budget_started_atstring · nullableRequired
created_atstringRequired
current_requestsintegerRequired
current_tokensintegerRequired
external_idstring · nullableOptional
next_budget_reset_atstring · nullableRequired
parent_user_idstring · nullableOptional
reservednumberRequired
reserved_requestsintegerRequired
reserved_tokensintegerRequired
spendnumberRequired
updated_atstringRequired
user_idstringRequired
post/api/v1/users
POST /api/v1/users HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 169

{
  "alias": "text",
  "allowed_models": [
    "text"
  ],
  "allowed_tools": [
    "text"
  ],
  "blocked": false,
  "budget_id": "text",
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "user_id": "text"
}
{
  "alias": "text",
  "allowed_models": [
    "text"
  ],
  "allowed_tools": [
    "text"
  ],
  "blocked": true,
  "budget_id": "text",
  "budget_started_at": "text",
  "created_at": "text",
  "current_requests": 1,
  "current_tokens": 1,
  "external_id": "text",
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "next_budget_reset_at": "text",
  "parent_user_id": "text",
  "reserved": 1,
  "reserved_requests": 1,
  "reserved_tokens": 1,
  "spend": 1,
  "updated_at": "text",
  "user_id": "text"
}

Get User

get

Get details of a user in the caller's organization.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
user_idstringRequired
Responses
200

Successful Response

application/json

Response model for user information.

aliasstring · nullableRequired
allowed_modelsstring[] · nullableRequired
allowed_toolsstring[] · nullableRequired
blockedbooleanRequired
budget_idstring · nullableRequired
budget_started_atstring · nullableRequired
created_atstringRequired
current_requestsintegerRequired
current_tokensintegerRequired
external_idstring · nullableOptional
next_budget_reset_atstring · nullableRequired
parent_user_idstring · nullableOptional
reservednumberRequired
reserved_requestsintegerRequired
reserved_tokensintegerRequired
spendnumberRequired
updated_atstringRequired
user_idstringRequired
get/api/v1/users/{user_id}
GET /api/v1/users/{user_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "alias": "text",
  "allowed_models": [
    "text"
  ],
  "allowed_tools": [
    "text"
  ],
  "blocked": true,
  "budget_id": "text",
  "budget_started_at": "text",
  "created_at": "text",
  "current_requests": 1,
  "current_tokens": 1,
  "external_id": "text",
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "next_budget_reset_at": "text",
  "parent_user_id": "text",
  "reserved": 1,
  "reserved_requests": 1,
  "reserved_tokens": 1,
  "spend": 1,
  "updated_at": "text",
  "user_id": "text"
}

Update User

patch

Update a user in the caller's organization.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
user_idstringRequired
Body

Request model for updating a user.

aliasstring · nullableOptional
allowed_modelsstring[] · nullableOptional
allowed_toolsstring[] · nullableOptional
blockedboolean · nullableOptional
budget_idstring · nullableOptional
Responses
200

Successful Response

application/json

Response model for user information.

aliasstring · nullableRequired
allowed_modelsstring[] · nullableRequired
allowed_toolsstring[] · nullableRequired
blockedbooleanRequired
budget_idstring · nullableRequired
budget_started_atstring · nullableRequired
created_atstringRequired
current_requestsintegerRequired
current_tokensintegerRequired
external_idstring · nullableOptional
next_budget_reset_atstring · nullableRequired
parent_user_idstring · nullableOptional
reservednumberRequired
reserved_requestsintegerRequired
reserved_tokensintegerRequired
spendnumberRequired
updated_atstringRequired
user_idstringRequired
patch/api/v1/users/{user_id}
PATCH /api/v1/users/{user_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 151

{
  "alias": "text",
  "allowed_models": [
    "text"
  ],
  "allowed_tools": [
    "text"
  ],
  "blocked": true,
  "budget_id": "text",
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
{
  "alias": "text",
  "allowed_models": [
    "text"
  ],
  "allowed_tools": [
    "text"
  ],
  "blocked": true,
  "budget_id": "text",
  "budget_started_at": "text",
  "created_at": "text",
  "current_requests": 1,
  "current_tokens": 1,
  "external_id": "text",
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "next_budget_reset_at": "text",
  "parent_user_id": "text",
  "reserved": 1,
  "reserved_requests": 1,
  "reserved_tokens": 1,
  "spend": 1,
  "updated_at": "text",
  "user_id": "text"
}

Delete User

delete

Delete a user in the caller's organization, and erase their telemetry and agent traces.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
user_idstringRequired
Responses
204

Successful Response

No content

delete/api/v1/users/{user_id}
DELETE /api/v1/users/{user_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*

No content

Get User Usage

get

Get usage history for a user in the caller's organization.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
user_idstringRequired
Query parameters
skipintegerOptionalDefault: 0
limitinteger · min: 1 · max: 1000OptionalDefault: 100
Responses
200

Successful Response

application/json

Response model for usage log.

api_key_idstring · nullableRequired
completion_tokensinteger · nullableRequired
costnumber · nullableRequired
endpointstringRequired
error_messagestring · nullableRequired
idstringRequired
latency_msinteger · nullableRequired
modelstringRequired
prompt_tokensinteger · nullableRequired
providerstring · nullableRequired
provider_latency_msinteger · nullableRequired
statusstringRequired
timestampstringRequired
total_tokensinteger · nullableRequired
user_idstring · nullableRequired
get/api/v1/users/{user_id}/usage
GET /api/v1/users/{user_id}/usage HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
[
  {
    "api_key_id": "text",
    "completion_tokens": 1,
    "cost": 1,
    "endpoint": "text",
    "error_message": "text",
    "id": "text",
    "latency_ms": 1,
    "model": "text",
    "prompt_tokens": 1,
    "provider": "text",
    "provider_latency_ms": 1,
    "status": "text",
    "timestamp": "text",
    "total_tokens": 1,
    "user_id": "text"
  }
]

Last updated

Was this helpful?