API overview
Connect Preimage to your own tools to retrieve site data, monitor scans, and automate project workflows.
GraphQL API Query projects, scans, outputs, files, and annotations with a workspace API key.
REST API · Swagger Explore REST v2 operations, request parameters, and response schemas.
Choose an API
| GraphQL | REST v2 | |
|---|---|---|
| Best suited to | Reading related workspace data in a single query | Resource-based workflows, including project and scan management |
| Endpoint | https://api.preimage.ai/public/v1/graphql | https://api.preimage.ai/v2 |
| Authentication | Workspace API key in x-api-key | Bearer token in Authorization |
| Reference | Queries and examples | Swagger endpoint explorer |
These APIs use different credentials. A GraphQL workspace API key is not a REST bearer token. Access to operations depends on your workspace, role, and enabled features.
Get access
For GraphQL, use the API key for the workspace you want to query. For REST access and token setup, contact support@preimage.ai with your intended workflow and workspace.
Keep API keys and bearer tokens in your server-side environment. Do not include them in public frontend code or shared examples.