Aira

Models & Preferences

List available models and manage per-feature model preferences for your organization.

Overview

The Models API lets you list all available LLM models and control which models are enabled or disabled across different features: cases, policies, sanitize, and chat. Each feature has its own independent set of disabled models, so you can allow a model for chat but block it from policy evaluation.


List Models

GET /api/v1/models
Authorization: Bearer aira_live_xxxxx

Returns all available models. When authenticated, the response also includes custom (BYOM) models registered to your organization and excludes models you have disabled (unless include_disabled is set).

Query Parameters

ParameterTypeDefaultDescription
include_disabledbooleanfalseWhen true, returns all models including disabled ones (each with a disabled flag). Useful for building a preferences UI.

Example Response

[
  {
    "model_id": "gpt-4o",
    "provider": "openai",
    "display_name": "GPT-4o",
    "available": true,
    "max_tokens": 4096,
    "disabled": false
  },
  {
    "model_id": "custom:my-fine-tuned",
    "provider": "custom",
    "display_name": "My Fine-Tuned Model",
    "available": true
  }
]

Response Fields

FieldTypeDescription
model_idstringUnique model identifier. Custom models are prefixed with custom:.
providerstringProvider name (e.g. openai, anthropic, google, custom)
display_namestringHuman-readable model name
availablebooleanWhether the model is currently available for use
max_tokensinteger|nullMaximum output tokens supported by the model, if known
disabledboolean|nullOnly present when include_disabled=true. Indicates whether the model is disabled for your organization.

This endpoint works without authentication. When called without a valid API key, it returns only the built-in models with no disabled/custom model information.


Get Preferences

GET /api/v1/models/preferences
Authorization: Bearer aira_live_xxxxx

Returns the list of model IDs disabled for case evaluation in your organization.

Example Response

{
  "disabled_models": ["gpt-4o-mini", "claude-3-haiku-20240307"],
  "request_id": "req_01J8X..."
}

Response Fields

FieldTypeDescription
disabled_modelsstring[]Model IDs that are disabled for cases
request_idstringUnique request identifier

Update Preferences

PUT /api/v1/models/preferences
Authorization: Bearer aira_live_xxxxx
Content-Type: application/json

Replace the full list of disabled models for case evaluation.

Request Body

FieldTypeRequiredDescription
disabled_modelsstring[]NoModel IDs to disable. Defaults to [] (none disabled).

Example Request

curl -X PUT https://api.aira.law/api/v1/models/preferences \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{"disabled_models": ["gpt-4o-mini"]}'

Example Response

{
  "disabled_models": ["gpt-4o-mini"],
  "request_id": "req_01J8X..."
}

Every model ID must correspond to a known built-in or custom model. Unknown model IDs return a 422 error.


Get Policy Preferences

GET /api/v1/models/policy-preferences
Authorization: Bearer aira_live_xxxxx

Returns the list of model IDs disabled specifically for policy evaluation, independent from case preferences.

Example Response

{
  "disabled_models": ["gpt-4o-mini"],
  "request_id": "req_01J8X..."
}

Response Fields

FieldTypeDescription
disabled_modelsstring[]Model IDs disabled for policy evaluation
request_idstringUnique request identifier

Update Policy Preferences

PUT /api/v1/models/policy-preferences
Authorization: Bearer aira_live_xxxxx
Content-Type: application/json

Replace the full list of disabled models for policy evaluation.

Request Body

FieldTypeRequiredDescription
disabled_modelsstring[]NoModel IDs to disable for policies. Defaults to [].

Example Request

curl -X PUT https://api.aira.law/api/v1/models/policy-preferences \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{"disabled_models": ["gpt-4o-mini"]}'

Example Response

{
  "disabled_models": ["gpt-4o-mini"],
  "request_id": "req_01J8X..."
}

Get Sanitize Preferences

GET /api/v1/models/sanitize-preferences
Authorization: Bearer aira_live_xxxxx

Returns the list of model IDs disabled specifically for sanitize operations, independent from other preferences.

Example Response

{
  "disabled_models": [],
  "request_id": "req_01J8X..."
}

Response Fields

FieldTypeDescription
disabled_modelsstring[]Model IDs disabled for sanitize operations
request_idstringUnique request identifier

Update Sanitize Preferences

PUT /api/v1/models/sanitize-preferences
Authorization: Bearer aira_live_xxxxx
Content-Type: application/json

Replace the full list of disabled models for sanitize operations.

Request Body

FieldTypeRequiredDescription
disabled_modelsstring[]NoModel IDs to disable for sanitize. Defaults to [].

Example Request

curl -X PUT https://api.aira.law/api/v1/models/sanitize-preferences \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{"disabled_models": ["claude-3-haiku-20240307"]}'

Example Response

{
  "disabled_models": ["claude-3-haiku-20240307"],
  "request_id": "req_01J8X..."
}

Get Chat Default Model

GET /api/v1/models/chat-default
Authorization: Bearer aira_live_xxxxx

Returns the organization-level default model for chat conversations.

Example Response

{
  "chat_default_model": "gpt-4o",
  "request_id": "req_01J8X..."
}

Response Fields

FieldTypeDescription
chat_default_modelstring|nullThe default chat model ID, or null if none is set
request_idstringUnique request identifier

Set Chat Default Model

PUT /api/v1/models/chat-default
Authorization: Bearer aira_live_xxxxx
Content-Type: application/json

Set the organization-level default model for chat. The model must be a known built-in or custom model. If a chat allowed list is configured, the model must also be in that list.

Request Body

FieldTypeRequiredDescription
chat_default_modelstringYesModel ID to use as the default for chat

Example Request

curl -X PUT https://api.aira.law/api/v1/models/chat-default \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{"chat_default_model": "gpt-4o"}'

Example Response

{
  "chat_default_model": "gpt-4o",
  "request_id": "req_01J8X..."
}

Returns 400 if the model ID is empty, or if the model is not in the chat allowed list (when one is configured). Returns 422 for unknown model IDs.


Get Chat Allowed Models

GET /api/v1/models/chat-allowed
Authorization: Bearer aira_live_xxxxx

Returns the list of models allowed for chat conversations. When null, all enabled models are allowed.

Example Response

{
  "chat_allowed_models": ["gpt-4o", "claude-sonnet-4-20250514"],
  "request_id": "req_01J8X..."
}

Response Fields

FieldTypeDescription
chat_allowed_modelsstring[]|nullAllowed model IDs for chat, or null if all enabled models are allowed
request_idstringUnique request identifier

Set Chat Allowed Models

PUT /api/v1/models/chat-allowed
Authorization: Bearer aira_live_xxxxx
Content-Type: application/json

Set which models are allowed for chat. Pass null or an empty list to allow all enabled models.

Request Body

FieldTypeRequiredDescription
chat_allowed_modelsstring[]|nullNoModel IDs to allow for chat. null or [] means all enabled models are allowed.

Example Request

curl -X PUT https://api.aira.law/api/v1/models/chat-allowed \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{"chat_allowed_models": ["gpt-4o", "claude-sonnet-4-20250514"]}'

Example Response

{
  "chat_allowed_models": ["gpt-4o", "claude-sonnet-4-20250514"],
  "request_id": "req_01J8X..."
}

When the allowed list is set to null, any enabled model can be used in chat. Setting a specific list restricts chat to only those models.

On this page