OpenAPI
The REST API describes itself. The same document the API serves is the only description you need to generate a client.
GET https://api.galleyrender.com/openapi.jsonIt needs no authentication and is served as application/json.
curl -sS https://api.galleyrender.com/openapi.json -o galley-openapi.jsonThis is not a copy kept alongside the docs — it is generated from the routes the API is running, so the endpoints, request bodies and error shapes in it are what the service actually accepts. If this page and the spec ever disagree, the spec wins.
What is in it
Section titled “What is in it”Every /v1 endpoint documented in this reference:
| Path | Page |
|---|---|
POST /v1/render | Render |
POST /v1/render/batch | Batch render |
GET /v1/renders/:id, GET /v1/renders | Get a render |
GET /v1/templates, GET /v1/templates/:ref, DELETE /v1/templates/:name | Templates |
POST /v1/templates | Create a template |
POST /v1/templates/:name/versions, GET /v1/templates/:name/versions | Versions |
POST /v1/templates/:ref/validate | Validate |
GET /v1/usage | Usage |
Plus the shared error envelope, so a generated client gets typed errors as well as typed
responses. The service-to-service onboarding routes under /v1/internal/* are not part of it:
they are not public API.
Generating a client
Section titled “Generating a client”TypeScript — types only
Section titled “TypeScript — types only”openapi-typescript emits types with no
runtime, which pairs well with the dependency-free fetch client on the SDKs page.
npx openapi-typescript https://api.galleyrender.com/openapi.json -o galley.d.tsimport type { paths } from "./galley.d.ts";
type RenderBody = paths["/v1/render"]["post"]["requestBody"]["content"]["application/json"];type Render = paths["/v1/render"]["post"]["responses"]["200"]["content"]["application/json"];Any language — a full client
Section titled “Any language — a full client”openapi-generator produces a complete client for most
languages.
npx @openapitools/openapi-generator-cli generate \ -i https://api.galleyrender.com/openapi.json \ -g python \ -o ./galley-clientSwap -g python for go, java, csharp, rust, typescript-fetch or any other generator
name.
Python — models only
Section titled “Python — models only”datamodel-code-generator turns the
schemas into Pydantic models without generating transport code.
pip install datamodel-code-generatordatamodel-codegen \ --url https://api.galleyrender.com/openapi.json \ --input-file-type openapi \ --output-model-type pydantic_v2.BaseModel \ --output galley_models.pyPin it in CI
Section titled “Pin it in CI”The spec moves when the API does. If your build depends on generated code, vendor a copy and diff it, so a change shows up as a pull request rather than as a surprise:
curl -sS https://api.galleyrender.com/openapi.json | python3 -m json.tool --sort-keys > openapi.next.jsondiff -u openapi.json openapi.next.jsonFor agent readers
Section titled “For agent readers”If you are a model rather than a code generator, there are two documents written for you and both are shorter than the spec:
- https://mcp.galleyrender.com/skill.md — the whole product on one page: tools, formats, cost, template language, error table, rules of thumb.
- https://galleyrender.com/llms.txt (also at https://mcp.galleyrender.com/llms.txt) — a map of every canonical URL, with one line each.
And the MCP endpoint itself, https://mcp.galleyrender.com/mcp, exposes the same operations as
tools with descriptions and input schemas already attached — no generation step at all. See
SDKs and clients.