Guide · Kong AI Gateway

Connect Kong AI Gateway to Synap

3 steps · about 2 minutes

  1. Create a Kong AI Gateway

    Create an AI Gateway in Kong Konnect and copy its id, region and PAT. Also create a free Synap key at synap402.com.

  2. Create the Synap model provider

    The provider stores the upstream Synap credential. Kong’s current AI Gateway API calls this an OpenAI provider because Synap uses the OpenAI request and response format.

    curl -X POST "https://$KONG_REGION.api.konghq.com/v1/ai-gateways/$KONG_AI_GATEWAY_ID/model-providers" \
      -H "Authorization: Bearer $KONG_TOKEN" \
      -H 'content-type: application/json' \
      -d '{
        "display_name": "Synap",
        "name": "synap",
        "type": "openai",
        "config": {"auth": {"type": "basic", "headers": [
          {"name": "Authorization", "value": "Bearer '"$SYNAP_API_KEY"'"}
        ]}}
      }'
  3. Expose the Synap model

    The AI Model creates a managed /v1/chat/completions route. Clients send the alias synap-qwen3-coder-30b in the model field.

    curl -X POST "https://$KONG_REGION.api.konghq.com/v1/ai-gateways/$KONG_AI_GATEWAY_ID/models" \
      -H "Authorization: Bearer $KONG_TOKEN" \
      -H 'content-type: application/json' \
      -d '{
        "display_name": "Synap Qwen3 Coder 30B",
        "name": "synap-qwen3-coder-30b",
        "type": "model",
        "capabilities": ["generate"],
        "formats": [{"type": "openai"}],
        "policies": [],
        "targets": [{
          "name": "qwen3-coder-30b",
          "provider": "synap",
          "config": {"type": "openai", "upstream_url": "https://synap402.com/v1"}
        }],
        "config": {
          "route": {"paths": ["/v1"], "model": {
            "body_param": "model", "values": ["synap-qwen3-coder-30b"]
          }},
          "logging": {"payloads": false}
        }
      }'
Notes, prices and limits

An OpenAI provider with a Synap upstream URL. Recommended model: qwen3-coder-30b — $0.0675 in and $0.27 out per 1M tokens, 98,304-token context.

Kong models Synap as an OpenAI provider because the wire format is OpenAI-compatible. The target’s upstream_url changes the actual upstream to Synap.

The target URL is https://synap402.com/v1. Kong appends the generate capability path and sends chat requests to /v1/chat/completions.

The example disables payload logging on the AI Model. Kong can still record token, latency and cost statistics without retaining the prompt or completion body.

The model-provider fields, AI Model schema and upstream_url option were checked against Kong’s current AI Gateway 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 Kong docs: OpenAI-compatible upstreams in AI Gateway, checked 2026-11-10 10:24 UTC. Prices refresh from /v1/models when this page loads.