Skip to content

BYOK AI Providers

NeuralRepo’s AI features are powered by Bring Your Own Key (BYOK). You connect your own Anthropic API key and NeuralRepo uses it to power the AI agent’s Anthropic models, AI-generated specs, weekly digest summaries, and other intelligent features.

FeatureDescription
AI Agent — Anthropic modelsUse Sonnet, Haiku, or Opus in the Neural Canvas and mind map chat panel.
AI-Generated SpecsThe /ideas/:id/develop endpoint uses your key to generate a full project specification from an idea.
Weekly DigestYour Sunday digest includes an AI-written summary of the week’s ideas, connection suggestions, and stale idea flags.

Without a BYOK key, the AI agent falls back to Workers AI models (Qwen 30B, Llama 70B, etc.), which require no key. Core functionality (capture, search, organize, graph) works without any AI key.

The AI agent supports the following models. Anthropic models require a BYOK key; Workers AI models are included with Pro and require no key.

ModelProviderRequires BYOKContextBest for
Sonnet (default)AnthropicYes200KBest reasoning, complex tasks
HaikuAnthropicYes200KFaster responses, lower cost
OpusAnthropicYes200KMost capable, long analysis
Qwen 30BWorkers AINo32KCreative tasks, brainstorming
Llama 70BWorkers AINo128KGeneral purpose
GPT-OSS 120BWorkers AINo128KGeneral purpose
Mistral Small 24BWorkers AINo32KFast, compact responses

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

ProviderModelsKey Format
AnthropicClaude Haiku 4.5, Claude Sonnet 4, Claude Opus 4sk-ant-...
OpenAIGPT-4o, GPT-4o-minisk-...
OpenRouterAny model available on OpenRoutersk-or-...
  1. Go to Settings > AI Providers in the NeuralRepo web dashboard.

  2. Select your provider (Anthropic, OpenAI, or OpenRouter).

  3. Paste your API key.

  4. Click Save. The key is encrypted and stored securely.

  5. Click Test Connection to verify the key works.

When NeuralRepo needs to make an AI call, it selects a provider in this order:

  1. Your explicit preference — if you have set a preferred provider in settings, that is used first.
  2. Anthropic — if an Anthropic key is configured.
  3. OpenAI — if an OpenAI key is configured.
  4. OpenRouter — if an OpenRouter key is configured.

If no key is available for any provider, the AI feature is skipped gracefully (for example, the weekly digest is sent without an AI summary).

Your API keys are protected with multiple layers:

  • Encrypted at rest. Keys are encrypted using the server-side ENCRYPTION_KEY before being written to the database. 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 full key. GET endpoints return only the last four characters for identification.
Terminal window
# List configured providers (returns provider names and last 4 chars of key)
curl https://neuralrepo.com/api/v1/user/byok/status \
-H "X-API-Key: nrp_your_key_here"
# Remove a provider key
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"
}