Overview
Theintegration-api is the provider execution layer. It sits between assistant-api and every external AI provider — OpenAI, Anthropic, Deepgram, ElevenLabs, and others. It stores all provider credentials encrypted at rest and is the only service in the platform that ever holds or transmits plaintext API keys.
Port
9004 — HTTP · gRPC (cmux)Language
Go 1.25
Gin (REST) + gRPC
Storage
PostgreSQL
integration_db
Redis (provider cache)The
integration-api is the only service that decrypts and uses provider API keys. Keys are decrypted in-memory per request and never written to logs, forwarded to other services, or stored in plaintext anywhere on disk.Components
Caller Layer — Provider API implementations
Caller Layer — Provider API implementations
Each external provider is implemented as a Go package under
api/integration-api/internal/caller/<provider>/. Every package follows a consistent structure:The
caller/callers.go factory registers all providers and routes execution to the correct implementation based on the credential type stored in integration_db.Adding a new LLM providerCreate api/integration-api/internal/caller/<provider>/ with the above files, then register in callers.go. No changes to other services are needed.Credential Encryption
Credential Encryption
Credentials follow a strict encrypt-on-write, decrypt-on-use lifecycle:
OAuth 2.0 Integration
OAuth 2.0 Integration
For providers that use OAuth (e.g., Google, GitHub), integration-api manages the full OAuth flow: redirect, callback, token storage, and automatic refresh.
Supported Providers
- LLM
- STT
- TTS
- Telephony
Configuration
Editdocker/integration-api/integration.yml before starting the service. The variable names below map to nested YAML keys, so POSTGRES__HOST corresponds to postgres.host.
Required variables
Optional OAuth variables
Full environment file
Running
- Docker Compose
- From Source
Health & Observability
Troubleshooting
Credential test fails for a provider
Credential test fails for a provider
- Verify the API key has the correct permissions for your account tier.
- Check the provider’s status page for outages.
- Confirm
INTEGRATION_CRYPTO_KEYhas not changed since the credential was stored.
LLM streaming times out
LLM streaming times out
- Check
make logs-integrationfor provider-side timeout errors. - Increase
POSTGRES__MAX_OPEN_CONNECTIONif database contention is visible. - For Azure OpenAI: confirm the deployment name in the credential matches the actual Azure deployment.
Stored credentials unreadable after restart
Stored credentials unreadable after restart
INTEGRATION_CRYPTO_KEY has changed between restarts. Credentials encrypted with the old key cannot be decrypted. Set the key back to its original value, or re-enter all provider credentials through the dashboard.Next Steps
Assistant API
How integration-api is called during a live voice conversation.
Endpoint API
Webhook delivery after call events.
Configuration Reference
Full environment variable reference.
Architecture
Full system topology.