> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chowder.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Message

> Send a message to an instance and get a response from the AI agent.

Send a message to a running OpenClaw instance. Chowder proxies your request to the instance's gateway, which processes it through the [OpenResponses API](https://github.com/openclaw/openresponses) — an open-source implementation of the OpenAI Responses API format.

The instance must be in `running` status. If it's stopped or provisioning, you'll get a `409 Conflict`.

<Note>
  Accepts an **organization key** (`chd_org_*`) or a **scoped key** (`chd_sk_*`) with `interact` permission on this instance.
</Note>

## Path Parameters

<ParamField path="instance_id" type="string" required>
  The ID of the instance to send a message to.
</ParamField>

## Request Body

The body follows the OpenAI Responses API format. At minimum you need `model` and `input`.

<ParamField body="model" type="string" required>
  The model to use for this request. This is passed through to the configured model provider — use model identifiers like `"claude-sonnet-4-20250514"`, `"gpt-4o"`, or `"gemini-2.0-flash"` depending on which provider the instance is set up with.
</ParamField>

<ParamField body="input" type="string" required>
  The user message to send. This is the text input for the AI agent.
</ParamField>

You can include any additional fields supported by the OpenResponses API (e.g. `instructions`, `tools`, `previous_response_id` for conversation continuity). These are passed through to the gateway as-is.

## Response

Returns `200 OK` with the OpenResponses API response object.

<ResponseField name="id" type="string">
  Unique response ID (e.g. `"resp_abc123"`). Use this as `previous_response_id` in follow-up messages to maintain conversation context.
</ResponseField>

<ResponseField name="object" type="string">Always `"response"`.</ResponseField>
<ResponseField name="status" type="string">Response status, typically `"completed"`.</ResponseField>

<ResponseField name="output" type="array">
  Array of output items. Each item has a `type` field. The most common type is `"message"`, which contains the agent's reply.

  <Expandable title="Output item (message)">
    <ResponseField name="type" type="string">`"message"`</ResponseField>
    <ResponseField name="role" type="string">`"assistant"`</ResponseField>

    <ResponseField name="content" type="array">
      Array of content blocks. Text responses have `type: "output_text"` with a `text` field containing the actual reply.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="model" type="string">The model that generated the response.</ResponseField>

<ResponseField name="usage" type="object">
  Token usage for the request.

  <Expandable title="Usage fields">
    <ResponseField name="input_tokens" type="integer">Tokens in the input.</ResponseField>
    <ResponseField name="output_tokens" type="integer">Tokens in the output.</ResponseField>
    <ResponseField name="total_tokens" type="integer">Total tokens used.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  curl -X POST https://api.chowder.dev/v1/instances/f47ac10b-58cc-4372-a567-0e02b2c3d479/responses \
    -H "Authorization: Bearer chd_org_abc123..." \
    -H "Content-Type: application/json" \
    -d '{
      "model": "claude-sonnet-4-20250514",
      "input": "What files are in the current directory?"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  {
    "id": "resp_6f8a9b2c4d1e",
    "object": "response",
    "status": "completed",
    "output": [
      {
        "type": "message",
        "role": "assistant",
        "content": [
          {
            "type": "output_text",
            "text": "Here are the files in the current directory:\n\n- README.md\n- package.json\n- src/\n- node_modules/"
          }
        ]
      }
    ],
    "model": "claude-sonnet-4-20250514",
    "usage": {
      "input_tokens": 42,
      "output_tokens": 38,
      "total_tokens": 80
    }
  }
  ```
</ResponseExample>

## Conversation Continuity

To have a multi-turn conversation, pass the `id` from the previous response as `previous_response_id` in your next request:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
curl -X POST https://api.chowder.dev/v1/instances/f47ac10b-.../responses \
  -H "Authorization: Bearer chd_org_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "input": "Now create a new file called hello.txt with the text Hello World",
    "previous_response_id": "resp_6f8a9b2c4d1e"
  }'
```

The agent retains the full conversation history and can reference previous messages.
