Gateway configuration & profiles
Everything the Gateway needs lives in the gateway block of /etc/neuraframe-studio/config.json. Set it with neuraframe config set or by editing the file, then restart the service.
The gateway block
| Key | What it does | Default |
|---|---|---|
gateway.upstream_url | Your provider's base URL. Requests that miss are forwarded here. | empty (gateway idle) |
gateway.profile | How the gateway reads requests: a named provider or auto. | auto |
gateway.listen | Address and port the gateway serves on. | 127.0.0.1:8081 |
neuraframe config set gateway.upstream_url https://api.anthropic.com neuraframe config set gateway.profile anthropic sudo systemctl restart neuraframe-studio
Profiles
The Gateway has two layers of compatibility. The universal exact layer keys on the normalized request and replays a stored response byte for byte, so it works with any HTTP JSON model endpoint regardless of profile. The meaning layer reads the prompt and answer for known profiles so it can apply semantic reuse and routing.
| Profile | Use for | Point your app at |
|---|---|---|
openai | OpenAI and OpenAI-compatible chat and completions | http://127.0.0.1:8081/v1 |
anthropic | Anthropic Messages | http://127.0.0.1:8081 |
grok | Grok and xAI | http://127.0.0.1:8081/v1 |
generic | Any other HTTP JSON endpoint (exact layer only) | http://127.0.0.1:8081 |
auto | Detects OpenAI-style and Anthropic-style requests by path, so one gateway can front both | match the provider path |
Headers and API keys
Your provider API key travels on the request from your app exactly as it does today; the Gateway passes it straight through. It forwards every non hop-by-hop header, so Authorization: Bearer, Anthropic's x-api-key and anthropic-version, and any custom header a compatible endpoint needs all reach your provider untouched. NeuraFrame™ does not store or require your provider key.
# the same request you send today, now through the gateway
curl http://127.0.0.1:8081/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-sonnet-5","max_tokens":64,"messages":[{"role":"user","content":"say hi"}]}'
Streaming and misses
A miss is exactly like talking to your model directly: the request is forwarded unchanged and the response is returned unchanged, byte identical, including streamed responses. Streaming repeats use the exact layer; semantic reuse applies to non streaming requests.
Honest failure
NeuraFrame™ only ever returns a verified answer from memory or your provider's real response. If a request is not in memory and the Gateway cannot reach your provider (down, refused, or timed out), it returns a clear 502 saying so rather than inventing an answer. Anything it has already learned still serves from memory.