AI LLMs - Bring Your Own Keys

Use your own OpenAI, Azure OpenAI, or Anthropic API keys instead of App2 credits. Bring Your Own Keys (BYOK) is available exclusively to Lifetime subscribers.

Written By Nick Gatzoulis

Last updated 3 months ago

What is BYOK?

BYOK (Bring Your Own Keys) lets you use your own AI provider API keys for code generation instead of consuming App2 credits.

How it works:

  • Connect your OpenAI, Azure OpenAI, or Anthropic API keys to your workspace

  • Toggle BYOK on individual projects

  • All AI operations use your keys

  • No App2 credits consumed

Benefits:

  • Zero credit cost: Don't spend App2 credits on AI operations

  • Unlimited usage: Use as much as your API provider allows

  • Provider choice: Choose your preferred AI provider

  • Cost control: Manage AI costs directly with providers

  • Exclusive feature: Only available to Lifetime subscribers

Requirements:

  • Lifetime subscription ($400 one-time)

  • API keys from supported providers

  • Workspace owner or admin role

Supported providers

App2 supports three AI providers for BYOK.

Provider comparison

Provider

Models Used

OpenAI

GPT 5 Codex

Azure OpenAI

GPT 5 Codex

Anthropic

Claude Sonnet 4.5

OpenAI

Standard OpenAI API from OpenAI directly.

What you need:

Used for: General code generation, analysis, chat

Azure OpenAI

OpenAI models hosted on Microsoft Azure.

What you need:

  • Azure account with OpenAI service

  • Azure resource endpoint URL

  • API version

  • Azure OpenAI API key

Used for: Same as OpenAI, but through Azure infrastructure

Extra configuration: Azure requires endpoint URL and API version in addition to the key.

Note: Only ONE of OpenAI or Azure OpenAI can be enabled at a time. They're interchangeable.

Anthropic Claude

Anthropic's Claude AI models.

What you need:

Used for: Code generation, complex reasoning, detailed analysis

Prerequisites

Before connecting AI keys, ensure you have:

  1. Lifetime subscription: BYOK requires Lifetime tier ($400 one-time)

  2. Workspace role: Owner or Admin permissions

  3. API keys: Active keys from your chosen providers

  4. Provider account: Account with OpenAI, Azure, or Anthropic

Getting API keys:

OpenAI:

  1. Go to platform.openai.com

  2. Navigate to API keys section

  3. Create new secret key

  4. Copy key immediately (shown once)

