Skip to content

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.json

It needs no authentication and is served as application/json.

Fetch the spec
curl -sS https://api.galleyrender.com/openapi.json -o galley-openapi.json

This 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.

Every /v1 endpoint documented in this reference:

PathPage
POST /v1/renderRender
POST /v1/render/batchBatch render
GET /v1/renders/:id, GET /v1/rendersGet a render
GET /v1/templates, GET /v1/templates/:ref, DELETE /v1/templates/:nameTemplates
POST /v1/templatesCreate a template
POST /v1/templates/:name/versions, GET /v1/templates/:name/versionsVersions
POST /v1/templates/:ref/validateValidate
GET /v1/usageUsage

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.

openapi-typescript emits types with no runtime, which pairs well with the dependency-free fetch client on the SDKs page.

Types for Node or the browser
npx openapi-typescript https://api.galleyrender.com/openapi.json -o galley.d.ts
Using them
import 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"];

openapi-generator produces a complete client for most languages.

A Python client
npx @openapitools/openapi-generator-cli generate \
-i https://api.galleyrender.com/openapi.json \
-g python \
-o ./galley-client

Swap -g python for go, java, csharp, rust, typescript-fetch or any other generator name.

datamodel-code-generator turns the schemas into Pydantic models without generating transport code.

Pydantic models
pip install datamodel-code-generator
datamodel-codegen \
--url https://api.galleyrender.com/openapi.json \
--input-file-type openapi \
--output-model-type pydantic_v2.BaseModel \
--output galley_models.py

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:

Fail the build when the spec changes
curl -sS https://api.galleyrender.com/openapi.json |
python3 -m json.tool --sort-keys > openapi.next.json
diff -u openapi.json openapi.next.json

If you are a model rather than a code generator, there are two documents written for you and both are shorter than the spec:

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.