Figures API
Today only
GET /v1/figures (list) and POST /v1/figures (upload metadata) are shipped. Per-figure routes (GET /v1/figures/{id}, /download, /image) and gallery management (/labs/{slug}/gallery*) are planned, not yet live. Render figures via the lab site or Convex queries today.Upload a Figure
Upload an image file and associate it with a lab, experiment, or paper.string
required
Lab this figure belongs to.
string
required
Figure title (e.g., “Posterior Contours — H0 vs Omega_m”).
file
required
Image file. Supported formats: PNG, JPG, SVG, PDF, WebP.
string
Link to a paper (for figures that appear in manuscripts).
string
Link to the experiment that generated this figure.
string
Path to the script that generated this figure (for reproducibility).
object
List Figures
string
required
Lab ID.
string
Filter to figures linked to a specific paper.
string
Filter to figures generated by a specific experiment.
number
default:"50"
Results per page.
string
Pagination cursor.
Get a Figure
Update Figure Metadata
string
Updated title.
string
Link or re-link to a paper.
string
Link or re-link to an experiment.
string
Updated script path.
Replace Figure Image
Upload a new image to replace the existing one while preserving metadata and links.Delete a Figure
Download a Figure
Get the raw image file.Gallery Management
The gallery management endpoints (
/labs/{slug}/gallery, /labs/{slug}/gallery/settings) are planned — not yet shipped. Figure ordering and lightbox settings are currently managed via the Lab Site view in the web app.Get Gallery Order
Reorder Gallery
string[]
required
Ordered list of figure IDs defining the gallery sequence.
Lightbox Configuration
The lab site gallery includes a lightbox viewer for full-resolution viewing. Configure lightbox behavior per lab.boolean
default:true
Enable or disable the lightbox viewer.
boolean
default:true
Show figure titles in the lightbox overlay.
boolean
default:false
Show the generating script path in the lightbox overlay.
boolean
default:true
Show a link to the source experiment in the lightbox overlay.