> For the complete documentation index, see [llms.txt](https://docs.three.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.three.dev/api-reference/api-reference.md).

# Overview

The three.dev APIs are available at `https://api.three.dev`. Authenticate every request with a three.dev API key:

```
Authorization: Bearer <THREE_DEV_API_KEY>
```

Create and manage API keys at [Settings > API Keys](https://app.three.dev/settings/api-keys).

## Endpoints

* [Report Metric](/api-reference/report-metric.md) — report a binary quality metric outcome for a session.
* [Assign Session](/api-reference/assign-session.md) — get the variant assignment for a session in a running live experiment.
* [Render Prompt](/api-reference/render-prompt.md) — render a prompt by substituting variables into the active published version.

## Error responses

API errors return JSON with a `message` field:

```json
{
  "message": "Description of what went wrong"
}
```

Common HTTP status codes:

| Code | Meaning                                                                          |
| ---- | -------------------------------------------------------------------------------- |
| 400  | Bad request — invalid or missing parameters.                                     |
| 401  | Unauthorized — missing or invalid API key.                                       |
| 404  | Not found — the resource does not exist or does not belong to your organization. |
| 409  | Conflict — for example, attempting to create a duplicate resource.               |
| 422  | Unprocessable entity — the request is well-formed but cannot be processed.       |
| 500  | Internal server error.                                                           |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.three.dev/api-reference/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
