# API reference

> Look up every endpoint of the REST API with its method, path and purpose, generated from the OpenAPI 3.1 document you can import into any client.

Every endpoint of the REST API. This list is generated from the OpenAPI document, so it cannot drift from the API.

- **Base URL:** `https://promptgale.com`
- **OpenAPI 3.1:** [`/v1/openapi.json`](https://promptgale.com/v1/openapi.json). Use it to generate a client or import it into an API tool.

Deprecated paths keep working; use the path they name in new code.

## Tasks

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v1/tasks` | List tasks, newest first |
| POST | `/v1/tasks` | Queue a task |
| GET | `/v1/tasks/{id}` | Get a task and its result |
| DELETE | `/v1/tasks/{id}` | Cancel a queued task |
| GET | `/v1/tasks/{id}/events` | A task's timeline (queued, running, retrying, completed, failed, cancelled) |
| POST | `/v1/tasks/bulk` | Queue up to 500 tasks atomically |
| POST | `/v1/async/task` | Deprecated: use `POST /v1/tasks`. |
| POST | `/v1/async/task/batch` | Deprecated: use `POST /v1/tasks/bulk`. |
| GET | `/v1/async/task/{id}` | Deprecated: use `GET /v1/tasks/{id}`. |
| POST | `/v1/sync/task` | Queue a task and wait for it (up to 290 s) |

## Grids

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v1/grids` | Location grids, newest first (without points) |
| POST | `/v1/grids` | Ask one prompt from every point of a location grid (up to 9 x 9) |
| GET | `/v1/grids/{id}` | Get a location grid with its points |
| POST | `/v1/async/task/grid` | Deprecated: use `POST /v1/grids`. |
| GET | `/v1/async/task/grid/{id}` | Deprecated: use `GET /v1/grids/{id}`. |

## Batches

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/batches` | Create a batch of up to 10,000 tasks |
| GET | `/v1/batches` | Batches, newest first |
| GET | `/v1/batches/{id}` | Batch progress: counts by status, credits held and charged |
| POST | `/v1/batches/{id}/cancel` | Cancel a batch's pending items and queued tasks |
| GET | `/v1/batches/{id}/items` | Batch items in submission order, a page at a time |

## Queue and account

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v1/credits` | Credit balance and billing plan |
| GET | `/v1/usage` | Usage per UTC day and engine |
| GET | `/v1/queue` | Your queue: queued and processing tasks, pending batch items, concurrency used and limit |
| DELETE | `/v1/queue` | Cancel your queued tasks and pending batch items |
| GET | `/v1/async/status` | Deprecated: use `GET /v1/queue`. |
| DELETE | `/v1/async/queue` | Deprecated: use `DELETE /v1/queue`. |
| GET | `/v1/stats` | Your task counts by status and engine for a window |
| GET | `/stats` | Deprecated: use `GET /v1/stats`. |

## Catalog and geo

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v1/states` | US states accepted by payload.state (other countries: empty) |
| GET | `/v1/capabilities` | Engines available now: taskType, aliases, status, credits, input fields (required / optional / include), served countries, location flags, evidence |
| GET | `/v1/countries` | Countries we serve now, with locale data; with taskType only those that engine is served from |
| GET | `/v1/capacity` | Load per available engine: status, queued and processing tasks, oldest queued age |
| GET | `/capacity` | Deprecated: use `GET /v1/capacity`. |

## Utilities

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/google/goto` | Resolve a Google redirect link to the page it leads to (no credits) |
| GET | `/v1/google/goto` | Same as POST, with ?url= |
| GET | `/evidence/{id}` | Saved evidence page of a task (include.html; CHATGPT, GEMINI, PERPLEXITY, BING_COPILOT_SEARCH, META_AI, GOOGLE_AIO, GOOGLE_AIMODE) |

## Service

| Method | Path | Description |
| --- | --- | --- |
| GET | `/openapi.json` | This document |
| GET | `/v1/openapi.json` | This document (same as /openapi.json) |
| GET | `/health` | health |

---

Docs index: https://promptgale.com/llms.txt · Full reference: https://promptgale.com/llms-full.txt · OpenAPI: https://promptgale.com/v1/openapi.json
