> ## 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.

# 작업 취소

> 시작하기 전이면 취소하고 금액을 돌려드려요. 이미 시작했다면 409예요. 다시 호출해도 괜찮아요.



## OpenAPI

````yaml /openapi.json post /generations/{id}/cancel
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:
  /generations/{id}/cancel:
    post:
      tags:
        - 생성
      summary: 작업 취소
      description: 시작하기 전이면 취소하고 금액을 돌려드려요. 이미 시작했다면 409예요. 다시 호출해도 괜찮아요.
      operationId: cancelGeneration
      parameters:
        - name: id
          in: path
          required: true
          description: 작업 ID예요.
          schema:
            type: string
        - name: Accept-Language
          in: header
          required: false
          description: '`ko`면 메시지를 한국어로 줘요. 기본은 영어예요.'
          schema:
            type: string
      responses:
        '200':
          description: 취소한 작업이에요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Generation'
        '401':
          description: API 키가 없거나 잘못됐어요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 이 계정은 아직 API 사용이 승인되지 않았어요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 찾을 수 없어요. 다른 고객사의 항목도 404예요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 지금 상태에서는 처리할 수 없어요. `error.code`를 확인해 주세요.
          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:
    Generation:
      $id: '#/components/schemas/Generation'
      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
          enum:
            - queued
            - running
            - succeeded
            - failed
            - canceled
        terminal:
          type: boolean
          description: true면 더 바뀌지 않아요. 이때 조회를 멈추면 돼요.
        model:
          type: string
        model_name:
          type: string
        modality:
          type: string
          enum:
            - image
            - video
            - remix
        prompt:
          description: 삭제한 작업은 null이에요.
          type:
            - string
            - 'null'
        params:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
          description: 실제로 적용한 옵션이에요. 기본값도 들어 있어요.
        price_usd:
          type: string
          pattern: ^\d+\.\d{4}$
          description: 달러 금액이에요. 오차가 없도록 소수 넷째 자리까지 쓴 문자열로 줘요.
        created_at:
          type: string
          description: ISO 8601 시각이에요.
        deleted_at:
          anyOf:
            - type: string
              description: ISO 8601 시각이에요.
            - type: 'null'
          description: 삭제한 시각이에요. 삭제 전에는 null이에요.
        error:
          anyOf:
            - type: object
              properties:
                code:
                  type: string
                  description: >-
                    `content_rejected`면 내용을 바꿔야 하고, `generation_failed`면 그대로 다시
                    시도해도 돼요.
                message:
                  type: string
              required:
                - code
                - message
              additionalProperties: false
            - type: 'null'
          description: '`failed`일 때만 있어요. 금액은 돌려드려요.'
        outputs:
          type: array
          items:
            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)$
                description: 다음 작업의 입력으로 쓸 수 있어요.
              kind:
                type: string
                enum:
                  - image
                  - video
                  - audio
              url:
                type: string
                description: 로그인 없이 열리는 주소예요.
              mime_type:
                type:
                  - string
                  - 'null'
              width:
                type:
                  - number
                  - 'null'
              height:
                type:
                  - number
                  - 'null'
            required:
              - id
              - kind
              - url
              - mime_type
              - width
              - height
            additionalProperties: false
      required:
        - id
        - status
        - terminal
        - model
        - model_name
        - modality
        - prompt
        - params
        - price_usd
        - created_at
        - deleted_at
        - error
        - outputs
      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.