---
title: "Responses"
description: "Create an OpenAI Responses-shaped result."
---

# Responses

POST `/responses` is the OpenAI Responses API. It takes `model` and `input`, as a string or a list of input items.
A host that serves Responses natively (OpenAI hosts) gets the request as sent. Any other host gets it translated to chat completions, and the answer is translated back.
On a translated host, `previous_response_id` and tools other than function tools return 400, because chat completions has no equivalent.
`stream`, function tools and the routing fields work on both.

### Request

```sh
curl https://api.plaingateway.com/api/v1/responses \
  -H "Authorization: Bearer $PLAINGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-5.6-luna",
  "input": "Say hello in five words.",
  "max_output_tokens": 32
}'
```

### Response

```http
HTTP/1.1 200
{
  "id": "gen-6f2d0c5e9a1b4c7d8e3f2a10",
  "object": "response",
  "created_at": 1700000000,
  "model": "openai/gpt-5.6-luna",
  "status": "completed",
  "completed_at": 1700000000,
  "output": [
    {
      "id": "msg_0a1b2c3d4e5f60718293a4b5",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "Hello there, nice to meet you!",
          "annotations": [],
          "logprobs": []
        }
      ],
      "phase": "final_answer"
    }
  ],
  "error": null,
  "incomplete_details": null,
  "tools": [],
  "tool_choice": "auto",
  "parallel_tool_calls": true,
  "max_output_tokens": 32,
  "temperature": 1,
  "top_p": 1,
  "presence_penalty": 0,
  "frequency_penalty": 0,
  "top_logprobs": 0,
  "max_tool_calls": null,
  "metadata": {},
  "background": false,
  "previous_response_id": null,
  "service_tier": "default",
  "truncation": "disabled",
  "store": false,
  "instructions": null,
  "text": {
    "format": {
      "type": "text"
    }
  },
  "reasoning": {
    "context": "all_turns",
    "effort": "medium",
    "mode": "standard",
    "summary": "detailed"
  },
  "safety_identifier": null,
  "prompt_cache_key": null,
  "prompt_cache_options": null,
  "usage": {
    "input_tokens": 12,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 12,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 24,
    "cost": 1.68e-05,
    "is_byok": false,
    "cost_details": {
      "upstream_inference_cost": 1.68e-05,
      "upstream_inference_input_cost": 2.4e-06,
      "upstream_inference_output_cost": 1.44e-05
    }
  }
}
```
