Skip to main content
The Slides API is built on ORPC, a TypeScript-native RPC framework. All procedures are served over a single HTTP endpoint using POST /rpc. There is no REST routing — every call goes to the same URL with the procedure name encoded in the request.

Base URL

http://localhost:3000
The server runs locally. No authentication is required — Slides is a local-first application.

Available procedures

ProcedureDescription
healthCheckReturns "OK" — use to verify the server is reachable
slideshowLoadLoad slideshows from the filesystem, optionally filtered by dataset ID
slideshowSaveSave slideshows back to the filesystem with optional staleness protection
slideshowAssistantSend a natural language request to the AI assistant to modify slides

Other server endpoints

In addition to ORPC procedures, the server exposes these HTTP endpoints:
EndpointDescription
GET /img/*Serves image files from the img/ subdirectory inside the data directory. Used by image blocks in slideshows.
GET /api-referenceOpenAPI 3.x specification auto-generated from procedure contracts.

Calling the API

You can call procedures in two ways: using the typed ORPC client (recommended for TypeScript projects), or via raw HTTP.

TypeScript client

Import the AppRouter type from @slides/api/routers/index to get full end-to-end type safety. You never need to write the procedure name as a string — the client infers it from the type.
import { createORPCClient } from "@orpc/client";
import { RPCLink } from "@orpc/client/fetch";
import type { AppRouter } from "@slides/api/routers/index";

const client = createORPCClient<AppRouter>(
  new RPCLink({
    url: "http://localhost:3000/rpc",
  })
);

// Load all slideshows
const { slideshows, provenance } = await client.slideshowLoad({
  datasetId: "my-project",
});

// Save updated slideshows
const result = await client.slideshowSave({
  datasetId: "my-project",
  slideshows,
});

console.log(result.digest); // use for next staleness check

Raw HTTP

Every procedure is a POST request to /rpc/{procedureName} with a JSON body.
curl -X POST http://localhost:3000/rpc/slideshowLoad \
  -H "Content-Type: application/json" \
  -d '{"datasetId": "my-project"}'
The ORPC wire format wraps the input in a JSON object. The input key is not required for raw HTTP — post the input fields directly as the JSON body.

OpenAPI specification

ORPC auto-generates an OpenAPI 3.x specification from the procedure contracts. You can access it at:
http://localhost:3000/api-reference
This endpoint returns a valid OpenAPI document you can import into tools like Postman, Insomnia, or Swagger UI.

Procedure reference

slideshowLoad

Load slideshows from the filesystem.

slideshowSave

Save slideshows back to the filesystem.

slideshowAssistant

Send a natural language request to the AI assistant.

Type reference

Slideshow

The top-level slideshow object with title, concepts, and slides.

Slide

A single slide with ordered blocks and a concept reference.

Blocks

All 13 content block types that can appear on a slide.

Build docs developers (and LLMs) love