# REST API

> The same tools as plain HTTPS endpoints, for agents and code that do not speak MCP.

Every MCP tool is also a plain endpoint. Requests and answers are JSON, and an answer is the same object the MCP tool returns.

| | |
|---|---|
| **Base URL** | `https://app.decalabs.ai` |
| **Format** | JSON in, JSON out |
| **Authentication** | Optional `Authorization: Bearer` key. See [Authentication](https://app.decalabs.ai/docs/reference/authentication). |
| **CORS** | Open to any origin |
| **OpenAPI** | [`/api/agent/openapi.json`](https://app.decalabs.ai/api/agent/openapi.json) |

## Endpoints

| Method | Path | Tool |
|---|---|---|
| `GET` | `/api/agent/signals` | [`get_signals`](https://app.decalabs.ai/docs/tools/get-signals) |
| `GET` | `/api/agent/ideas` | [`get_ideas`](https://app.decalabs.ai/docs/tools/get-ideas) |
| `GET` | `/api/agent/my-ideas` | [`get_my_ideas`](https://app.decalabs.ai/docs/tools/get-my-ideas) (needs a key) |
| `POST` | `/api/agent/quote` | [`quote_test`](https://app.decalabs.ai/docs/tools/quote-test) |
| `POST` | `/api/agent/score` | [Score an idea](https://app.decalabs.ai/docs/guides/score-idea), 1 USDC over x402 (REST only) |
| `POST` | `/api/agent/tests` | `start_test`, paid over x402: see [Paid tests](https://app.decalabs.ai/docs/guides/paid-tests) |
| `GET` | `/api/agent/tests` | `list_my_tests` (needs a key) |
| `GET` | `/api/agent/tests/{id}` | `get_test` |
| `POST` | `/api/agent/tests/{id}/cancel` | `cancel_test` |

`GET` endpoints take their parameters in the query string. `POST` endpoints take a JSON object in the body with `content-type: application/json`.

## Status codes

| Code | When |
|---|---|
| `200` | The call worked |
| `201` | A paid test was opened |
| `202` | The payment was sent but its settlement has not answered yet; read the test again |
| `400` | Something in the request is wrong; the body says what |
| `401` | The API key is not valid or was revoked |
| `402` | Payment required: the body and the `PAYMENT-REQUIRED` header carry the x402 request |
| `403` | The API key may not use this tool |
| `404` | No idea or endpoint by that name |
| `405` | The wrong method for the endpoint |
| `409` | The payment or the idempotency key was already used |
| `422` | The text sent to be scored is not a product idea; nothing was charged |
| `429` | Too many requests; wait for `Retry-After` seconds |
| `503` | The radar, the scoring engine or the payment service is not available right now; nothing was charged |

Every non-`200` answer has the [error shape](https://app.decalabs.ai/docs/reference/errors).

## Caching

`GET` answers may be cached for five minutes (`Cache-Control: public, s-maxage=300`). The radar itself changes once a day.

Source: https://app.decalabs.ai/docs/reference/rest
