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

# 업로드 시작

> 파일을 보낼 주소를 줘요. `upload_url`로 파일을 PUT한 뒤 업로드 확인을 호출해 주세요.



## OpenAPI

````yaml /openapi.json post /uploads
openapi: 3.1.0
info:
  title: Zet Studio API
  version: 1.0.0
  description: 이미지와 영상을 만드는 API예요. 작업을 시작하고, 끝날 때까지 조회한 뒤, 결과를 받아요.
servers:
  - url: https://api.studio.thezet.io/v1
security: []
tags:
  - name: 모델과 가격
  - name: 생성
  - name: 입력 파일
  - name: 계정
  - name: 웹훅
paths:
  /uploads:
    post:
      tags:
        - 입력 파일
      summary: 업로드 시작
      description: 파일을 보낼 주소를 줘요. `upload_url`로 파일을 PUT한 뒤 업로드 확인을 호출해 주세요.
      operationId: createUpload
      parameters:
        - name: Accept-Language
          in: header
          required: false
          description: '`ko`면 메시지를 한국어로 줘요. 기본은 영어예요.'
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUpload'
      responses:
        '201':
          description: 업로드 자리를 만들었어요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadCreated'
        '400':
          description: 요청 내용이 잘못됐어요. `details`에 항목별 문제가 있어요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: API 키가 없거나 잘못됐어요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 이 계정은 아직 API 사용이 승인되지 않았어요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: 요청이나 파일이 너무 커요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: 지원하지 않는 형식이에요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 호출 한도나 동시 실행 한도를 넘었어요. `retry_after_seconds`만큼 기다린 뒤 다시 보내요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    CreateUpload:
      $id: '#/components/schemas/CreateUpload'
      type: object
      properties:
        content_type:
          type: string
          minLength: 1
          description: '`image/png`, `image/jpeg`, `image/webp` 중 하나예요.'
        size:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
          description: 파일 크기(바이트)예요. 20MB까지 올릴 수 있어요.
      required:
        - content_type
        - size
      additionalProperties: false
    UploadCreated:
      $id: '#/components/schemas/UploadCreated'
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        status:
          type: string
          const: pending
        upload_url:
          type: string
          description: 파일을 보낼 주소예요.
        method:
          type: string
          const: PUT
        headers:
          type: object
          properties:
            content-type:
              type: string
            content-length:
              type: string
          required:
            - content-type
            - content-length
          additionalProperties: false
          description: PUT 요청에 그대로 넣어야 하는 헤더예요.
        expires_in_seconds:
          type: number
          description: '`upload_url`을 쓸 수 있는 시간이에요.'
      required:
        - id
        - status
        - upload_url
        - method
        - headers
        - expires_in_seconds
      additionalProperties: false
    Error:
      $id: '#/components/schemas/Error'
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: 프로그램에서 구분할 때 쓰는 값이에요.
            message:
              type: string
              description: '사람이 읽는 설명이에요. 기본은 영어이고 `Accept-Language: ko`면 한국어예요.'
            request_id:
              description: 문의할 때 알려 주세요.
              type:
                - string
                - 'null'
            details:
              description: 항목별 문제처럼 더 자세한 내용이에요. 없으면 null이에요.
            retryable:
              type: boolean
              description: 같은 요청을 다시 보내도 되는지 알려줘요.
            retry_after_seconds:
              description: 이만큼 기다린 뒤 다시 보내요. 없으면 null이에요.
              type:
                - number
                - 'null'
          required:
            - code
            - message
            - request_id
            - details
            - retryable
            - retry_after_seconds
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: zet_live_...
      description: '`Authorization: Bearer <API 키>`'
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: '`x-api-key: <API 키>`. 둘 중 하나만 보내요.'

````

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