> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avocadostudio.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Plan and apply an edit from a natural-language message



## OpenAPI

````yaml /api-reference/orchestrator.openapi.json post /chat
openapi: 3.0.3
info:
  title: Avocado Studio Orchestrator API
  description: >-
    HTTP API exposed by the orchestrator. The brain that runs editor sessions,
    calls the LLMs, and serves draft state to integrated sites.


    **Note**: this spec is auto-generated from the running Fastify routes. Most
    routes do not have request/response schemas attached today, so signatures
    are skeletal — request bodies and response payloads are documented in the
    route source for now. See [the API Reference index](/api-reference) for
    context.
  version: 0.0.1
servers:
  - url: http://localhost:4200
    description: Local development orchestrator (default port)
security: []
tags:
  - name: Sites
    description: Site registration and listing
  - name: Chat
    description: AI chat / planning endpoints
  - name: Sites Agent
    description: Site onboarding agent (migrate / integrate / create)
  - name: Draft
    description: Draft content read endpoints called by integrated sites
  - name: Publish
    description: Publishing and content snapshot endpoints
  - name: History
    description: Undo / redo / version log
  - name: Auth
    description: Optional access password gate
  - name: Media
    description: Image upload and generation
  - name: Health
    description: Service health and readiness
paths:
  /chat:
    post:
      tags:
        - Chat
      summary: Plan and apply an edit from a natural-language message
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                session:
                  type: string
                siteId:
                  type: string
                componentsManifest:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: string
                siteCapabilities:
                  anyOf:
                    - type: object
                      properties:
                        allowStructuralEdits:
                          type: boolean
                        manifestStatus:
                          type: string
                          enum:
                            - loading
                            - ready
                            - degraded
                        reason:
                          type: string
                        manifestVersion:
                          type: integer
                          exclusiveMinimum: true
                          maximum: 9007199254740991
                        blockCount:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        checkedAt:
                          type: string
                      required:
                        - allowStructuralEdits
                        - manifestStatus
                        - checkedAt
                    - type: string
                sitePurpose:
                  type: string
                siteHosting:
                  type: string
                businessContext:
                  anyOf:
                    - type: object
                      properties:
                        purpose:
                          type: string
                        tone:
                          type: string
                        constraints:
                          type: array
                          items:
                            type: string
                    - type: string
                siteContext:
                  anyOf:
                    - type: object
                      properties:
                        siteId:
                          type: string
                        siteName:
                          type: string
                        purpose:
                          type: string
                        hosting:
                          type: string
                        tone:
                          type: string
                        constraints:
                          type: array
                          items:
                            type: string
                        gdriveFolderId:
                          type: string
                    - type: string
                locale:
                  type: string
                slug:
                  type: string
                message:
                  type: string
                modelKey:
                  type: string
                  enum:
                    - fast
                    - balanced
                    - reasoning
                    - codex
                provider:
                  type: string
                  enum:
                    - openai
                    - anthropic
                    - gemini
                activeBlockId:
                  type: string
                activeBlockType:
                  type: string
                activeEditablePath:
                  type: string
                executionMode:
                  type: string
                  enum:
                    - auto
                    - plan_only
                    - apply_pending_plan
                    - discard_pending_plan
                    - continue_chain
                pendingPlanId:
                  type: string
                continuationChainId:
                  type: string
      responses:
        '200':
          description: Default Response

````