Aliases
List every alias in force in your organization, from config.yml and from storage.
Every scope at once, workspace-wide and user-scoped alike: this is the master-key management view, not what any one caller resolves.
Enter your API key here (sent as Otari-Key header).
Only stored entries in this workspace. Config-file entries are always included, being deployment-wide. Omit to list the stored entries of every workspace in your organization.
Successful Response
A model alias and where it is defined.
Validation Error
GET /api/v1/aliases HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
[
{
"created_at": "text",
"name": "text",
"source": "text",
"target": "text",
"updated_at": "text",
"user_id": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}
]Create or update a stored alias in one workspace, optionally for one user.
Enter your API key here (sent as Otari-Key header).
Request to create or update an alias.
Display name callers use as the model, e.g. 'fast-model'.
Selector the alias resolves to, as 'provider:model' or 'instance:model'.
User this alias belongs to. Omit for an alias every caller in the workspace sees. A user-scoped alias resolves only for that user and shadows the workspace-wide one of the same name.
Workspace this alias belongs to. Omit for the deployment's default workspace. The alias resolves only for requests in that workspace, so two workspaces can each point the same name at a different model.
Successful Response
A model alias and where it is defined.
Validation Error
POST /api/v1/aliases HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"name": "text",
"target": "text",
"user_id": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}{
"created_at": "text",
"name": "text",
"source": "text",
"target": "text",
"updated_at": "text",
"user_id": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}Delete a stored alias in one scope.
Enter your API key here (sent as Otari-Key header).
Delete the alias scoped to this user. Omit to delete the workspace-wide alias of that name.
Delete the alias in this workspace. Omit for the deployment's default workspace.
Successful Response
No content
Validation Error
DELETE /api/v1/aliases/{name} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
No content
List the aliases in force in the workspaces this caller may see.
The policies list's sibling, over model_aliases, and scoped the same way: stored rows from the caller's visible workspaces, plus the config-file aliases, which are deployment-wide, and narrowed to one workspace when workspace_id names one.
Enter your API key here (sent as Otari-Key header).
Maximum entries to return, stored and config-file together.
1000Only stored entries in this workspace. Config-file entries are always included, being deployment-wide. Omit for every workspace this caller may see.
Successful Response
A model alias and where it is defined.
Validation Error
GET /api/v1/organizations/me/aliases HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
[
{
"created_at": "text",
"name": "text",
"source": "text",
"target": "text",
"updated_at": "text",
"user_id": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}
]Create or update a stored alias in one of the organization's workspaces.
Organization owners and admins only, with the same two scope rules the policy write has: workspace_id is required and resolved inside the caller's organization, and user_id is not accepted.
Enter your API key here (sent as Otari-Key header).
Request to create or update an alias.
Display name callers use as the model, e.g. 'fast-model'.
Selector the alias resolves to, as 'provider:model' or 'instance:model'.
User this alias belongs to. Omit for an alias every caller in the workspace sees. A user-scoped alias resolves only for that user and shadows the workspace-wide one of the same name.
Workspace this alias belongs to. Omit for the deployment's default workspace. The alias resolves only for requests in that workspace, so two workspaces can each point the same name at a different model.
Successful Response
A model alias and where it is defined.
Validation Error
POST /api/v1/organizations/me/aliases HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"name": "text",
"target": "text",
"user_id": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}{
"created_at": "text",
"name": "text",
"source": "text",
"target": "text",
"updated_at": "text",
"user_id": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}Delete a stored alias from one of the organization's workspaces. Owners and admins only.
Enter your API key here (sent as Otari-Key header).
Delete the alias in this workspace of the caller's organization.
Successful Response
No content
Validation Error
DELETE /api/v1/organizations/me/aliases/{name} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?
