Skip to main content
POST
/
agents
/
responses
JavaScript
import Smithery from '@smithery/api';

const client = new Smithery({
  apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});

const response = await client.experimental.agents.responses.create({ namespace: 'namespace' });

console.log(response.id);
{
  "id": "<string>",
  "object": "response",
  "created_at": 0,
  "completed_at": 0,
  "status": "queued",
  "model": "<string>",
  "output": [
    {
      "id": "<string>",
      "type": "<string>",
      "role": "<string>",
      "content": [
        {
          "type": "<string>",
          "text": "<string>"
        }
      ],
      "status": "in_progress"
    }
  ],
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "background": true,
  "instructions": "<string>",
  "previous_response_id": "<string>",
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Smithery API key as Bearer token

Body

application/json
namespace
string
required

Smithery namespace for tool discovery

input

Input text or array of messages

model
string | null

Model to use

previous_response_id
string | null

Previous response ID for multi-turn

temperature
number | null

Temperature for generation

Required range: 0 <= x <= 2
top_p
number | null

Top-p sampling

Required range: 0 <= x <= 1
max_output_tokens
number | null

Maximum output tokens

Required range: x >= 16
max_tool_calls
number | null

Maximum tool calls before stopping

Required range: x >= 1
stream
boolean

Enable streaming response

background
boolean

Run in background for long-running tasks

instructions
string | null

Additional system instructions

metadata
object

Request metadata

Response

Response created

id
string
required

Response ID

object
string
default:response
required
Allowed value: "response"
created_at
integer
required

Unix timestamp of creation

Required range: -9007199254740991 <= x <= 9007199254740991
completed_at
integer | null
required

Unix timestamp of completion

Required range: -9007199254740991 <= x <= 9007199254740991
status
enum<string>
required

Response status

Available options:
queued,
in_progress,
completed,
failed,
incomplete
model
string
required

Model used

output
object[]
required

Output items

usage
object
required

Token usage

error
object
required

Error details if failed

background
boolean
required

Whether running in background

instructions
string | null
required

System instructions used

previous_response_id
string | null
required

Previous response ID

metadata
object
required

Request metadata