API Reference

Responses

Create multimodal responses with the OpenAI Responses-style API.

The Responses API uses input as a unified input field. It is designed for newer OpenAI Responses-style models and supports streaming, tools, reasoning options and response continuation.

Endpoints

MethodPathDescription
POST/v1/responsesCreate a response
POST/v1/responses/compactResponses compaction API with fewer fields

Request Fields

FieldTypeRequiredDescription
modelstringYesModel ID
inputstring or arrayYesInput content. Can include input_text, input_image and input_file
instructionsstringNoSystem-level instructions
streambooleanNoReturn an SSE stream
max_output_tokensintegerNoMaximum output tokens
temperature, top_pnumberNoSampling controls
tools, tool_choicearray/objectNoTool configuration
parallel_tool_callsbooleanNoAllow parallel tool calls
max_tool_callsintegerNoMaximum tool calls
previous_response_idstringNoContinue from a previous response
reasoningobjectNoReasoning options such as effort and summary
textobjectNoText output configuration
include, truncationanyNoOpenAI Responses extension fields
metadata, useranyNoMetadata or user identifier
store, service_tier, safety_identifieranyNoOpenAI extension fields; channel settings may filter them

curl

curl https://api.tensoraxis.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TENSORAXIS_API_KEY" \
  -d '{
    "model": "gpt-4o",
    "input": "Explain what an API gateway is in two sentences"
  }'

Multimodal Input

{
  "model": "gpt-4o",
  "input": [
    {
      "role": "user",
      "content": [
        {"type": "input_text", "text": "Describe this image"},
        {"type": "input_image", "image_url": "https://example.com/image.png"}
      ]
    }
  ]
}

Compaction API

/v1/responses/compact accepts a smaller request body:

FieldTypeRequiredDescription
modelstringYesModel ID
inputanyNoInput to compact
instructionsanyNoInstructions
previous_response_idstringNoPrevious response ID

Response Shape

Responses follow the OpenAI Responses-style shape. Core fields include id, model, output and usage. Streaming responses return incremental content as SSE events.