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
SonnetAnthropicYes1M10Newest Sonnet; never older than claude-sonnet-5
HaikuAnthropicYes200K8Newest Haiku; never older than claude-haiku-4-5
OpusAnthropicYes1M10Newest Opus; never older than claude-opus-5

The Anthropic rows name a tier, not a fixed model ID. When a Claude model is used, NeuralRepo lists Anthropic’s models (GET /v1/models) with an Anthropic key and picks the newest Haiku, Sonnet and Opus. That choice is cached for 24 hours, so a new Claude release is picked up within a day without an app update. If the lookup fails for any reason — an error status, a timeout, an empty list — the tier falls back to its floor: claude-haiku-4-5, claude-sonnet-5 or claude-opus-5. Where Anthropic offers both an undated alias and a dated snapshot of the same model, the alias is chosen.

The Context column is the budget the agent works to, not a promise about every model in the tier. Only a budget below 200K causes history trimming (see Conversation History).

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. Only an Anthropic key gets the newest-model lookup; the OpenAI and OpenRouter defaults are fixed IDs.

ProviderKey formatDefault model used
Anthropicsk-ant-…The newest Sonnet (falls back to claude-sonnet-5)
OpenAIsk-…gpt-4o
OpenRoutersk-or-…anthropic/claude-sonnet-5 (fixed; not looked up)
  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"
}