Skip to main content
Available on all Portkey plans.
Open Responses is an open-source specification for multi-provider, interoperable LLM interfaces based on the OpenAI Responses API. It defines a shared schema for calling language models, streaming results, and composing agentic workflows β€” independent of provider. Portkey is fully Open Responses compliant. The Responses API works with every provider and model in Portkey’s catalog β€” including Anthropic, Gemini, Bedrock, and 60+ other providers that don’t natively support it.

Why Responses API

The Responses API is becoming the standard for agentic AI:
  • Agentic loops β€” Models emit tool calls, receive results, and continue autonomously
  • Items as atomic units β€” Clear state machines for context management
  • Semantic streaming β€” Predictable, provider-agnostic streaming events
  • Unified tool calling β€” Consistent function calling interface across all providers
Previously, the Responses API only worked with OpenAI. Portkey extends it to all providers.

Quick Start

Send a Responses API request to any provider. Change the model string β€” the API format stays the same.
The same code works for any provider. Switch the @provider/model string to use OpenAI, Gemini, Groq, Bedrock, or any of the 3000+ supported models. See Model Catalog for setup.

Using the OpenAI SDK

The Portkey SDK is a superset of the OpenAI SDK, so portkey.responses.create() works identically. The OpenAI SDK also works directly with Portkey’s base URL:

Text Generation

Instructions (System Prompt)

Set a system prompt with instructions or pass a system role message in the input array. Both work identically.

Streaming

Enable streaming with stream: true.
Portkey’s adapter produces the same SSE event stream format (response.created, response.output_text.delta, response.completed, etc.) regardless of the underlying provider.

Multi-turn Conversations

Pass previous messages in the input array for multi-turn conversations. Two formats are supported:
Supported roles: user, assistant, developer (maps to system), system, and tool.

Generation Parameters

Control generation behavior with optional parameters:

Tool Calling

Define tools with the Responses API function tool format. Works across all providers that support function calling.

Tool Choice

Control tool usage with tool_choice:
Python

Function Call Results

Return function call results in a multi-turn flow with function_call and function_call_output items:

Input Types

Vision

Send images with the input_image content type. The optional detail parameter ("high", "low", "auto") controls processing fidelity.

File Inputs

Send files with the input_file content type. Pass file data as a base64-encoded data URL or reference an existing file by file_id.

Structured Output

Control output format with text.format. Supports json_schema for strict structured output and json_object for free-form JSON.

JSON Schema

JSON Object

For free-form JSON output without a strict schema:

Reasoning and Thinking

Control reasoning with the unified reasoning parameter. Portkey maps this to each provider’s native thinking mechanism automatically.

Reasoning Effort

reasoning.effort controls how much the model reasons before responding. Works across OpenAI, Anthropic, and Gemini β€” Portkey translates to each provider’s native format.
Portkey maps reasoning.effort to each provider’s native thinking configuration:
Passed through as reasoning_effort natively. No translation needed.

Anthropic Extended Thinking

For fine-grained control over Anthropic’s extended thinking, pass the thinking parameter directly with an exact budget_tokens value. This takes precedence over reasoning.effort if both are set.

Prompt Caching

Enable prompt caching with cache_control on content items and tools. Works with Anthropic and other compatible providers.
Cache control also works on tool definitions:
Python

Using with Portkey Features

The Responses API works with all Portkey gateway features.

Configs

Route, load balance, and set fallbacks

Caching

Cache responses for faster, cheaper calls

Guardrails

Input/output guardrails

Observability

Full logging and tracing
Pass features through headers or the config parameter:

Provider Support

Portkey handles the Responses API in two ways depending on the provider:
  • Native providers β€” Requests pass through directly to the provider’s Responses API endpoint
  • Adapter providers β€” Portkey automatically translates between Responses API and Chat Completions formats
This translation is transparent β€” the response format is identical regardless of which provider handles the request. Native providers: OpenAI, Azure OpenAI, Grok (x.ai), Groq, OpenRouter, Azure AI, Perplexity AI Adapter providers: Anthropic, Google Gemini, Google Vertex AI, AWS Bedrock, Mistral AI, Together AI, and all other providers All features documented on this page β€” text generation, streaming, tool calling, reasoning, vision, structured output, prompt caching, and multi-turn conversations β€” work with both native and adapter providers.

Native-Only Features

A few features require server-side state and are limited to native providers:
  • previous_response_id β€” Use multi-turn conversations to pass history in the input array instead
  • store β€” Silently ignored on adapter providers; responses are not persisted server-side
  • Retrieve / Delete β€” GET and DELETE on /v1/responses/:id are not available
  • Built-in tools β€” web_search, file_search, computer_use are native-only. Use Remote MCP or custom function tools instead
Everything else β€” text generation, streaming, instructions, tool calling, structured output, reasoning, vision, file inputs, prompt caching, and multi-turn conversations β€” works with every provider.

Reference

Supported Parameters

Complete list of parameters supported by the Responses API and how they map internally:

API Endpoints

Open Responses Spec

Full specification

API Reference

Responses API reference

Remote MCP

MCP via Responses API

Universal API

All three API formats

Messages API

Anthropic Messages format

Chat Completions

OpenAI Chat Completions format
Last modified on April 8, 2026