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

# Create submission

> Creates an extraction job for a single URL. The job runs asynchronously: poll `GET /submissions/{id}/result` until the status is `completed` or `failed`.

Set the `map` query parameter to `true` to run map-mode discovery, which crawls the site and submits multiple URLs (up to `max_urls`).



## OpenAPI

````yaml api-reference/openapi.json POST /design/submissions
openapi: 3.1.0
info:
  title: Taste Engine Design API
  version: 1.0.0
  description: >-
    Public REST API for the Taste Engine. Submit a URL, extract a structured
    design system from any website, search the brand corpus by aesthetic, and
    ground prompts in real brand profiles.


    All requests are authenticated with an API key sent in the `X-API-Key`
    header. Create one directly in the Engine dashboard at
    https://engine.tastelabs.com/app/api-keys.
  contact:
    name: Taste Engine Support
    email: support@thetaste.ai
servers:
  - url: https://api.tastelabs.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    description: Identity of the authenticated API key holder.
  - name: Submissions
    description: >-
      Create and track extraction jobs, then retrieve the resulting design
      system.
  - name: Prompts
    description: Rewrite prompts grounded in an extracted brand profile.
  - name: Search
    description: >-
      Find brands in the curated corpus by describing an aesthetic, or by
      similarity to one of your own extractions.
  - name: Brand adherence
    description: >-
      Judge how well a page adheres to a reference site's brand: submit a pair
      of URLs, poll the job, then read the verdict.
paths:
  /design/submissions:
    post:
      tags:
        - Submissions
      summary: Create submission
      description: >-
        Creates an extraction job for a single URL. The job runs asynchronously:
        poll `GET /submissions/{id}/result` until the status is `completed` or
        `failed`.


        Set the `map` query parameter to `true` to run map-mode discovery, which
        crawls the site and submits multiple URLs (up to `max_urls`).
      operationId: createSubmission
      parameters:
        - name: map
          in: query
          required: false
          description: >-
            When `true`, discover and submit multiple URLs from the site instead
            of just the one provided.
          schema:
            type: boolean
            default: false
        - name: max_urls
          in: query
          required: false
          description: >-
            Maximum number of URLs to discover in map mode. The server clamps
            this to 200.
          schema:
            type: integer
            minimum: 1
            maximum: 200
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmissionCreate'
            example:
              url: https://stripe.com
      responses:
        '202':
          description: The submission was accepted and queued for processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmissionAccepted'
              example:
                submission_id: sub_2f9a1c7b
                status: accepted
                source_url: https://stripe.com
                accepted_at: '2026-06-10T12:00:00Z'
                cache_hit: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    SubmissionCreate:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: The URL to extract a design system from.
        force:
          type: boolean
          default: false
          description: Re-run extraction even if a cached result exists.
        enable_deep_analysis:
          type: boolean
          default: false
          description: Run additional, slower analysis steps.
      required:
        - url
    SubmissionAccepted:
      type: object
      properties:
        submission_id:
          type: string
        status:
          type: string
          enum:
            - accepted
        source_url:
          type: string
          format: uri
        accepted_at:
          type: string
          format: date-time
      required:
        - submission_id
        - status
        - source_url
        - accepted_at
    Error:
      type: object
      description: >-
        Standard error envelope for non-2xx responses: the machine-readable
        `error` code and the human-readable `message` are nested under `detail`.
        Validation errors (`422`) and search failures (`502`, `503`) shape
        `detail` differently; see those responses.
      properties:
        detail:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
              examples:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - NOT_READY
            message:
              type: string
              description: Human-readable explanation of the error.
          required:
            - error
            - message
          additionalProperties: true
      required:
        - detail
  responses:
    Unauthorized:
      description: The API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail:
              error: UNAUTHORIZED
              message: Bearer token or X-API-Key required
    InsufficientCredits:
      description: >-
        The account doesn't have enough credits to run the request. Only occurs
        when credit metering is enabled.
      content:
        application/json:
          schema:
            type: object
            required:
              - detail
            properties:
              detail:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    type: string
                    examples:
                      - INSUFFICIENT_CREDITS
                  message:
                    type: string
                  balance:
                    type: integer
                    description: The account's current credit balance.
                  required:
                    type: integer
                    description: Credits required to run this request.
          example:
            detail:
              error: INSUFFICIENT_CREDITS
              message: Not enough credits for this request.
              balance: 0
              required: 1
    Forbidden:
      description: The API key is valid but is not allowed to call this endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail:
              error: FORBIDDEN
              message: This key is not allowed to call this endpoint.
    ValidationError:
      description: >-
        The request failed validation. `detail` is a list of issues, each naming
        the offending field in `loc`.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: array
                items:
                  type: object
                  properties:
                    loc:
                      type: array
                      items: {}
                    msg:
                      type: string
                    type:
                      type: string
          example:
            detail:
              - loc:
                  - body
                  - url
                msg: Field required
                type: missing
    InternalError:
      description: An unexpected server error occurred. The body is plain text.
      content:
        text/plain:
          example: Internal Server Error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key issued by the Taste Engine. Create one in the dashboard at
        https://engine.tastelabs.com/app/api-keys.

````