Responses Format

Responses Format

OpenAI Responses API for creating model responses. Supports multi-turn chat, tool calls, and reasoning.

FieldValue
Base URLhttps://token.easyapi.com/v1
AuthenticationAuthorization: Bearer `API_KEY`
Example modelgpt-4o
FormatOpenAI Responses compatible
BillingPay as you go
Note: Full path: POST /v1/responses. input may be a string or message array; use previous_response_id for multi-turn chats.Also supports usage.include, models and provider.sort; see the request body below.

Example model

Examples below use gpt-4o (GPT-4o). Replace model and adjust size, quality, etc. per console docs when switching models.

Create response

POSThttps://token.easyapi.com/v1/responses

Create a model response with the OpenAI Responses API. Supports multi-turn chat, tool calls, and reasoning.

Request parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesEasyAPI API Key. Format: Bearer `API_KEY`
Content-TypeheaderstringYesRequest body format

Request body

NameTypeRequiredDescription
modelstringYesModel ID
inputstring | array<object>NoInput content as a string or message array
instructionsstringNoSystem-level instructions for model behavior
max_output_tokensintegerNoMaximum output tokens
temperaturenumberNoSampling temperature
top_pnumberNoNucleus sampling parameter
streambooleanNoEnable streaming responses
toolsarray<object>NoTool definitions the model may call
tool_choicestring | objectNoTool choice strategy, string or object
reasoningobjectNoReasoning configuration
previous_response_idstringNoPrevious response ID for multi-turn chat
truncationstringNoTruncation strategy: auto
usageobjectNoSet usage.include = true to add a cost field (USD for this request) to the usage object; for streaming it arrives in the final chunk that carries usage. The final charge is reported by GET /v1/generation
modelsarray<string>NoFallback model sequence (up to 5). When the primary model has no available channel, or the upstream fails before any output is sent, the next model is tried in order; limited to models this key may use
providerobjectNoRouting preference within the same priority tier: provider.sort = price picks the cheapest channel; latency picks the lowest measured time-to-first-token (end-to-end latency for non-streaming); throughput picks the highest measured output tokens/s. latency and throughput use live measurements of this model on each channel and fall back to channel health-check timing when no measurements exist. The model suffix :floor equals sort=price and :nitro equals sort=throughput

Example

{
  "model": "gpt-4o",
  "input": "Hello!",
  "instructions": "You are a helpful assistant.",
  "max_output_tokens": 1024,
  "usage": {
    "include": true
  }
}

Response example

{
  "id": "resp_abc123",
  "object": "response",
  "created_at": 1718452800,
  "status": "completed",
  "model": "gpt-4o",
  "output": [
    {
      "type": "message",
      "id": "msg_abc123",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "Hello! How can I help you today?"
        }
      ]
    }
  ],
  "usage": {
    "prompt_tokens": 15,
    "completion_tokens": 12,
    "total_tokens": 27,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "text_tokens": 15,
      "audio_tokens": 0,
      "image_tokens": 0
    },
    "completion_tokens_details": {
      "text_tokens": 12,
      "audio_tokens": 0,
      "reasoning_tokens": 0
    },
    "cost": 0.0000875
  }
}