Connecting AI model providers

Your Runtype account includes platform keys, so you can use popular AI models without adding provider accounts. Connect your own keys in Settings if you want dedicated rate limits, direct provider billing, or the provider’s full model catalog.

For a full comparison, see Platform Keys vs. Bring Your Own Key (BYOK).

Use platform keys

Your account includes platform keys for popular models from OpenAI, Anthropic, Google, xAI, and open-source models through Mixlayer (SDK). You can build Flows and Agents without additional setup.

Add your own keys

Add your own provider keys when you need dedicated rate limits, direct provider billing, the provider’s full model catalog, or more capacity for high-volume production workloads. Adding your own keys is optional.

Supported providers

Use these categories to understand how Runtype routes models:

  • Direct providers: OpenAI, Anthropic, Google, and xAI.
  • Inference providers: Amazon Bedrock, Vertex AI, and Mixlayer (SDK).
  • Gateway providers: Vercel AI Gateway, OpenRouter, Cloudflare Workers AI, and Azure.
  • OpenAI-compatible providers: Any provider with an OpenAI-compatible endpoint through OpenAI Compatible.

You can use models from Mistral, Cohere, AI21, Meta, DeepSeek, and Qwen through these inference and gateway providers.

Add a provider

To add a provider, start with a model or a provider connection.

Start from a model

To add a model and its key, follow these steps:

  1. On Settings > Models, open the Providers tab.
  2. Click Add Model and browse or search the catalog.
  3. Select a model.
  4. If the model needs a key that you have not added, enter it when prompted.

Start from a provider

To add a provider key first, follow these steps:

  1. On Settings > Models, open the Providers tab.
  2. On the provider card, click Configure.
  3. Enter the key details.
  4. Click Save API Key. For an organization connection, click Save connection instead.
  5. If you are an organization admin, select Use for the organization after you save it.
  6. Enable the models that you want to use.

You can create organization connections for OpenAI, Anthropic, Google, xAI, Mixlayer (SDK), Vercel AI Gateway, Amazon Bedrock, Vertex AI, Vertex AI (Claude), and OpenAI Compatible. An organization admin selects Use for the organization to make the connection available to every teammate and detached execution.

Connect multiple providers at the same time. For example, use OpenAI for GPT models and image generation, Anthropic for long-context work, and Google for multimodal use cases. Switch between providers in Flows and Agents.

Get provider credentials

Create credentials in each provider’s dashboard, then add them in Settings > Models on the Providers tab.

OpenAI

To add an OpenAI key, follow these steps:

  1. Sign in to OpenAI Platform.
  2. On API keys, create a secret key.
  3. Copy the key and paste it into OpenAI > Configure in Runtype.

Anthropic

To add an Anthropic key, follow these steps:

  1. Sign in to Anthropic Console.
  2. On API Keys, create a key.
  3. Copy the key and paste it into Anthropic > Configure in Runtype.

Google

To add a Google key, follow these steps:

  1. Sign in to Google AI Studio.
  2. Create an API key and copy it.
  3. Paste it into Google > Configure in Runtype.

xAI

To add an xAI key, follow these steps:

  1. Sign in to xAI Console.
  2. Generate an API key and copy it.
  3. Paste it into xAI > Configure in Runtype.

Mixlayer (SDK)

Mixlayer models use platform keys by default. To use a dedicated Mixlayer key, create one and add it in Mixlayer (SDK) > Configure. Follow these steps:

  1. Create an account on Mixlayer.
  2. On the Mixlayer API keys page, generate a key.
  3. Copy the key and paste it into Runtype.

Vercel AI Gateway

You can use Vercel AI Gateway through a platform credential. To use your own Vercel account and limits, add an organization connection and select it for the organization.

To add a Vercel AI Gateway key, follow these steps:

  1. Open Vercel AI Gateway.
  2. Create an API key.
  3. Paste it into Vercel AI Gateway > Configure in Runtype.
  4. If you are an organization admin, select Use for the organization for an organization connection.

Amazon Bedrock

To add Amazon Bedrock credentials, follow these steps:

  1. Create an AWS access key with Bedrock permissions.
  2. Open Amazon Bedrock > Configure in Runtype.
  3. Enter the value in AWS Access Key ID.
  4. Enter the value in AWS Secret Access Key.
  5. Select a region in AWS Region.
  6. Click Save Configuration.
  7. If you are an organization admin, select Use for the organization after you save it.

Vertex AI

Vertex AI is BYOK only. Use Vertex AI for Gemini models and Vertex AI (Claude) for Claude models. Runtype stores them as separate organization connections. Use different service accounts, projects, or regions for each connection. Saving a connection does not select it for organization-wide execution.

