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 pathWhat it does
POST /v1/imageChecks an image sent as the raw body, or at a public url. See images.
POST /v1/textChecks a text sent as JSON. See texts.
GET /v1/workflowsLists the names and current versions of the workflows the key may use. See workflows.
POST /1.0/check-workflow.jsonChecks an image, SightEngine-compatible, as a multipart form. See migrating from SightEngine.
GET /1.0/check-workflow.jsonChecks an image by its url, SightEngine-compatible, with the key in the api_secret query parameter.
POST /1.0/text/check-workflow.jsonChecks a text, SightEngine-compatible, as a multipart form.
GET /health{"status": "ok"} when the service is ready, 503 otherwise. No key.
GET /openapi.jsonThe OpenAPI document of the running version. No key.

Common to every endpoint

  • Authentication: Authorization: Bearer <key> or X-Api-Key: <key>. The compatible endpoints take the key in the api_secret form field.
  • Server-side only: a request that carries an Origin header is refused with 403 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, and Retry-After when 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.