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

# Run a native coding client with stateless Responses.

Replay the conversation in input. Supports text, client-executed function/custom tools, namespace tools and incremental streaming. Stored response IDs, background requests and provider-hosted tools are unavailable. The dashboard key routes only to permitted owned machines. Request bodies are limited to 1 MiB. 

` POST /v1/api/responses `

Run a native coding client with stateless Responses.

Replay the conversation in input. Supports text, client-executed
function/custom tools, namespace tools and incremental streaming.
Stored response IDs, background requests and provider-hosted tools are
unavailable. The dashboard key routes only to permitted owned machines.
Request bodies are limited to 1 MiB.


## Servers

- ` https://b3iq.org ` — Public hosted gateway facade.

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` HostedGatewayBearer `: ` http `

  - HTTP scheme: ` bearer ` (b3iq_gateway)

  - Scoped hosted gateway key. `gateway:chat` is required for chat; `gateway:models` is optional for the own-machines-scoped model list.

## Parameters

### ` x-b3iq-node-id ` (header, optional)

Optional permitted owned-machine pin. Competing pins must agree.

- ` value `: type ` string `

## Request body (required)

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` model `, ` input `

  - ` model `: type ` string `

  - ` input `: type ` unknown `

    - ` oneOf alternative 1 `: type ` string `

    - ` oneOf alternative 2 `: type ` array `

      - ` array item `: type ` object `

  - ` instructions `: type ` string `

  - ` tools `: type ` array `

    - ` array item `: type ` object `

  - ` stream `: type ` boolean `

  - ` max_output_tokens `: type ` integer `

    - minimum: ` 1 `

  - ` store `: type ` unknown `

## Responses

### ` 200 ` — A Responses object or incremental Responses event stream.

Content type: ` application/json `

- ` value `: type ` object `

### ` default ` — OpenAI-compatible error with B3IQ metadata.

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` object `

    - Required fields: ` message `, ` type `, ` code `, ` b3iq `

    - ` message `: type ` string `

    - ` type `: type ` string `

    - ` param `: type ` unknown ` — A string value or null.

      - ` anyOf alternative 1 `: type ` string `

      - ` anyOf alternative 2 `: type ` null `

    - ` code `: type ` string `

    - ` b3iq `: type ` object `

      - Required fields: ` status `, ` title `, ` detail `, ` code `

      - ` status `: type ` integer `

      - ` title `: type ` string `

      - ` detail `: type ` string `

      - ` code `: type ` string `

      - ` job_id `: type ` string `

      - ` billing_lookup `: type ` string `

      - ` idempotency_status `: type ` string `

## Request examples

### cURL

```curl
curl -X POST 'https://b3iq.org/v1/api/responses' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "string",
  "input": "string",
  "instructions": "string",
  "tools": [
    {}
  ],
  "stream": true,
  "max_output_tokens": 1,
  "store": null
}'
```

### JavaScript

```javascript
const response = await fetch('https://b3iq.org/v1/api/responses', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "string",
    "input": "string",
    "instructions": "string",
    "tools": [
      {}
    ],
    "stream": true,
    "max_output_tokens": 1,
    "store": null
  })
});

const data = await response.json();
console.log(data);
```