Skip to content

Build on OnlyWorlds

OnlyWorlds is open source and license free. A world on onlyworlds.com is reachable through a REST API, a change feed and an MCP server; every interface reads and writes the same data, scoped by a per-world key. New here? Getting started walks through a first read and write.

The REST API at https://www.onlyworlds.com/api/v2/ serves every element type at the same routes, with cursor pagination, one-shape links, bulk writes and a change feed.

Page Covers
API reference Overview: base URL, authentication, routes
Reads and pagination Lists, filters, sparse fields, expansion
Link fields Link fields and adding or removing links atomically
Writes and bulk Create, upsert, patch, delete, bulk
Changes and export The change feed, for keeping a cache or mirror in step, and the world export
Members Worlds shared with people and agents, and their roles
Hidden elements Hiding an element from everyone but the owner, the co-builders and its creator
Public worlds A world open to everyone: its page and the keyless reads
Proposed changes Proposing a change to an element, and accepting or declining it
The draught One Character’s context in one read
Lenses on the API A world’s lenses and the lenses a member starts with
Sign in with OnlyWorlds Signing a person in from your tool, for an account token
Images Uploading images
Files Attaching PDFs, text files and world bundles to an element
CORS Calling the API from a browser
Classic API The original /api/worldapi/ dialect, still supported
Errors The error envelope and every error code

The interactive reference is at onlyworlds.com/api/docs, and the machine-readable spec at openapi.json. Any language or engine without an SDK can generate a client from the spec.

Page For
Packages Which SDK fits, and calling the API without one
TypeScript Web apps and tools: a typed client and generated constants (npm install @onlyworlds/sdk)
Python Scripts and data pipelines
Unity Games: typed C# models and a client

To start a web tool from a page that already runs, use World Starter, a template repository (MIT): plain TypeScript with Vite and the TypeScript SDK, no framework. Out of the box it reads the demo world Moppetopia, one element type at a time and one element with its links; paste a read key to read your own world. It only reads.

Page For
AI agents Which way in fits where the agent runs
MCP server Any MCP client, at https://www.onlyworlds.com/mcp
AI seats An agent joining a world as a member, with its own key and, by default, its own Character
LLM guide One text file that teaches the standard to a chat assistant
Toolkit A Claude Code plugin with skills to import, model, read, draw and move worlds and build tools

The element types, fields and links are documented under Schema. Tools that decode the schema directly should use schema-dist: the generated distribution of the YAML, its decoder, and the ruling table.

AI agents: start from llms.txt, this site's index, which links the whole documentation as plain text.