Aira

Provider Credentials

Configure provider API keys and cloud platform credentials.

Overview

Provider Credentials let you configure API keys and cloud platform credentials for all supported providers. Credentials are set at the organization level and apply to all API keys in your organization.

When configured, Aira routes model calls through your accounts — giving you direct billing, higher rate limits, and full control over provider relationships.

In the dashboard, all provider credentials are managed from the Models → Providers tab. Direct API keys (OpenAI, Anthropic, Google) appear at the top, and cloud platform credentials (AWS Bedrock, Azure OpenAI, Vertex AI) appear under Cloud Deployments. Both use the same API described below.


Set / Merge Credentials

POST /api/v1/provider-credentials
Authorization: Bearer aira_live_xxxxx

Each POST merges new provider credentials with your existing configuration. Setting OpenAI credentials, then later setting Anthropic credentials, results in both being configured.

Credential Types

Provider credentials come in four types depending on the provider.

Direct API Providers (openai, anthropic, google)

FieldTypeRequiredDescription
typestringYes"api_key"
api_keystringYesYour provider API key

AWS Bedrock (slug: bedrock)

FieldTypeRequiredDescription
typestringYes"aws"
access_key_idstringYesAWS access key ID
secret_access_keystringYesAWS secret access key
regionstringNoAWS region (default: "us-east-1")

Azure OpenAI (slug: azure)

FieldTypeRequiredDescription
typestringYes"azure"
endpointstringYesAzure OpenAI endpoint URL (must be HTTPS)
api_keystringYesAzure API key
api_versionstringNoAPI version (default: "2024-10-21")

Google Vertex AI (slug: vertex)

FieldTypeRequiredDescription
typestringYes"vertex"
project_idstringYesGCP project ID
regionstringNoGCP region (default: "us-central1")
service_account_jsonstringNoService account key JSON (for non-ADC auth)

Example: Direct API Key (OpenAI)

curl -X POST https://api.airaproof.com/api/v1/provider-credentials \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openai",
    "credentials": {
      "type": "api_key",
      "api_key": "sk-proj-abc123..."
    }
  }'

Example: Direct API Key (Anthropic)

curl -X POST https://api.airaproof.com/api/v1/provider-credentials \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "anthropic",
    "credentials": {
      "type": "api_key",
      "api_key": "sk-ant-xyz789..."
    }
  }'

Example: AWS Bedrock

curl -X POST https://api.airaproof.com/api/v1/provider-credentials \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "bedrock",
    "credentials": {
      "type": "aws",
      "access_key_id": "AKIA...",
      "secret_access_key": "wJalr...",
      "region": "us-east-1"
    }
  }'

Example: Azure OpenAI

curl -X POST https://api.airaproof.com/api/v1/provider-credentials \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "azure",
    "credentials": {
      "type": "azure",
      "endpoint": "https://your-resource.openai.azure.com",
      "api_key": "abc123...",
      "api_version": "2024-10-21"
    }
  }'

Example: Google Vertex AI

curl -X POST https://api.airaproof.com/api/v1/provider-credentials \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "vertex",
    "credentials": {
      "type": "vertex",
      "project_id": "your-gcp-project",
      "region": "us-central1"
    }
  }'

Response (200 OK)

{
  "message": "Credentials saved for openai",
  "request_id": "req_01J8X..."
}

Credentials are encrypted at rest and never returned in API responses. You can overwrite them but not read them back.

Each POST merges with existing configuration — it does not overwrite other providers. Setting OpenAI, then Anthropic, then Bedrock results in all three being configured.


Get Credential Status

GET /api/v1/provider-credentials
Authorization: Bearer aira_live_xxxxx

Returns the current credential status for your organization — which providers are configured and their type, without revealing any secrets.

Response (200 OK)

{
  "providers": [
    {
      "slug": "openai",
      "type": "api_key",
      "configured": true
    },
    {
      "slug": "bedrock",
      "type": "aws",
      "configured": true,
      "region": "us-east-1"
    },
    {
      "slug": "azure",
      "type": "azure",
      "configured": true,
      "endpoint": "https://your-resource.openai.azure.com"
    },
    {
      "slug": "vertex",
      "type": "vertex",
      "configured": true,
      "region": "us-central1"
    }
  ],
  "request_id": "req_..."
}

Response Fields (ProviderStatusItem)

FieldTypeDescription
slugstringProvider identifier (openai, anthropic, google, bedrock, azure, vertex)
typestringCredential type (api_key, aws, azure, vertex)
configuredbooleanWhether credentials are set for this provider
regionstring|nullRegion (for bedrock and vertex)
endpointstring|nullEndpoint URL (for azure)

Delete Credentials

DELETE /api/v1/provider-credentials?provider=xxx
Authorization: Bearer aira_live_xxxxx

Removes credentials for the specified provider.

Example

curl -X DELETE "https://api.airaproof.com/api/v1/provider-credentials?provider=openai" \
  -H "Authorization: Bearer aira_live_xxxxx"

Response (200 OK)

{
  "message": "Credentials removed for openai",
  "request_id": "req_..."
}

How It Works

  1. Credentials are organization-level, not per-API-key — all API keys in your org share the same provider credentials
  2. Each POST merges new providers with existing config — other providers are preserved
  3. When running cases, Aira checks org credentials first, then falls back to platform-managed keys (cloud mode only)
  4. Credentials are encrypted at rest and never returned in responses
  5. This is transparent to the case API — request and response shapes are identical regardless of credential source

Self-Hosted Deployments

In self-hosted mode (DEPLOYMENT_MODE=selfhosted), provider credentials must be configured for all providers you want to use — there are no platform-managed keys. The dashboard reflects this by showing "Not configured" instead of "Managed by Aira" for unconfigured providers.

On this page