Azure OpenAI:

  1. Go to Azure Portal

  2. Find your OpenAI resource

  3. Get endpoint URL from Overview (e.g., https://your-resource.openai.azure.com)

  4. Get API key from Keys and Endpoint section

  5. Note API version (e.g., 2024-08-01-preview)

Anthropic:

  1. Go to console.anthropic.com

  2. Navigate to API keys section

  3. Create new API key

  4. Copy key immediately

Setup steps

Adding OpenAI

  1. Go to Workspace SettingsIntegrationsAI LLMs

  2. Find OpenAI section

  3. Click in the API key field

  4. Paste your OpenAI API key

  5. Click "Save OpenAI key"

  6. Key is validated and saved

  7. Toggle switch shows "Enabled" (green)

Your OpenAI key is now active for all workspace projects using BYOK.

Adding Azure OpenAI

Azure requires additional configuration beyond the API key.

  1. Go to Workspace SettingsIntegrationsAI LLMs

  2. Find Azure OpenAI section

  3. Enter API Key: Your Azure OpenAI API key

  4. Enter Azure Endpoint: Full endpoint URL (e.g., https://your-resource.openai.azure.com)

  5. Enter API Version: Azure API version (e.g., 2024-08-01-preview)

  6. Click "Save Azure OpenAI key"

  7. Configuration validated and saved

  8. Toggle switch shows "Enabled" (green)

Important: Azure OpenAI and regular OpenAI cannot both be enabled. Enabling Azure disables OpenAI automatically.

Adding Anthropic Claude

  1. Go to Workspace SettingsIntegrationsAI LLMs

  2. Find Anthropic section

  3. Click in the API key field

  4. Paste your Anthropic API key

  5. Click "Save Anthropic key"

  6. Key is validated and saved

  7. Toggle switch shows "Enabled" (green)

Your Anthropic key is now active for all workspace projects using BYOK.

Provider rules

Mutual exclusivity

OpenAI and Azure OpenAI cannot both be enabled at the same time.

Why: They use the same models (GPT-5, etc.) but different infrastructures. Only one can be active.

Automatic switching:

  • Enable OpenAI → Azure OpenAI disabled automatically

  • Enable Azure OpenAI → OpenAI disabled automatically

Visual indicator:

  • Enabled provider shows green "Enabled" badge

  • Disabled provider shows gray "Disabled" badge

  • Info banner explains the rule

Other providers: Anthropic is independent. Can be enabled alongside either OpenAI or Azure OpenAI.

Enable/disable providers

Control which providers are active without removing keys.

How to toggle:

  1. Go to Workspace SettingsIntegrationsAI LLMs

  2. Find the provider

  3. Click the toggle switch

  4. Provider enabled or disabled immediately

Enabled (green):

  • Provider is active

  • Can be used for BYOK projects

  • Keys are available to AI operations

Disabled (gray):

  • Provider inactive

  • Keys stored but not used

  • Won't be selected for BYOK projects

Tip: Disable providers temporarily without removing keys. Useful for testing different providers or controlling costs.

Using BYOK

Once providers are configured, enable BYOK on individual projects.

Enabling BYOK for a project

Per-project control:

  1. Open your project

  2. Go to Project SettingsGeneral

  3. Find "AI Credit Usage" section

  4. Toggle "Use my AI LLM keys (BYOK)" to ON

  5. Badge changes to "Active" (green)

  6. Project now uses your AI keys

Project updates:

  • Sandbox reconfigures automatically

  • Future code generation uses your keys

  • No App2 credits consumed

Requirements:

  • At least one provider must be enabled

  • Project must be in Ready or Failed status

  • Workspace must be Lifetime tier

BYOK for Figma imports

Choose credit type when importing Figma designs.

How to use:

  1. Click "Import Figma" on homepage

  2. Paste Figma URL

  3. Find "Use my AI keys (BYOK)" toggle

  4. Toggle ON to use your keys

  5. Toggle OFF to use App2 credits

  6. Continue with import

Benefits:

  • Figma analysis doesn't consume App2 credits

  • Same quality analysis

  • Uses your enabled providers

Requirements:

  • Lifetime subscription

  • At least one enabled provider

  • Available before import starts

Managing providers

Viewing provider status

Status indicators:

  • Configured: Green checkmark—key is saved

  • Not configured: Gray—no key added yet

  • Enabled: Green badge—provider is active

  • Disabled: Gray badge—provider inactive

Where to view: Go to Workspace SettingsIntegrationsAI LLMs

Updating API keys

Replace existing keys with new ones.

How to update:

  1. Go to AI LLMs settings

  2. Find the provider

  3. Click in the masked key field (••••••••)

  4. Field clears automatically

  5. Paste new API key

  6. Click "Save [Provider] key"

  7. New key validated and saved

When to update:

  • Key expired or revoked

  • Rotating keys for security

  • Switching accounts

  • Key compromised

Removing providers

Delete stored API keys from your workspace.

How to remove:

  1. Go to AI LLMs settings

  2. Find the provider

  3. Click "Remove [Provider]" button

  4. Confirm deletion

  5. Key removed from workspace

What happens:

  • Key permanently deleted

  • Provider shows as "Not configured"

  • Projects using this provider switch to remaining providers

  • If no providers remain, BYOK toggle disabled

Warning: Removing a provider while projects use it may cause errors. Disable the provider first, then remove.

Best practices

Security

Protect your API keys:

  • Never share keys publicly

  • Rotate keys regularly

  • Use separate keys for production/testing

  • Monitor usage in provider dashboards

  • Revoke compromised keys immediately

App2 security:

  • Keys encrypted at rest in database

  • Only workspace owners/admins can view/manage

  • Keys never exposed in logs or UI (masked)

  • Secure transmission (HTTPS)

Provider selection

Choose OpenAI when:

  • You want fastest setup

  • Standard OpenAI API is sufficient

  • No enterprise compliance needs

  • Direct billing with OpenAI

Choose Azure OpenAI when:

  • Enterprise compliance required

  • Using existing Azure infrastructure

  • Need Azure security features

  • Regional data requirements

Choose Anthropic when:

  • Prefer Claude's reasoning

  • Need detailed code analysis

  • Want alternative to OpenAI

  • Testing provider performance

Use multiple providers:

  • Enable Anthropic + OpenAI (or Azure)

  • App2 intelligently selects provider

  • Fallback if one fails

  • Test quality differences

Cost management

Monitor provider costs:

  • Check usage in provider dashboards

  • Set spending limits in provider accounts

  • Disable providers to control costs

  • Use App2 credits for small projects, BYOK for large

Project strategy:

  • Enable BYOK on active projects

  • Use App2 credits for experiments

  • Monitor per-project usage

  • Disable BYOK if provider costs exceed App2 credits

Testing providers

Compare performance:

  1. Enable multiple providers

  2. Test same prompt with different providers

  3. Compare code quality and speed

  4. Choose preferred provider

  5. Disable others to save costs

Troubleshooting

Can't add API key (not Lifetime)

BYOK toggle disabled on project

Can't enable both OpenAI and Azure

Azure OpenAI key not working

Provider key validation failed

BYOK not saving credits

FAQ

Related links