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

# AI integrations

> Connect, verify, and bind organization-owned AI provider credentials.

Leamout's current Voice Agent execution model is **BYOA** (bring your own AI). Each required provider role uses a credential owned by the same organization as the agent.

## Create and verify an integration

```bash theme={null}
curl -sS -X POST "https://api.leamout.com/v1/ai-integrations/" \
  -H "Authorization: Bearer $LEAMOUT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openai",
    "name": "Production realtime",
    "secret": "YOUR_PROVIDER_SECRET"
  }'
```

The response includes a generated integration `id`. Verify connectivity before binding it:

```bash theme={null}
curl -sS -X POST "https://api.leamout.com/v1/ai-integrations/$INTEGRATION_ID/verify" \
  -H "Authorization: Bearer $LEAMOUT_TOKEN"
```

Verification reports a `connection_state` such as `ready`, `invalid`, or `unavailable`, and may include a `failure_code`. Do not assume a credential is usable merely because creation succeeded.

## Bind it to a Voice Agent

For a realtime engine, bind the `realtime` role:

```bash theme={null}
curl -sS -X PUT "https://api.leamout.com/v1/voice-agents/$VOICE_AGENT_ID/providers/realtime" \
  -H "Authorization: Bearer $LEAMOUT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openai",
    "credential_id": "YOUR_INTEGRATION_UUID",
    "config": {}
  }'
```

Composable agents need separate `stt`, `llm`, and `tts` bindings. A role's provider must match the integration it references. Supported providers and models depend on the current provider catalog, so validate them with your deployment and the agent's readiness report.

You can list integrations, rotate their secrets, remove them, and inspect an agent's provider bindings through the API.

<Warning>
  Keep provider secrets server-side. Do not include provider secrets in an agent's `engine_config` or expose them in tools, logs, or webhook payloads.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.