To add a Vertex AI connection, follow these steps:

  1. Create a Google Cloud service account with the roles/aiplatform.user permission.
  2. Open Vertex AI > Configure for Gemini models or Vertex AI (Claude) > Configure for Claude models.
  3. Click Upload JSON File and choose the service account key file.
  4. Enter the project ID in GCP Project ID and the region in Region.
  5. Click Save Configuration.
  6. If you are an organization admin, select Use for the organization after you save it.

OpenAI-compatible providers

Connect any provider that exposes an OpenAI-compatible endpoint, including Groq, Fireworks, Perplexity, Ollama, vLLM, and LiteLLM.

To add an OpenAI-compatible endpoint, follow these steps:

  1. Get the endpoint base URL and API key from your provider.
  2. Open OpenAI Compatible > Configure in Runtype.
  3. Enter the base URL and API key.
  4. Add the models that you want to enable with one of these methods:
    • Auto-discover: Click Discover Models. The dashboard sends a request to /v1/models and lists the returned models.
    • Add manually: If the endpoint does not support /v1/models, enter each model ID.
  5. Click Save Configuration.

The Team plan and higher plans include BYOK for OpenAI-compatible endpoints. On plans without BYOK, the dashboard locks OpenAI Compatible and prompts you to add a payment method.

In an organization, each OpenAI-compatible endpoint is an organization-owned connection. Saving or rotating it does not change execution authority. An organization admin selects Use for the organization after the connection is stored. Every teammate and detached execution uses the selected API key and base URL. OpenAI-compatible endpoints are BYOK only. They have no Platform Key option.

Keep your API keys private. Do not share them publicly or commit them to version control.

Reasoning models on OpenAI-compatible endpoints

Runtype has no catalog entry for a model served from a custom endpoint, so it does not know whether the endpoint accepts reasoning_effort for that model. Declare it on the model:

  1. Open the model in OpenAI Compatible > Configure (expand the model’s Advanced Settings), or add it on Settings > Models with OpenAI Compatible as the executor provider.
  2. Turn on Reasoning model.
  3. Choose a Default reasoning effort. This value is sent whenever an agent or flow step sets no reasoning of its own.

Through the API, set reasoning on the model entry when you sync models, or settings.customModel.reasoning on the model configuration: { "supported": true, "defaultEffort": "none" }. The sync_provider_models and create_model_config MCP tools accept the same declaration as reasoning_supported and reasoning_default_effort; a default effort without reasoning_supported: true is rejected.

The declaration is the only opt-in. A model that is not declared, or declared with supported: false, is never sent reasoning_effort, even when an agent or step sets a reasoning effort. This keeps an endpoint that rejects the field working as before. On a declared model, the value on the wire is chosen as follows:

  • reasoning: false on the agent or step sends reasoning_effort: "none".
  • A reasoning effort set on the agent or step (reasoning.reasoningEffort) is sent as given.
  • Otherwise the model’s default effort is sent.

Some providers treat an omitted reasoning_effort as unbounded. Cerebras, for example, lets a Qwen model spend its whole output budget thinking and return no text. For such an endpoint, declare the model and set the default effort to none or low. The model’s reasoning streams as reasoning blocks either way, including into a Persona widget that shows reasoning.

Enable models

To choose the models that appear in model pickers, follow these steps:

  1. On Settings > Models, click Add Model or open a provider card.
  2. Select the models that you want to use.
  3. Confirm that the enabled models appear in model pickers across Runtype, including Flows, Agents, and the Playground.

Enable only the models that you use. This keeps model pickers shorter and more focused.

Connect an endpoint through the API, MCP, or SDK

You can connect an OpenAI-compatible endpoint without the dashboard. Use the Runtype API, the Runtype MCP server, or the Runtype SDK.

Creating a provider key, discovering or syncing models, and creating a model configuration require the BYOK entitlement. Without it, these calls return 402 with code BYOK_NOT_AVAILABLE. Selecting an organization connection requires organization-admin permissions. Use an API key with the INTEGRATIONS:WRITE scope for provider keys and the MODELS:WRITE scope for model configurations.

The setup sequence has three steps. Create a generic-openai provider key with the endpoint’s base URL. Discover its models or supply a manual list. Sync the models that you want to enable. In an organization, the first request returns an organization connection ID. An organization admin selects that connection separately before every teammate and detached execution uses it.

Use the TypeScript SDK to create the key, discover models, and sync the model list. The final method call selects organization-wide execution authority:

