Optiak Docs
Authentication

Connect Model APIs

Prepare provider keys and connect the model APIs your applications need.

Connect a model provider so Optiak can call its models on your organization's behalf. Your services keep using an Application API key; they do not send provider keys with Gateway requests.

Required role

Organization Admin

Applies to

LLM requests
Organization Admins connect model providers and enable the models applications can use.

How provider keys work

A provider key authenticates Optiak to a model provider, using the access available through that provider account. A key can be available to the organization or limited to selected projects or applications. Optiak stores provider keys encrypted and does not show their values again after saving.

Connecting a key does not enable every model for every application. The organization enables models, and applications select from those allowed to them. Provider permissions, billing, quotas, and model availability still apply.

The table below shows which credentials to prepare for each provider.

ProviderAuthenticationAccount or identity usedBefore you connect
OpenAIProvider keyOpenAI provider accountKey permissions for the intended models
AnthropicProvider keyAnthropic provider accountActive account with billing enabled
AWS BedrockAmazon Bedrock API keyAWS identity associated with the keyModel access, IAM permissions, and a compatible key type and region
AzureProvider key and resource nameAzure OpenAI resourceModels deployed in the resource
GoogleGemini provider keyGoogle Cloud project selected in AI StudioBilling, quota, and regional availability
Vertex AIService-account JSON keyGoogle Cloud service accountVertex AI API, IAM role, billing, and quotas
MistralProvider keyMistral provider accountAccess to the intended models
CompactifAIProvider keyCompactifAI accountBilling details and payment method
Custom providerProvider key and endpoint base URLAccount accepted by the endpointAn OpenAI-compatible endpoint and its model IDs

Scope and credential order

Scope determines which applications can use a credential. Organization scope includes all current and future applications. Project scope includes applications in the selected projects. Application scope includes only the selected applications. You can combine selected projects and applications.

When several active credentials match a request, Optiak tries application-scoped credentials first, then project-scoped credentials, then organization-wide credentials. Within the same matching scope level, lower Order values are tried first. If the values are equal, the older credential comes first. These rules also apply to subscription connections.

For example, an application-scoped key with Order 10 is tried before a project-scoped key with Order 0. Between two application-scoped keys, 0 is tried before 10.

If authentication fails or a rate limit is reached, Optiak tries the next eligible credential. Other retryable provider failures can move the request to another model deployment; see Fallback models. Invalid requests and timeouts stop retries, as does a streamed response that has already started.

When a request names a model without a provider prefix, scope and order also prioritize credentials across providers offering that model. Naming a provider explicitly keeps the request on that provider's selected deployments before configured fallback models.

Before you connect

  • Use an Organization Admin account to manage providers.
  • Choose the provider account or service account whose models and billing your applications should use. Prepare a key with permission to call the intended models.
  • Confirm the provider's billing, quotas, and any model-access prerequisites.
  • Have the provider-specific details ready, such as an Azure resource name, a service-account JSON key, or a custom endpoint base URL.

In Company setup → Providers, select Add provider, choose the provider, give the connection a Name, enter its credentials, and choose the organization, projects, or applications that can use them. See Supported providers for preparation steps and provider-specific fields. For subscription-backed models such as Codex, see Connections instead.

After you connect

  1. In Company setup → Models, enable the models your organization wants applications to use. Custom provider models appear separately and do not require a built-in provider key.
  2. Select the application's models by following Models and Routing. Applications can use only models enabled by the organization and available to them.
  3. Use the application's key to call GET /models and check its available model IDs, then send a request using one of those IDs. See Using the API for request examples.

If you rotate or revoke a provider key, update the saved credentials in Optiak. Requests using an expired or revoked key fail even if the application's own key is still valid.

Supported providers

Troubleshooting

  • Authentication fails: Send a valid Application API key, not a provider key, to the Gateway. If the provider rejects authentication, replace its expired or revoked key in Company setup → Providers.
  • Model is missing: Check the credential's scope, organization enablement, and application model selection. For custom providers, add the model first. Use an ID returned by GET /models; see Models and Routing.
  • Requests fail after key rotation: Update the saved provider key in Company setup → Providers. Rotating it at the provider does not update Optiak.
  • Billing, quota, or access error: Check billing, remaining quota, and model permissions in the connected provider account. Enabling a model in Optiak does not grant provider access or increase quota.
  • AWS Bedrock fails: Use an Amazon Bedrock API key, not an AWS access-key/secret-key pair. Check expiry, region, IAM permissions, and model access.
  • Azure fails: Use a key and Resource name from the same resource, with the model deployed there. Enter the name, not the endpoint URL; see Azure.
  • Vertex AI fails: Paste the full service-account JSON key, not a Gemini key. Check the API is enabled and the account has the required role.
  • Custom provider fails: Check the OpenAI-compatible Base URL, key, and upstream model ID. Gateway requests use the Optiak public model ID.

Never include Application API keys or provider keys in support messages or logs.

  • Authentication: create and manage the Application API keys your services send to Optiak.
  • Models and Routing: choose the models an application can use.
  • Connections: connect subscription-backed models, tools, and data sources.
Copyright © 2026