> ## Documentation Index
> Fetch the complete documentation index at: https://unfold-0a6049eb.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Hosted API

> Create durable document parsing jobs over HTTP.

The hosted API is available at:

```text theme={null}
https://unfold.unfold-app.workers.dev/api/v1
```

Authenticate with a Unfold API key:

```http theme={null}
Authorization: Bearer fr_...
```

## Endpoints

| Method | Path | Purpose |
| - | - | - |
| `POST` | `/api/v1/documents` | Store a file or public URL |
| `GET` | `/api/v1/documents/{documentId}` | Read document metadata |
| `DELETE` | `/api/v1/documents/{documentId}` | Delete a document and its job data |
| `POST` | `/api/v1/jobs` | Run providers against a document |
| `GET` | `/api/v1/jobs/{jobId}` | Read job and execution status |
| `GET` | `/api/v1/executions/{executionId}/result` | Retrieve one provider result |
| `GET` | `/api/v1/providers` | Discover hosted provider capabilities |
| `GET` | `/api/v1/health` | Check API and database availability |

The complete OpenAPI 3.1 contract is published at [unfold.dev/api/openapi.json](https://unfold.unfold-app.workers.dev/api/openapi.json).

## Errors

API errors use `application/problem+json` and include a stable code, HTTP status, request ID, and human-readable detail:

```json theme={null}
{
  "type": "https://unfold.unfold-app.workers.dev/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "A description of the invalid field.",
  "instance": "/api/v1/jobs",
  "code": "invalid_request",
  "request_id": "..."
}
```

A `402 Payment Required` response with code `insufficient_credits` means the account is out of credits. Add credits from the [dashboard](https://unfold.unfold-app.workers.dev/dashboard) before retrying the request. See [How credits work](/concepts/processing-modes#how-credits-work) for pricing details.


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