TypeScript SDK
1import { RuntypeClient } from '@runtypelabs/sdk'
2
3const client = new RuntypeClient({
4 apiKey: process.env.YOUR_RUNTYPE_API_KEY!,
5})
6
7const key = await client.providerKeys.create({
8 provider: 'generic-openai',
9 name: 'customer-support-endpoint',
10 apiKey: process.env.YOUR_PROVIDER_API_KEY!,
11 settings: {
12 baseUrl: process.env.YOUR_OPENAI_COMPATIBLE_BASE_URL!,
13 },
14})
15
16const { models } = await client.providerKeys.discoverModelsForKey(key.id)
17await client.providerKeys.syncModels(
18 key.id,
19 models.map((model) => ({ id: model.id }))
20)
21
22// Select the connection for organization-wide execution.
23await client.providerKeys.selectOrganizationProviderCredential({
24 provider: 'generic-openai',
25 selection: { connectionId: key.id },
26})

Set these environment variables before you run the sample:

  • YOUR_RUNTYPE_API_KEY: Your Runtype API key.
  • YOUR_PROVIDER_API_KEY: Your OpenAI-compatible provider API key.
  • YOUR_OPENAI_COMPATIBLE_BASE_URL: The provider endpoint base URL.

Use these cURL commands to create the key, discover models, and sync the model list. In an organization, use the final command to select organization-wide execution authority:

cURL
$# 1. Create the provider key
$curl -X POST https://api.runtype.com/v1/provider-keys \
> -H "Authorization: Bearer YOUR_RUNTYPE_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "provider": "generic-openai",
> "name": "customer-support-endpoint",
> "apiKey": "YOUR_PROVIDER_API_KEY",
> "settings": {
> "baseUrl": "YOUR_OPENAI_COMPATIBLE_BASE_URL"
> }
> }'
$
$# The first request returns the credential ID used by the following commands.
$CREDENTIAL_ID=YOUR_CREDENTIAL_ID
$
$# 2. Discover models from the endpoint's /v1/models
>curl -X POST \
> "https://api.runtype.com/v1/provider-keys/${CREDENTIAL_ID}/discover-models" \
> -H "Authorization: Bearer YOUR_RUNTYPE_API_KEY"
>
># 3. Sync the models that you want to enable
>curl -X POST \
> "https://api.runtype.com/v1/provider-keys/${CREDENTIAL_ID}/sync-models" \
> -H "Authorization: Bearer YOUR_RUNTYPE_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "models": [
> {"id": "YOUR_MODEL_ID"}
> ]
> }'
>
># 4. Organization only: select the connection for shared execution
>curl -X PUT https://api.runtype.com/v1/provider-keys/organization-policy \
> -H "Authorization: Bearer YOUR_RUNTYPE_API_KEY" \
> -H "Content-Type: application/json" \
> -d "{
> \"provider\": \"generic-openai\",
> \"selection\": {
> \"connectionId\": \"${CREDENTIAL_ID}\"
> }
> }"

Replace the placeholders in the cURL commands with these values:

  • YOUR_RUNTYPE_API_KEY: Your Runtype API key.
  • YOUR_PROVIDER_API_KEY: Your OpenAI-compatible provider API key.
  • YOUR_OPENAI_COMPATIBLE_BASE_URL: The provider endpoint base URL.
  • YOUR_CREDENTIAL_ID: The providerKey.id value returned by the first request. Assign it to CREDENTIAL_ID in the cURL commands.
  • YOUR_MODEL_ID: A model ID that the endpoint serves.

Through MCP, call the create_provider_key, discover_provider_models, and sync_provider_models tools for the same sequence. Then call select_organization_provider_credential to set organization-wide use. To register one custom model without discovery, call create_model_config with provider: "generic-openai", model_id, and base_url.

Understand BYOK costs

With BYOK, your provider bills you directly. Runtype does not add a separate charge. Check your provider’s billing dashboard for exact costs.

Remove a provider

To remove a provider key or connection, follow these steps:

  1. On Settings > Models, open the Providers tab.
  2. On the provider card, click Manage keys. In an organization, click Manage connections instead.
  3. Click Delete key for the key that you no longer need and confirm the deletion.

In an organization, an admin selects the platform credential before removing the last BYOK connection for OpenAI, Anthropic, Google, xAI, Mixlayer (SDK), or Vercel AI Gateway. This keeps related Flows and Agents on the platform account.

Amazon Bedrock, Vertex AI, Vertex AI (Claude), and OpenAI-compatible endpoints support BYOK only. An admin selects another organization connection before removing the selected credential. If organization BYOK is required and unavailable, calls fail instead of falling back to a platform credential.

For member-scoped providers, platform-backed models keep their existing fallback behavior. If a model uses only your key, update its model selection before removal.

Next steps

Continue with one of these guides: