Skip to content

Agents > Inference & providers

Bring Your Own API Key

Open in ChatGPT ↗
Ask ChatGPT about this page
Open in Claude ↗
Ask Claude about this page
Copied!

Derp lets you bring your own API keys (BYOK) for OpenAI, Anthropic, and Google AI models.

Derp supports Bring Your Own API Key (BYOK) for users who want to connect Derp's agents to their own Anthropic, OpenAI, or Google API accounts.

This lets you use your own API keys for model access, giving you control over model selection, billing, and data routing. See Model Choice for a list of supported models. For xAI's Grok models, you connect a SuperGrok subscription instead of adding an API key.

BYOK provides greater flexibility in model access and ensures Derp never consumes your AI credits for requests routed through your own keys.

For xAI's Grok models, you can also connect your SuperGrok subscription instead of entering an API key. In the Derp app, go to Settings > AI and choose to connect your SuperGrok subscription — Derp opens your browser to complete the connection.

How BYOK differs from custom inference endpoints and BYOLLM

Section titled “How BYOK differs from custom inference endpoints and BYOLLM”

Derp offers several ways to bring your own AI infrastructure. Use this table to pick the right one, and follow the links for full details.

NameMeaningPlans
Bring Your Own API Key (BYOK)Use your own API key for OpenAI, Anthropic, or Google models. Keys are stored locally on your device.Free and all eligible paid plans
Custom inference endpointConnect Derp to an OpenAI-compatible endpoint such as OpenRouter, LiteLLM, z.ai, or an internal gateway.Free and all eligible paid plans
Bring Your Own LLM (BYOLLM)Enterprise-managed inference through your cloud provider (AWS Bedrock today; Azure Foundry and Google Vertex coming soon), with Derp handling routing, orchestration, governance, and observability.Enterprise only
SuperGrok subscriptionConnect your SuperGrok subscription to use Grok models through your xAI account. Tokens are stored locally on your device.Free and all eligible paid plans

See Derp pricing for current plan availability.

Platform credits apply to every cloud agent run on any plan, and to local agent runs on Business and Enterprise when using BYOK, a custom inference endpoint, or BYOLLM. See platform credits for the full breakdown.

When you add your own model API keys in Derp, those keys are stored only on your device (in your OS keychain or equivalent secure storage), never on Derp's servers. They're used to make requests to your chosen model provider.

When you send a prompt using a model with the key icon:

  1. Your local Derp client pulls your API key from your device's secure storage and sends it up to Derp's backend along with your prompt.
  2. Derp's agent harness, which runs on Derp's backend, assembles the full request (system instructions, conversation context, tools) and uses your key in-flight to call your chosen model provider (Anthropic, OpenAI, or Google).
  3. The provider's response streams back through Derp's backend to your client.

Your API key passes through Derp's servers each time you send a request, but Derp never stores it there — it's used only in-flight to call the provider, then discarded.

When a model is selected using your own key:

  • Derp does not consume any of your credits.
  • Costs are billed directly through your model provider account.
  • Derp does not retain or store your API key on any of its servers.

Diagram showing how Derp authenticates BYOK agent requests with your provider API key, bypassing Derp credits.

To enable and configure your API keys:

  1. Open Settings and search for API keys to jump to the BYOK configuration.
  2. Add your API key(s) for Anthropic, OpenAI, or Google.
  3. Once added, you'll see a key icon next to supported models in the model picker.

Key icon shown next to supported models in the model picker after BYOK API keys are configured.

When you explicitly select a model with a key icon, Derp routes requests through your own API key instead of consuming Derp's credits.

Derp's Auto models dynamically route requests across different models based on context and performance. Because this routing logic depends on Derp's infrastructure, Auto always consumes Derp's credits, even if you've configured your own API keys.

To use your own key, select a specific provider model (for example, Claude Opus 4.7, Claude Sonnet 4.6, GPT-5.5, or Gemini 3.1 Pro) directly from the model picker with a key icon.

When you select a model with the key icon in your model picker, Derp routes the request through your API key. In that case:

  • Inference is billed directly through your provider account rather than drawing from your Derp AI credits.
  • Agent Mode prioritizes BYOK over any available Derp credits.

Other AI features in Derp

Some AI-powered features are not affected by BYOK and are included as part of Derp’s paid plans.

FeatureUses Derp's creditsDescription
Active AI RecommendationsNoAlways included with Build and higher plans.
Codebase ContextYesUses Derp's AI infrastructure and consumes credits.
Cloud AgentsYesBYOK keys are stored locally and not available to cloud-hosted runs.

These features will continue to function normally regardless of whether you’ve configured BYOK.

If Derp detects an issue with your API key, you’ll see a clear error message corresponding with the AI request.

If your key:

  • Is invalid: Derp notifies you and halts the request.
  • Hits usage or rate limits: Derp will not retry using credits.

You can update or replace your keys anytime by opening Settings and searching for API keys.

Failover and fallback:

By default, Derp does not fall back to your credits when a BYOK request fails.

You can choose to enable Derp credit fallback. When enabled, if an agent request fails with your BYOK model (for example, due to an API error or quota limit), Derp will automatically route the request to one of Derp’s provided models. Derp always prioritizes your API keys first and only uses Derp credits when necessary.

Setting to enable Derp credit fallback when a BYOK request fails.

Derp is SOC 2 compliant and has Zero Data Retention (ZDR) policies with all of its contracted LLM providers. No customer AI data is retained, stored, or used for training by the model providers.

BYOK prompts and responses transit Derp's backend (see How BYOK works). Derp does not use this content for training; retention and analytics handling follow the same account-level privacy and telemetry settings that apply to Derp-billed traffic.

However, when you use your own API key:

  • Data retention policies on the provider side depend on your provider’s account settings.
  • Derp cannot enforce ZDR for requests sent through your API keys.
  • If your Anthropic, OpenAI, or Google account does not have ZDR enabled, your requests may be retained by the provider according to their terms.

Derp itself never stores your LLM API keys.

The BYOK described on this page is configured at the user level on every plan, including Business and Enterprise. Each team member adds and manages their own API keys locally on their device, and those keys work only for interactive requests, not cloud agents.

Enterprise teams can also configure team-managed API keys centrally: an admin sets shared keys in the Admin Panel, and they work for both interactive requests and cloud agents. See Team-managed API keys and endpoints for details, or contact sales.

  • Custom inference endpoint — Route Derp through any OpenAI-compatible endpoint, such as OpenRouter, LiteLLM, z.ai, or an internal gateway.
  • Bring Your Own LLM — Enterprise-managed inference through your cloud provider or approved infrastructure.
  • SuperGrok subscription — Use Grok models through your xAI account instead of Derp credits.
  • Model Choice — Full list of supported models and model_id values.
  • Credits — How Derp credits work and when they're consumed.