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

# Create Upload From Url

> Register a source file by URL, fetched through the SSRF guard.



## OpenAPI

````yaml /openapi.json post /api/v1/brands/{brand_id}/creative/uploads/from-url
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brands/{brand_id}/creative/uploads/from-url:
    post:
      tags:
        - Brand Creative
        - Brand Creative
      summary: Create Upload From Url
      description: Register a source file by URL, fetched through the SSRF guard.
      operationId: >-
        create_upload_from_url_api_v1_brands__brand_id__creative_uploads_from_url_post
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Brand Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadFromUrlRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UploadFromUrlRequest:
      properties:
        from_url:
          type: string
          maxLength: 2048
          minLength: 1
          title: From Url
        kind:
          type: string
          title: Kind
          default: ad_image
      type: object
      required:
        - from_url
      title: UploadFromUrlRequest
      description: >-
        Register a source file by URL instead of multipart.


        The URL is fetched through `safe_fetch.safe_get_bytes` (validate →
        resolve

        → pin-to-IP → per-hop redirect re-validation), never with a raw client.
    UploadResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        kind:
          type: string
          title: Kind
        filename:
          type: string
          title: Filename
        content_type:
          type: string
          title: Content Type
        size_bytes:
          type: integer
          title: Size Bytes
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - kind
        - filename
        - content_type
        - size_bytes
        - created_at
      title: UploadResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````