Gallery Platform API
Reference

Extract artwork drafts from a document

Reads an already-uploaded PDF or image (in the gallery-documents bucket) and extracts a structured artwork DRAFT for each work it lists — the multi-row sibling of parse-caption. Each draft carries artist (resolved detect-existing-or-create against the gallery's roster), title, year, medium, dimensions, price/currency, and edition, with low-confidence fields flagged; document-level problems come back as warnings. This is read-shaped: it returns suggestions for review and writes nothing. The model loop is server-only (the Anthropic key never reaches the browser); requires a first-party session.

POST
/gallery/artworks/extract-from-document

Reads an already-uploaded PDF or image (in the gallery-documents bucket) and extracts a structured artwork DRAFT for each work it lists — the multi-row sibling of parse-caption. Each draft carries artist (resolved detect-existing-or-create against the gallery's roster), title, year, medium, dimensions, price/currency, and edition, with low-confidence fields flagged; document-level problems come back as warnings. This is read-shaped: it returns suggestions for review and writes nothing. The model loop is server-only (the Anthropic key never reaches the browser); requires a first-party session.

Authorization

bearerAuth artworks:read
AuthorizationBearer <token>

A gallery API key, sent as Authorization: Bearer gpk_… (or the x-api-key header).

In: header

Scope: artworks:read

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Extract artwork drafts from an uploaded document (PDF or image).

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

{  "drafts": [    {      "artist": {        "name": "string",        "artist_id": "string",        "matched": true      },      "title": "string",      "year": -9007199254740991,      "medium": "string",      "height_cm": 0,      "width_cm": 0,      "depth_cm": 0,      "dimension_unit": "in",      "framed": true,      "price_cents": -9007199254740991,      "currency": "string",      "price_min_cents": -9007199254740991,      "price_max_cents": -9007199254740991,      "edition": "string",      "low_confidence": [        "string"      ]    }  ],  "warnings": [    "string"  ]}