Brume · Docs
API

Routage et usage

Référence OpenAPI générée pour le domaine « Routage et usage ».

GET
/api/workspaces/{workspace_id}/routing

Return routing overrides for a workspace owned by the authenticated tenant.

Path Parameters

workspace_id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/routing"
{}
DELETE
/api/workspaces/{workspace_id}/routing

Clear the workspace-wide or usage-specific override and requeue routing.

Path Parameters

workspace_id*string

Query Parameters

usage_type?string|null

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/workspaces/string/routing"
{}
PUT
/api/workspaces/{workspace_id}/routing

Assign a tenant-owned profile and requeue the workspace routing path.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/api/workspaces/string/routing" \  -H "Content-Type: application/json" \  -d '{    "profile_id": "string"  }'
{}
PUT
/api/workspaces/{workspace_id}/routing/model

Assign an allowed model for one usage and requeue workspace routing.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/api/workspaces/string/routing/model" \  -H "Content-Type: application/json" \  -d '{    "model_config_id": "string",    "usage_type": "string"  }'
{}
GET
/api/workspaces/{workspace_id}/usage/by-type

Return workspace cost and execution totals per usage type.

Path Parameters

workspace_id*string

Query Parameters

from?string|null
to?string|null

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/usage/by-type"
[  {    "execution_count": 0,    "percentage": 0,    "total_cost": 0,    "usage_type": "string"  }]
GET
/api/workspaces/{workspace_id}/usage/by-user

Return workspace cost and execution totals per user for the time range.

Path Parameters

workspace_id*string

Query Parameters

from?string|null
to?string|null

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/usage/by-user"
[  {    "execution_count": 0,    "percentage": 0,    "total_cost": 0,    "user_display_name": "string",    "user_has_avatar": false,    "user_id": "string",    "user_name": "string",    "user_role": "string"  }]
GET
/api/workspaces/{workspace_id}/usage/logs

Return newest-first usage records with pagination metadata.

Path Parameters

workspace_id*string

Query Parameters

from?string|null
to?string|null
page?integer
Default1
per_page?integer
Default20

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/usage/logs"
{  "logs": [    {      "agent_run_id": "string",      "conversation_id": "string",      "cost_usd": 0,      "created_at": "string",      "id": "string",      "input_tokens": 0,      "model": "string",      "output_tokens": 0,      "user_id": "string"    }  ],  "page": 0,  "per_page": 0,  "total": 0}
GET
/api/workspaces/{workspace_id}/usage/summary

Return aggregate token, cost, and execution totals for the time range.

Path Parameters

workspace_id*string

Query Parameters

from?string|null
to?string|null

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/usage/summary"
{  "avg_cost_per_execution": 0,  "cache_creation_tokens": 0,  "cache_read_tokens": 0,  "execution_count": 0,  "input_tokens": 0,  "output_tokens": 0,  "total_cost": 0,  "total_tokens": 0}
GET
/api/workspaces/{workspace_id}/usage/timeseries

Return zero-filled hourly or daily usage buckets for the time range.

Path Parameters

workspace_id*string

Query Parameters

from?string|null
to?string|null

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/usage/timeseries"
{  "data": [    {      "cost": 0,      "date": "string",      "executions": 0,      "input_tokens": 0,      "output_tokens": 0    }  ],  "granularity": "string"}