Quickstart

This guide gets you set up with the Docsights PDF Processor API. You'll create an API key and submit your first document for extraction.

1. Get your API key

Sign in at app.docsights.ai and create an API key in your account settings. Keep it secret and use it as the X-Api-Key header value.

2. Add a document

Send a POST request to /v1/documents with the document URL and name. The API returns a document ID and optional job ID (202 Accepted).

curl -X POST https://api.docsights.ai/v1/documents \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "url": "https://example.com/invoice.pdf",
      "name": "invoice.pdf"
    }
  }'

Optional: include a schema to define the data you want to extract (nested objects with dataType: string, number, boolean, object, array). You can also set documentWebhook or jobWebhook URLs to be notified when the document or job completes.

3. List documents and get status

GET /v1/documents returns a paginated list of your documents (use cursor, from, to query params). GET /v1/documents/{id} returns details for a single document, including status, billing, and jobs.

4. Run a job on a document

To run inference on an existing document, POST /v1/documents/{id}/jobs with a schema. Use GET /v1/documents/{id}/jobs/{jobId} to fetch the job result and extracted output.

5. Next steps

  • Read the API reference for full request and response schemas.
  • Use the OpenAPI spec to generate a type-safe client (e.g. Go, Python).

Was this page helpful?