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

# Start a job

> Send a plain-English prompt and optional files. ShareSame returns a job ID immediately and completes the work in the background.



## OpenAPI

````yaml POST /generate
openapi: 3.1.0
info:
  title: ShareSame API
  description: >-
    Build and remix websites from your own AI using ShareSame's job-based
    generation API.
  version: '2026-03-13'
servers:
  - url: https://{host}/api/sharesame
    variables:
      host:
        default: your-base-url-from-sharesame
        description: Base URL ShareSame gives your team when API access is enabled
security:
  - bearerAuth: []
paths:
  /generate:
    post:
      summary: Start a website generation or remix job
      description: >-
        Send a plain-English prompt and optional files. ShareSame returns a job
        ID immediately and completes the work in the background.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateRequest'
            examples:
              from-scratch:
                value:
                  query: build me a CRM like Salesforce but call it ForceSale
                  user_id: acct_123
                  project_id: project_123
              remix-existing-files:
                value:
                  query: make the hero section feel more premium
                  files:
                    - path: index.html
                      content: <!DOCTYPE html><html><body>Hello</body></html>
                      language: html
      responses:
        '200':
          description: Job accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateResponse'
components:
  schemas:
    GenerateRequest:
      type: object
      required:
        - query
      properties:
        query:
          type: string
          minLength: 1
          maxLength: 4000
          description: Plain-English request for the website or change you want
        files:
          type: array
          description: Existing files to edit for a remix or follow-up change
          items:
            $ref: '#/components/schemas/GenerateFile'
        source_url:
          type:
            - string
            - 'null'
          description: Optional URL to fork
        user_id:
          type:
            - string
            - 'null'
          description: Your own user ID for tracking
        project_id:
          type:
            - string
            - 'null'
          description: Stable website ID so ShareSame can keep related edits together
    GenerateResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - building
            - failed
        job_id:
          type: string
        error:
          type: string
        source:
          type: string
          description: How ShareSame started the job
          enum:
            - ''
            - cache
            - generated
            - fork
        search_score:
          type: number
        sandbox_session:
          type: string
        cached_files:
          type: array
          items:
            $ref: '#/components/schemas/GenerateFile'
    GenerateFile:
      type: object
      required:
        - path
        - content
      properties:
        path:
          type: string
          description: Project-relative file path
        content:
          type: string
          description: Full file contents
        language:
          type: string
          default: text
          description: Best-effort language label
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````