> ## Documentation Index
> Fetch the complete documentation index at: https://docs.helicone.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Responses API

> Use the OpenAI Responses API format through Helicone AI Gateway with your Helicone API key

The Responses API is OpenAI's newer interface for conversational AI that supports advanced features like reasoning, tool use, and streaming. Helicone's AI Gateway supports the Responses API format for both OpenAI and Anthropic models.

## Quick Start

Use your Helicone API key and the AI Gateway base URL. Then call the OpenAI SDK's `responses.create` method as usual.

<CodeGroup>
  ```typescript TypeScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: process.env.HELICONE_API_KEY,
    baseURL: "https://ai-gateway.helicone.ai/v1",
  });

  const response = await client.responses.create({
    model: "gpt-5",
    input: "Write a one-sentence bedtime story about a unicorn.",
  });

  console.log(response.output_text);
  ```

  ```python Python theme={null}
  import os
  from openai import OpenAI

  client = OpenAI(
      api_key=os.environ.get("HELICONE_API_KEY"),
      base_url="https://ai-gateway.helicone.ai/v1",
  )

  response = client.responses.create(
      model="gpt-5",
      input="Write a one-sentence bedtime story about a unicorn.",
  )

  print(response.output_text)
  ```

  ```bash theme={null}
  curl https://ai-gateway.helicone.ai/v1/responses \
    -H "Authorization: Bearer $HELICONE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-5",
      "input": "Write a one-sentence bedtime story about a unicorn."
    }'
  ```
</CodeGroup>

<Note>
  For Chat Completions usage and more background on the AI Gateway, see the
  [AI Gateway Overview](/gateway/overview).
</Note>

## References

* OpenAI Responses guide: [https://platform.openai.com/docs/guides/text](https://platform.openai.com/docs/guides/text)
* Helicone AI Gateway overview: [https://docs.helicone.ai/gateway/overview](https://docs.helicone.ai/gateway/overview)
