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

# Create an Image CDN origin source

> Attach an HTTPS origin such as a public S3/R2/GCS/Azure bucket endpoint, custom CDN domain, or web folder. Private-network hosts and redirects are rejected.



## OpenAPI

````yaml /openapi.json post /api/cdn-origins
openapi: 3.1.0
info:
  title: Convertly API
  version: 1.0.0
  description: >-
    Convertly provides production API endpoints for media conversion,
    compression, Image CDN delivery, Forma AI, HLS/DASH video streaming, media
    tools, async jobs, workflows, webhooks, and Convertly Storage.
  license:
    name: Proprietary
    url: https://convertly.sh/terms
servers:
  - url: https://convertly.sh
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /api/cdn-origins:
    post:
      tags:
        - Image CDN
      summary: Create an Image CDN origin source
      description: >-
        Attach an HTTPS origin such as a public S3/R2/GCS/Azure bucket endpoint,
        custom CDN domain, or web folder. Private-network hosts and redirects
        are rejected.
      operationId: createCdnOrigin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                slug:
                  type: string
                  pattern: ^[a-z0-9][a-z0-9_-]{0,62}$
                sourceType:
                  type: string
                  enum:
                    - web_proxy
                    - s3
                    - r2
                    - gcs
                    - azure
                  default: web_proxy
                baseUrl:
                  type: string
                  format: uri
                pathPrefix:
                  type: string
                enabled:
                  type: boolean
                  default: true
              required:
                - name
                - slug
                - baseUrl
      responses:
        '201':
          description: Origin source created
          content:
            application/json:
              schema:
                type: object
                properties:
                  origin:
                    type: object
                required:
                  - origin
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        upgradeUrl:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Dashboard-generated Convertly API key. Keys currently begin with
        `cvly_`.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternative API key header for server-side clients.

````