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

# Upload an image

> Uploads one local image and returns a durable LocalAds URL for use in a later product, Quick Shoot, or template request. Base64-encoded images are not supported.



## OpenAPI

````yaml /api/openapi.yaml post /uploads/images
openapi: 3.1.0
info:
  title: LocalAds API
  version: 1.0.0
  description: Public API for LocalAds customer integrations.
servers:
  - url: https://makelocalads.com/api/v1
security:
  - apiKey: []
paths:
  /uploads/images:
    post:
      summary: Upload an image
      description: >-
        Uploads one local image and returns a durable LocalAds URL for use in a
        later product, Quick Shoot, or template request. Base64-encoded images
        are not supported.
      operationId: uploadImage
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              additionalProperties: false
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: One JPG, PNG, WebP, HEIC, or HEIF image, up to 10 MB.
      responses:
        '201':
          description: >-
            The image was stored and is ready to reference from another API
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageUpload'
              example:
                url: >-
                  https://assets.makelocalads.com/public-api/example/images/3a4c79b4-999b-48c2-a77c-1db08b884908.jpg
                content_type: image/jpeg
                width: 1600
                height: 1600
                size_bytes: 428310
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ImageUpload:
      type: object
      additionalProperties: false
      required:
        - url
        - content_type
        - width
        - height
        - size_bytes
      properties:
        url:
          type: string
          format: uri
          description: Durable LocalAds-owned URL to place in an image_urls array.
        content_type:
          type: string
          enum:
            - image/jpeg
            - image/png
            - image/webp
        width:
          type: integer
          minimum: 1
        height:
          type: integer
          minimum: 1
        size_bytes:
          type: integer
          minimum: 1
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - detail
        - code
        - request_id
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        code:
          type: string
        request_id:
          type: string
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: The API key lacks the required permission.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    PayloadTooLarge:
      description: The uploaded image is larger than 10 MB.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    UnsupportedMediaType:
      description: The multipart body or uploaded file is not a supported image type.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    RateLimited:
      description: API key rate limit exceeded.
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    InternalError:
      description: The upload could not be stored because of a temporary server error.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: lads_...

````