> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akhara.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Company name is Akhara AI (never Rubric AI). Keep lowercase rubric/rubrics only when meaning grading criteria.
> Expert Review (docs path talent/) is enterprise BYO experts for audit and review: invite customer specialists; do not pitch Akhara recruiting or a public expert career portal. RLHF and domain writing are secondary work types.
> Prefer concrete API examples against public hosts: Environments eval API https://agi.akhara.ai, Control plane PDP https://api.akhara.dev, Evaluation https://app.akhara.ai / https://api.akhara.ai, Expert Review portal https://talent.akhara.ai.
> Do not invent a public hostname for private orchestrators or env API internals.
> Do not confuse control-plane latches with Environments confirmation latches.
> Environments SDK/API examples: curl against https://agi.akhara.ai. Evaluation SDK: from akhara import Akhara and AKHARA_API_KEY.
> Start with /llms.txt for the docs index and OpenAPI links; fetch individual pages as .md exports.

# LLM Providers

> Connect Akhara to OpenAI, Anthropic, Azure OpenAI, Google Vertex AI, and custom model endpoints for comprehensive AI evaluation.

## Supported Providers

Akhara integrates with major LLM providers to evaluate your AI models in production.

| Provider         | Models                        | Integration Method |
| ---------------- | ----------------------------- | ------------------ |
| OpenAI           | GPT-4, GPT-4 Turbo, GPT-3.5   | API Key            |
| Anthropic        | Claude 3, Claude 2            | API Key            |
| Azure OpenAI     | GPT-4, GPT-3.5 (Azure-hosted) | Azure AD / API Key |
| Google Vertex AI | Gemini Pro, PaLM 2            | Service Account    |
| AWS Bedrock      | Claude, Titan, Llama 2        | IAM Role           |
| Custom Endpoints | Any OpenAI-compatible API     | API Key / OAuth    |

## OpenAI Integration

```python title="openai_integration.py" theme={null}
from akhara import Akhara

client = Akhara(api_key="gr_live_xxxxxxxx")

# Configure OpenAI integration
client.integrations.llm.configure(
    provider="openai",
    api_key="sk-xxxxxxxx",  # Stored encrypted

    # Optional: Organization ID
    organization_id="org-xxxxxxxx",

    # Optional: Custom base URL for proxies
    base_url="https://api.openai.com/v1"
)

# Log calls with automatic model detection
client.calls.log(
    project="patient-triage",
    model="gpt-4-turbo",
    input={"messages": [...]},
    output={"response": "..."}
)
```

## Anthropic Integration

```python title="anthropic_integration.py" theme={null}
from akhara import Akhara

client = Akhara(api_key="gr_live_xxxxxxxx")

# Configure Anthropic integration
client.integrations.llm.configure(
    provider="anthropic",
    api_key="sk-ant-xxxxxxxx"
)

# Log Claude calls
client.calls.log(
    project="symptom-checker",
    model="claude-3-opus",
    input={"prompt": "..."},
    output={"completion": "..."}
)
```

## Azure OpenAI Integration

```python title="azure_openai_integration.py" theme={null}
from akhara import Akhara

client = Akhara(api_key="gr_live_xxxxxxxx")

# Configure Azure OpenAI
client.integrations.llm.configure(
    provider="azure_openai",

    # Azure-specific settings
    azure_endpoint="https://your-resource.openai.azure.com",
    api_version="2024-02-15-preview",

    # Authentication (choose one)
    api_key="xxxxxxxx",
    # Or use Azure AD
    # use_azure_ad=True,
    # tenant_id="your-tenant-id"
)
```

## Google Vertex AI Integration

```python title="vertex_ai_integration.py" theme={null}
from akhara import Akhara

client = Akhara(api_key="gr_live_xxxxxxxx")

# Configure Vertex AI
client.integrations.llm.configure(
    provider="vertex_ai",

    # GCP settings
    project_id="your-gcp-project",
    location="us-central1",

    # Authentication
    credentials_path="/path/to/service-account.json"
    # Or use default credentials
    # use_default_credentials=True
)
```

## AWS Bedrock Integration

```python title="bedrock_integration.py" theme={null}
from akhara import Akhara

client = Akhara(api_key="gr_live_xxxxxxxx")

# Configure AWS Bedrock
client.integrations.llm.configure(
    provider="bedrock",

    # AWS settings
    region="us-east-1",

    # Authentication
    aws_access_key_id="AKIA...",
    aws_secret_access_key="...",
    # Or use IAM role
    # use_iam_role=True
)
```

## Custom Endpoints

Connect to any OpenAI-compatible API:

```python title="custom_endpoint.py" theme={null}
from akhara import Akhara

client = Akhara(api_key="gr_live_xxxxxxxx")

# Configure custom LLM endpoint
client.integrations.llm.configure(
    provider="custom",
    name="internal-medical-llm",

    # Endpoint configuration
    base_url="https://llm.internal.company.com/v1",

    # Authentication
    auth_type="bearer",
    api_key="your-internal-key",

    # Optional: Custom headers
    headers={
        "X-Internal-Service": "akhara-eval"
    },

    # Model mapping
    model_aliases={
        "medical-gpt": "internal-medical-v2"
    }
)
```

## Best Practices

| Practice                          | Rationale                               |
| --------------------------------- | --------------------------------------- |
| Use environment variables         | Never hardcode API keys in source code  |
| Rotate keys regularly             | Minimize exposure from compromised keys |
| Set up usage alerts               | Monitor for unexpected API usage spikes |
| Use separate keys per environment | Isolate production from development     |
