Skip to content
NeuralRepo
Get Support

BYOK AI Providers

NeuralRepo’s Anthropic-powered features run on Bring Your Own Key (BYOK). You connect your own API key and NeuralRepo uses it for the agent’s Claude models, AI-generated specs, and the weekly digest’s written summary.

FeatureDescription
AI agent — Claude modelsUse Sonnet, Haiku, or Opus in the Agent view and the mind map chat panel. The two Workers AI models need no key.
AI-Generated SpecsPOST /ideas/:id/develop uses your key to generate a project specification and appends it to the idea’s body.
Weekly DigestYour Sunday digest is an AI-written narrative of the week’s activity — new ideas, pending duplicates, and stale ideas — with a specific suggestion. Without a key you still get the digest, as a stats summary.

Core functionality — capture, search, organize, graph, and the agent itself on a Workers AI model — works with no AI key at all.

The agent offers five models. The three Anthropic models require an Anthropic BYOK key; the two Workers AI models run on Cloudflare’s own inference and need no key.

ModelProviderRequires BYOKContextMax stepsNotes
GPT-OSS 120B (default)Workers AINo128K12@cf/openai/gpt-oss-120b; runs in code mode by default
Qwen 30BWorkers AINo32K6@cf/qwen/qwen3-30b-a3b-fp8; compact system prompt
SonnetAnthropicYes200K10claude-sonnet-4-20250514
HaikuAnthropicYes200K8claude-haiku-4-5-20251001
OpusAnthropicYes200K10claude-opus-4-20250514

All Anthropic requests route through Cloudflare AI Gateway — your key is never exposed beyond Cloudflare’s infrastructure.

Three providers can be stored. Anthropic is the one the agent’s Claude models use; all three are eligible for the digest summary and the develop endpoint, which pick a provider by the priority order below.

ProviderKey formatDefault model used
Anthropicsk-ant-…claude-sonnet-4-20250514
OpenAIsk-…gpt-4o
OpenRoutersk-or-…anthropic/claude-sonnet-4-20250514
  1. Go to Settings ▸ AI in the NeuralRepo web dashboard. The panel is headed AI Providers.

  2. Find the card for your provider (Anthropic, OpenAI, or OpenRouter).

  3. Paste your API key. The Save button stays disabled until the key is at least 10 characters.

  4. Click Save. The key is encrypted and stored, and the card switches to a Configured badge.

  5. Click Test connection to verify the key works. A green Connected confirms it.

When NeuralRepo needs an AI call for a digest or a spec, it selects a provider in this order:

  1. Your explicit preference, if you have set one.
  2. Anthropic, if a key is configured.
  3. OpenAI, if a key is configured.
  4. OpenRouter, if a key is configured.

The Preferred provider dropdown only appears once you have more than one provider configured — with a single key there is nothing to choose between, and the default Auto option is the Anthropic → OpenAI → OpenRouter order above.

If no key is available for any provider, the AI feature is skipped gracefully: the weekly digest is sent as a stats summary instead of a narrative.

Your API keys are protected with multiple layers:

  • Encrypted at rest. Keys are encrypted with AES-256-GCM using a key derived from the server-side ENCRYPTION_KEY secret via HKDF-SHA256, with a fresh 12-byte IV per encryption. The plaintext key is never stored.
  • AI Gateway routing. All AI requests are routed through Cloudflare’s AI Gateway, which provides logging, rate limiting, and caching without exposing your key to additional third parties.
  • No key exposure. The API never returns your key, in full or in part. GET /user/byok/status reports only which providers are configured.
Terminal window
# Which providers are configured, and which one is active
curl https://neuralrepo.com/api/v1/user/byok/status \
-H "X-API-Key: nrp_your_key_here"
{
"active_provider": "anthropic",
"has_anthropic_key": true,
"has_openai_key": false,
"has_openrouter_key": false
}
Terminal window
# Remove a provider key (not Pro-gated)
curl -X DELETE https://neuralrepo.com/api/v1/user/byok/openai \
-H "X-API-Key: nrp_your_key_here"

Before relying on AI features, verify your key works:

Terminal window
curl -X POST https://neuralrepo.com/api/v1/user/byok/anthropic/test \
-H "X-API-Key: nrp_your_key_here"

Success response:

{
"ok": true
}

Failure response:

{
"ok": false,
"error": "Invalid API key"
}