API reference
Every endpoint of the checking API in one table, with the OpenAPI document.
The base URL is https://api.openshield.dev. Every endpoint except the last three needs an API key. The complete description, with every field, is the OpenAPI 3.1 document: /docs/api/openapi.json.
Endpoints
| Method and path | What it does |
|---|---|
POST /v1/image | Checks an image sent as the raw body, or at a public url. See images. |
POST /v1/text | Checks a text sent as JSON. See texts. |
GET /v1/workflows | Lists the names and current versions of the workflows the key may use. See workflows. |
POST /1.0/check-workflow.json | Checks an image, SightEngine-compatible, as a multipart form. See migrating from SightEngine. |
GET /1.0/check-workflow.json | Checks an image by its url, SightEngine-compatible, with the key in the api_secret query parameter. |
POST /1.0/text/check-workflow.json | Checks a text, SightEngine-compatible, as a multipart form. |
GET /health | {"status": "ok"} when the service is ready, 503 otherwise. No key. |
GET /openapi.json | The OpenAPI document of the running version. No key. |
Common to every endpoint
- Authentication:
Authorization: Bearer <key>orX-Api-Key: <key>. The compatible endpoints take the key in theapi_secretform field. - Server-side only: a request that carries an
Originheader is refused with403 forbidden. - Errors:
{"status": "failure", "error": {"type", "code", "message"}}. See responses and errors for every type. - Headers:
X-Request-Id,RateLimit-Limit,RateLimit-Remaining,RateLimit-Reset,X-Quota-Used,X-Quota-Limit, andRetry-Afterwhen you must wait. - Limits: see limits and quotas.
The OpenAPI document
curl https://api.openshield.dev/openapi.json
Use it to generate a client, to import the API into a tool such as Postman or Insomnia, or to give an AI agent the exact contract. The copy under /docs/api/openapi.json is published with each release of these docs.