Open Source API Gateway

openai

Version

Talks to the OpenAI API. Both the Responses API under /v1/responses and the Chat Completions API under /v1/chat/completions are supported, and the endpoint the client calls decides which one is used. The api key travels as a Bearer token in the Authorization header. See tutorials/llm-gateway/openai/10-Basic-LLM-Gateway.yaml.

Example Configuration

api:
port: 2000
flow:
- llmGateway:
openai: {}
policies:
maxOutputTokens: 200
target:
url: https://api.openai.com
api:
   port: 2000
   flow:
     - llmGateway:
         openai: {}
         policies:
           maxOutputTokens: 200
   target:
     url: https://api.openai.com

Syntax

openai: {}
openai: {}

Can be used in