Enable creation, retrieval, update and deletion of “canvas” resources at the same level as project files and guidelines, so that a chat session can list, analyze and modify canvases via the canmore
API.
- Interactive editing: Let chats collaboratively author design mockups, documentation or code snippets inside the project.
- Unified project model: Treat canvases just like other textdocs (e.g., guidelines or source files) for consistency.
- Improved workflows: Designers, product managers and developers can iterate on UIs or docs without switching tools.
Technical Specification
- Canvas Resource Schema
{
"id": "string",
"project_id": "string",
"name": "string",
"type": "document" | "code/*",
"content": "string"
}
- New REST Endpoints
GET /v1/projects/{project_id}/canvases
POST /v1/projects/{project_id}/canvases
PATCH /v1/projects/{project_id}/canvases/{canvas_id}
DELETE /v1/projects/{project_id}/canvases/{canvas_id}
- Authentication & Permissions
- Inherit scopes from project:
projects.read
for GET,projects.write
for POST/PATCH/DELETE. - Canvas access controlled by project membership and roles.
canmore
SDK Extension
- Create canvas
await openai.canmore.create_textdoc({
name: "HomepageMockup",
type: "code/react",
content: "<div>…JSX here…</div>"
});
- Update canvas
await openai.canmore.update_textdoc({
jawbone_id: "canvas_id",
updates: [
{ pattern: "<div>(.*)<\\/div>", replacement: "<div className=\"p-4\">$1</div>" }
]
});
Usage Flow
- Chat retrieves list of canvases in a project.
- User selects a canvas to view or edit.
- Chat opens, patches or replaces content via
canmore
. - Updated canvas is saved alongside other project files.