Skip to main content
Serve Claude and OpenAI models from your own cloud account, so usage bills there. Save the credential, then bind models to it with model_providers in a router file.

Amazon Bedrock

Supported Claude models can be served through Bedrock:
Bedrock uses us. cross-region inference profiles by default. The credential’s AWS Region selects the Bedrock endpoint. A region in an inference-profile ARN takes precedence. Save one of three credential types under Subscriptions & Keys → Add Credential → Amazon Bedrock:
  • AWS Role (recommended). Dari assumes an IAM role in your account, so no long-lived key leaves it.
  • API Key. A Bedrock API key, the same as AWS_BEARER_TOKEN_BEDROCK. Its IAM identity needs bedrock:CallWithBearerToken.
  • AWS IAM. A saved access key ID, secret access key, optional session token, and AWS Region.
The identity must be allowed to invoke every model or inference profile you select.

AWS Role

  1. Choose AWS Role in the dialog. It shows the trust policy your role needs, which trusts Dari’s AWS principal and requires your Dari organization ID as the External ID.
  2. Create the role with that trust policy.
  3. Save the role ARN and AWS Region.
GET /v1/organizations/current/credentials returns the same trust values in aws_assume_role.

AWS IAM

Omit --aws-session-token-env for long-lived keys. Instance profiles and ambient AWS credentials are not supported.

Microsoft Azure

A Microsoft Foundry resource (https://<resource>.services.ai.azure.com) serves OpenAI and Claude models. A classic Azure OpenAI resource (https://<resource>.openai.azure.com) serves OpenAI models only.
Save the resource’s API key and endpoint, without a path, under Subscriptions & Keys → Add Credential → Microsoft Azure, or:
  • Keep Foundry’s default deployment names. Dari sends the model name as the deployment name.
  • Key-based authentication must be on for the resource. Microsoft Entra ID is not supported.
  • Change the endpoint without re-entering the key with dari accounts provider update <credential_id> "Azure" --azure-endpoint <url>.

Details

API responses show only non-secret metadata: the authentication type, AWS Region, Azure endpoint, and for AWS Role, the role ARN and External ID. Dari caches assumed-role credentials, and a new role ARN or Region applies on the next request.
OpenAI deployments are called through the Azure OpenAI v1 Responses API (/openai/v1), and Claude deployments through the Foundry Messages API (/anthropic).
When a zero-data-retention router binds a model to a gateway, Dari limits that gateway to zero-data-retention upstreams.