Responses route typev3.6+

Use the Responses API to fetch metadata about past OpenAI requests for debugging and analysis.

Prerequisites

  • OpenAI account

Environment variables

  • OPENAI_API_KEY: The API key to use to connect to OpenAI.

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: ai-proxy
    config:
      route_type: llm/v1/responses
      auth:
        header_name: Authorization
        header_value: Bearer ${{ env "DECK_OPENAI_API_KEY" }}
      model:
        provider: openai
        name: gpt-4
        options:
          max_tokens: 512
          temperature: 1.0
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!