plaingateway
API reference

Responses

Create an OpenAI Responses-shaped result.

POST /responses accepts model as a string and input as text or structured input. Function tools and streams are recorded. previous_response_id and non-function Responses tools are not translated between API shapes.

Request

http
POST https://plaingateway.com/api/v1/responses
Authorization: Bearer sk-pg-v1-...
Content-Type: application/json

{
  "model": "openai/gpt-5.6-luna",
  "input": "Say hello in five words.",
  "max_output_tokens": 32
}

Response

http
HTTP/1.1 200
{
  "id": "gen-SCRUBBED-1",
  "object": "response",
  "created_at": 1700000000,
  "model": "openai/gpt-5.6-luna",
  "status": "completed",
  "completed_at": 1700000000,
  "output": [
    {
      "id": "msg_SCRUBBED-2",
      "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
    }
  }
}