Try it and proxy
Readers can send real requests right from the docs. Hosted sites forward them through a restricted proxy that gets around browser CORS limits without becoming an open proxy.
The "Try it" panel
Every endpoint's request example card has a Try it button. Clicking it opens the explorer (the URL gets ?explorer=true, so it can be shared; close it with the browser's Back button or Esc):
- On the left you can search for and switch to other endpoints in the same API; credentials you've entered are kept.
- The auth bar at the top shows the credentials the current endpoint needs; credentials are stored only in the reader's own browser (isolated per site) and are never sent to ButterIX.
- The form is generated from the schema: strings and numbers are inputs, enums are dropdowns, booleans are switches, objects expand, and arrays let you add and remove items. Optional fields are collapsed under "More optional parameters", and you can load the spec's example with one click.
- The request code updates live with the form, and you can switch languages and copy it. The languages match the request examples on the page and follow
code-languages; credentials appear as dots, and copying uses the real values. - After sending, the status code, duration, and response size are shown; the response body is formatted, and you can switch between the body and the response headers.
In-page explorer: RunnableEndpoint
To embed a runnable request in the middle of a guide, use <RunnableEndpoint>:
<RunnableEndpoint endpoint="GET /whoami" collapsed />| Prop | Description |
|---|---|
endpoint | METHOD /path; with multiple APIs, api-name::METHOD /path |
example | Name of the example to prefill |
collapsed | Collapsed by default |
defaultEnvironment | Server URL selected by default |
readonly | Read-only fields |
How requests are sent
Proxy security rules
/_biti/proxy exists only for "Try it" and has the following restrictions so it can't be used as an open proxy:
| Rule | Description |
|---|---|
| Host allowlist | Only forwards to servers origins declared in the site's OpenAPI spec (including operation-level and path-level servers); other addresses return 403 |
| No private networks | Requests are rejected when the target host resolves to a private, loopback, link-local, or similar address, including in the biti dev preview |
| Sensitive headers stripped | Cookie, Host, Origin, Referer, X-Forwarded-For, and similar headers are not forwarded; Set-Cookie in responses is dropped |
| No redirect following | 3xx responses are returned as-is |
| Size and timeout | Response bodies up to 2 MB (the rest is truncated and marked truncated), 30-second timeout |
| Rate limit | 60 requests per minute per IP |
See API try-it proxy in the API reference for the request and response format.
The proxy allowlist comes from the spec's servers. If your spec uses a placeholder like https://api.example.com for servers, readers' requests will be sent there. Use your real address, or use server variables to let readers choose an environment.
Configure CORS for your API
To let readers call your API directly from the browser without the proxy, allow the docs site's origin on your API gateway, for example:
Access-Control-Allow-Origin: https://docs.acme.com
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
Access-Control-Allow-Headers: Authorization, Content-Type
Access-Control-Max-Age: 86400Multiple environments
Declare multiple servers in the spec and readers can switch between them at the endpoint URL; use server variables for configurable parts:
servers:
- url: https://api.acme.com/v1
description: Production
- url: https://sandbox.acme.com/v1
description: Sandbox
- url: "https://{region}.api.acme.com/v1"
variables:
region:
default: cn-east
enum: [cn-east, us-west]Server variables are expanded with their default values in examples and in the proxy allowlist.