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

# API overview

> Base URL, authentication, request format and response envelope.

## Base URL

```text theme={null}
https://api.bapsolver.xyz
```

## Authentication

Send your API token on every `/v1` request:

```http theme={null}
Authorization: Bearer YOUR_API_TOKEN
```

See [Authentication](https://docs.bapsolver.xyz/authentication.md).

## Requests

* Send JSON bodies with `Content-Type: application/json`.
* A body can be up to 1 MiB.
* The API refuses unknown fields with `400`.

## Responses

Every response is JSON in an envelope.

```json Success theme={null}
{
  "ok": true,
  "requestId": "0f6c1d2e-8a4b-4c3d-9e1f-2a3b4c5d6e7f",
  "data": { }
}
```

```json Error theme={null}
{
  "ok": false,
  "requestId": "0f6c1d2e-8a4b-4c3d-9e1f-2a3b4c5d6e7f",
  "error": {
    "code": "JOB_NOT_FOUND",
    "message": "No such job"
  }
}
```

Every response also has these headers:

| Header | Value |
| - | - |
| `X-Request-Id` | The same ID as `requestId`. |
| `Cache-Control` | `no-store`. Do not cache responses. |

See [Errors](https://docs.bapsolver.xyz/reference/errors.md) for every error code.

## Endpoints

| Method | Path | Description |
| - | - | - |
| `POST` | `/v1/jobs` | [Create a job](https://docs.bapsolver.xyz/api-reference/jobs/create-a-job.md). |
| `GET` | `/v1/jobs/{id}` | [Get a job](https://docs.bapsolver.xyz/api-reference/jobs/get-a-job.md), with optional long polling. |
| `GET` | `/v1/jobs` | [List jobs](https://docs.bapsolver.xyz/api-reference/jobs/list-jobs.md), without their tokens. |
| `DELETE` | `/v1/jobs/{id}` | [Cancel a job](https://docs.bapsolver.xyz/api-reference/jobs/cancel-a-job.md), or delete a finished one. |
| `GET` | `/health` | [Check service health](https://docs.bapsolver.xyz/api-reference/service/check-service-health.md). No token. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.