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

# Upload a pattern

> Saves a file you uploaded as a pattern. Nothing is generated: the response is the pattern itself, not a job, with a null `prompt` and `sourcePatternId`. Pass its `patternId` to `products/create` to make a print product. Calling again with the same `uploadId` returns the same pattern.



## OpenAPI

````yaml /openapi.json post /patterns/upload
openapi: 3.1.1
info:
  title: Arcade API
  version: '1'
  description: >-
    Generate patterns and custom products from text prompts, and order them.
    Every request is a POST with a JSON body.
servers:
  - url: https://platform.arcade.ai/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Patterns
    description: Reusable print patterns you generate or upload.
  - name: Refine
    description: Edit, recolor, crop and extend patterns.
  - name: Jobs
    description: Long-running work.
  - name: References
    description: Images that guide generation.
  - name: Models
    description: The models that generate patterns.
  - name: Categories
    description: Product types and their options.
  - name: Products
    description: Products generated from a prompt or made from your patterns.
  - name: Checkouts
    description: Checkouts for ordering products.
  - name: Orders
    description: Your orders.
  - name: Feedback
    description: Reports about the API to Arcade.
paths:
  /patterns/upload:
    post:
      tags:
        - Patterns
      summary: Upload a pattern
      description: >-
        Saves a file you uploaded as a pattern. Nothing is generated: the
        response is the pattern itself, not a job, with a null `prompt` and
        `sourcePatternId`. Pass its `patternId` to `products/create` to make a
        print product. Calling again with the same `uploadId` returns the same
        pattern.
      operationId: patterns.upload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                requestId:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: >-
                    An ID you choose for this request, up to 128 characters.
                    Retrying with the same `requestId` and body returns the
                    original result.
                uploadId:
                  type: string
                  pattern: >-
                    ^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.(gif|jpg|png|webp)$
                  description: >-
                    The `uploadId` from `patterns/createUpload`, after you have
                    sent the file.
              required:
                - requestId
                - uploadId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  repeatDrop:
                    enum:
                      - none
                      - half
                      - quarter
                      - eighth
                    type: string
                    description: >-
                      How the pattern repeats. Each column of tiles is shifted
                      down from the one before it by this fraction of the tile
                      height: `none`, `half`, `quarter` or `eighth`. The tile
                      itself stays square.
                  imageUrl:
                    type: string
                    format: uri
                    description: >-
                      URL of the image. It expires; call the endpoint again for
                      a fresh one. The host can change.
                  thumbnailUrl:
                    type: string
                    format: uri
                    description: >-
                      URL of a small version of the image. It expires like
                      `imageUrl`.
                  width:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    exclusiveMinimum: 0
                    description: Width of the image in pixels.
                  height:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    exclusiveMinimum: 0
                    description: Height of the image in pixels.
                  patternId:
                    type: string
                    minLength: 1
                    description: >-
                      The pattern's ID. A pattern never changes: a refine makes
                      a new pattern with a new ID.
                  prompt:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      The prompt the pattern was generated from. A refined
                      pattern keeps the prompt of its original. Null for
                      uploaded artwork.
                  sourcePatternId:
                    anyOf:
                      - type: string
                        minLength: 1
                        description: >-
                          The pattern's ID. A pattern never changes: a refine
                          makes a new pattern with a new ID.
                      - type: 'null'
                    description: >-
                      For a refined pattern, the pattern it was made from. Null
                      for a generated or uploaded pattern.
                  createdAt:
                    type: string
                    format: date-time
                    description: When the pattern was made.
                required:
                  - imageUrl
                  - thumbnailUrl
                  - width
                  - height
                  - patternId
                  - prompt
                  - sourcePatternId
                  - createdAt
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: An API key from Settings → API keys in Arcade Studio.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.