Guide · Portkey AI Gateway
Connect Portkey AI Gateway to Synap
-
Get both API keys
Create a free Synap key at synap402.com, then copy a
PORTKEY_API_KEYfrom your Portkey workspace. -
Route one request through Portkey
Portkey authenticates with its own header. The regular
Authorizationheader is forwarded to Synap, andx-portkey-custom-hostselects our OpenAI-compatible base URL.curl https://api.portkey.ai/v1/chat/completions \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H 'x-portkey-provider: openai' \ -H 'x-portkey-custom-host: https://synap402.com/v1' \ -H "Authorization: Bearer $SYNAP_API_KEY" \ -H 'content-type: application/json' \ -d '{"model":"qwen3-coder-30b","messages":[{"role":"user","content":"Say OK"}]}' -
Save it as an integration
In Model Catalog → Integrations, add a Local / privately hosted provider. Choose the OpenAI API spec and use the same host and authorization header.
Provider type Local / privately hosted API spec OpenAI Custom host https://synap402.com/v1 Authorization Bearer $SYNAP_API_KEY
Notes, prices and limits
A custom host and the standard OpenAI request shape. Recommended model: qwen3-coder-30b —
$0.0675 in and $0.27 out
per 1M tokens, 98,304-token context.
Portkey uses two credentials on this route: x-portkey-api-key authenticates the gateway, while Authorization: Bearer … is forwarded upstream and authenticates Synap.
The custom host includes /v1: https://synap402.com/v1. The request path shown by Portkey is then /chat/completions, so the upstream request lands on the standard Synap endpoint.
Portkey logging, tracing and retention are controlled by your Portkey workspace. Synap does not retain prompts or completions after the request reaches us.
The header names and integration fields were checked against Portkey’s official custom-provider documentation; the Synap model catalogue and upstream endpoint were checked live.
On the free tier: every request counts input and output against 100,000 free tokens a day, and answers stop at 4,096 output tokens. Coding agents send long prompts, so the free tier covers a short session; credits cover the rest.
Field names from Portkey docs: custom hosts and self-hosted providers, checked 2026-11-10 10:24 UTC. Prices refresh from /v1/models when this page loads.