Skip to main content

Providers

Providers are the AI services that power each stage of the voice pipeline. VOCALS supports swappable providers for three types: STT (speech-to-text), LLM (language model), and TTS (text-to-speech).

Each provider configuration stores an encrypted API key, the selected model, and optional provider-specific settings. Agents reference provider IDs to define their pipeline.

Available Providers

TypeNameDescription
sttdeepgramDeepgram Nova real-time STT
sttopenaiOpenAI Whisper API STT
sttwhisperOpenAI Whisper (local) STT
sttelevenlabsElevenLabs STT
sttqwenAlibaba Qwen STT
llmopenaiOpenAI GPT models
llmclaudeAnthropic Claude models
llmgoogleGoogle Gemini models
llmkimiMoonshot Kimi models
ttsdeepgramDeepgram TTS
ttsopenaiOpenAI TTS
ttselevenlabsElevenLabs TTS
ttsqwenAlibaba Qwen TTS
ttsresembleResemble AI TTS

List Providers

GET /providers

Returns all provider configurations for the current tenant, ordered by type and name.

Response

[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "stt",
"name": "deepgram",
"model_id": "nova-2",
"extra_config": null,
"is_active": true,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-02-20T14:00:00Z"
}
]

Response Fields

FieldTypeDescription
iduuidProvider config ID
typestringstt, llm, or tts
namestringProvider name (e.g. deepgram, openai)
model_idstringSelected model identifier
extra_configobject | nullProvider-specific configuration
is_activebooleanWhether the provider is active
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp

The API key is never returned in responses.

Get Provider

GET /providers/{provider_id}

Returns a single provider configuration.

Response

Same schema as the list item above.

Create Provider

POST /providers

Request Body

{
"type": "stt",
"name": "deepgram",
"api_key": "dg_live_abc123...",
"model_id": "nova-2",
"extra_config": { "language": "en" },
"is_active": true
}

Request Fields

FieldTypeRequiredDefaultDescription
typestringYes--Provider type: stt, llm, or tts
namestringYes--Provider name (must be a registered provider)
api_keystringYes--Provider API key (encrypted before storage)
model_idstringYes--Model identifier to use
extra_configobjectNonullProvider-specific settings
is_activebooleanNotrueWhether the provider is active

Response

201 Created -- Returns the ProviderResponse object.

If the type is not stt, llm, or tts, the API returns 400. If the name is not a registered provider for the given type, the API returns 400 with the list of available providers.

Update Provider

PUT /providers/{provider_id}

Update a provider's API key, model, configuration, or active status. Only include the fields you want to change.

Request Body

{
"api_key": "new_key_here",
"model_id": "nova-2-general",
"is_active": true
}

Request Fields

FieldTypeRequiredDescription
api_keystringNoNew API key (re-encrypted)
model_idstringNoNew model identifier
extra_configobjectNoUpdated provider-specific settings
is_activebooleanNoEnable or disable the provider

Response

200 OK -- Returns the updated ProviderResponse.

Delete Provider

DELETE /providers/{provider_id}

Permanently deletes a provider configuration. Any agents referencing this provider will need to be updated.

Response

204 No Content

List Available Models

GET /providers/{provider_id}/models

Fetches the list of available models for a saved provider using its stored API key. Queries the provider's API when possible, or returns a hardcoded list for providers that do not support model enumeration.

Response

{
"models": ["nova-2", "nova-2-general", "nova-2-meeting"],
"source": "api"
}
FieldTypeDescription
modelsarray[string]Available model identifiers
sourcestringapi (fetched from provider), hardcoded (static list), or error (fetch failed)

Fetch Models (Ad-hoc)

POST /providers/models

Fetch available models without saving a provider configuration. Useful for testing an API key before creating a provider.

Request Body

{
"type": "stt",
"name": "deepgram",
"api_key": "dg_live_abc123..."
}

Response

Same ProviderModelsResponse schema as above.

Test Provider

POST /providers/{provider_id}/test

Validates that a saved provider's API key and configuration are working correctly. Calls the provider's validate() method.

Response

{
"success": true,
"message": "Provider deepgram (stt) is working correctly."
}
FieldTypeDescription
successbooleanWhether validation passed
messagestringHuman-readable result message

Returns 400 if the API key is invalid, or a response with success: false if validation fails for other reasons.