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

# API Reference

The RobinCompute API speaks the OpenAI protocol. Request bodies, response shapes, and the streaming wire format match exactly. The difference is underneath: your job runs on a decentralized worker network and settles on Robinhood Chain, where you can check it.

**Base URL:** `https://api.robincompute.org/v1`

Already built against OpenAI? Change one line (the base URL) and keep your code. Details in \[OpenAI-compatible usage]\(

).

***

## API sections

* \[Authentication]\(): bearer keys, wallet-based auth, signing requests
* \[Chat Completions]\(): the `/v1/chat/completions` endpoint
* \[Models]\(): what the network is serving right now
* \[Jobs]\(): job status lookups and on-chain receipts
* \[Webhooks]\(): push notifications for job and account activity
* \[Errors]\(): status codes, error codes, and recovery

***

## Request format

Every call carries a bearer token in the `Authorization` header:

```
Authorization: Bearer rcompute_live_your_key_here
```

Send JSON, get JSON back. Opt into streaming and the API emits Server-Sent Events (SSE) in the exact OpenAI streaming format.

***

## Response headers

Every response carries RobinCompute-specific headers alongside the standard HTTP ones. They are your receipts:

| Header                             | Description                                                          |
| ---------------------------------- | -------------------------------------------------------------------- |
| `x-robincompute-job-id`            | The inference job this request created                               |
| `x-robincompute-tx-hash`           | Robinhood Chain transaction that locked the escrow                   |
| `x-robincompute-settlement-tx`     | Transaction that settled the job (present once the job completes)    |
| `x-robincompute-worker`            | On-chain address of the worker that served you, so you can verify it |
| `x-robincompute-credits-remaining` | Your credit balance after this request is accounted for              |

***

## Rate limits

There are no quota-style rate limits. The market prices capacity, so demand governs throughput, not a fixed ceiling we set. When no worker is hosting the tier you asked for, the API answers with a `503` carrying a `retry_after` field.

The one hard limit is your credit balance. A request whose tier costs more than you hold fails with a `402`.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.robincompute.org/api-reference/index.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
