> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.butterix.com/en/llms.txt
> - v0: https://docs.butterix.com/en/v0/llms.txt

> For the MDX source of any page, append .mdx to the page URL.
> For a complete documentation index, see https://docs.butterix.com/en/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.butterix.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.butterix.com/_biti/feedback/agent.

# API explorer proxy

`POST /_biti/proxy`

**Try it** on API reference pages sends requests through it to get around browser cross-origin limits. So that it can't be used as an open proxy:

- Only `servers` origins declared in the site's OpenAPI specs are allowed; anything else gets 403.
- On the hosted platform, hosts that resolve to private or loopback addresses are refused.
- Headers such as `Cookie` and `Host` are removed, redirects aren't followed, response bodies are limited to 2 MB, and requests time out after 30 seconds.
- At most 60 per minute per IP.

Base URL: https://butterix-sites.butterix.com

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes |  |
| `method` | string | yes |  |
| `headers` | map from strings to strings | no |  |
| `body` | string | no |  |

## Example request

```bash
curl -X POST https://butterix-sites.butterix.com/_biti/proxy \
     -H "Content-Type: application/json" \
     -d '{
         "url": "https://api.butterix.com/v1/whoami",
         "method": "GET"
       }'
```

## Responses

### 200

The target service's response (whatever its status code)

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `status` | integer | no |  |
| `statusText` | string | no |  |
| `headers` | map from strings to strings | no |  |
| `body` | string | no |  |
| `truncated` | boolean | no |  |
| `size` | integer | no |  |
| `timeMs` | integer | no |  |

### 403

The target host isn't declared in the specs, or resolves to a private address

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | string | yes | Human-readable error message |
| `code` | string | no | Machine-readable error code (some endpoints) |

### Example response (200)

```json
{
  "status": 200,
  "statusText": "OK",
  "headers": {
    "key": "string"
  },
  "body": "string",
  "truncated": true,
  "size": 1,
  "timeMs": 84
}
```
