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

# 대기열 비우기

> 계정의 대기 중인 태스크를 모두 취소합니다.

`X-Latency-Ms`는 API 서버가 이 HTTP 요청을 처리한 시간(ms)입니다. 네트워크 전송 시간과 비동기 태스크의 완료 시간은 포함하지 않습니다.

실행 중인 태스크는 계속 실행되고, 끝난 태스크는 그대로 조회할 수 있으며, 모니터 실행은 건드리지 않습니다. 취소된 태스크는 `TASK_CANCELLED`와 함께 `FAILED`로 끝나고 webhook이 전송됩니다. 대기 중인 태스크는 크레딧을 보류하지 않고 동시 실행 한도의 자리도 쓰지 않으므로 과금되지 않습니다. 상위 계정 키는 하위 계정의 대기 태스크도 취소하고, 하위 계정 키는 자기 태스크만 취소합니다. 한 번의 호출은 최대 20초 동안 처리합니다. `queued`가 0보다 크면 다시 호출하세요.


## OpenAPI

````yaml DELETE /v1/async/queue
openapi: 3.1.0
info:
  title: querying.ai
  description: >-
    One API for every AI answer engine. Every task is asynchronous: submit, then
    collect the result via webhook or polling.
  version: 1.0.0
servers:
  - url: https://api.querying.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/async/queue:
    delete:
      tags:
        - Operations
      summary: Clear queue
      description: >-
        Cancels every queued task of your account, and of its sub-accounts when
        the key is the parent account's, including tasks waiting for room under
        your concurrency limit. Running tasks keep running, finished tasks stay
        readable, and monitor runs are left alone. Each cancelled task ends as
        `FAILED` with `TASK_CANCELLED`: its held credits come back, it stops
        counting against your concurrency limit, and its webhook is sent. One
        call works for up to 20 seconds; `queued` is what is still waiting, so
        call again while it is above 0.
      operationId: clearQueue
      responses:
        '200':
          description: The queued tasks this call cancelled, and those still waiting.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - cleared
                  - queued
                properties:
                  success:
                    type: boolean
                  cleared:
                    type: integer
                    description: Queued tasks this call cancelled.
                  queued:
                    type: integer
                    description: >-
                      Queued tasks left when the call ran out of time. 0 when
                      the queue is empty.
              example:
                success: true
                cleared: 42
                queued: 0
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: MISSING_API_KEY
              message: Missing or invalid API key
              timestamp: '2026-07-09T04:12:00.000Z'
  schemas:
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable, safe to branch on. See the Errors guide for the full list.
        message:
          type: string
          description: For humans. May change.
        details:
          description: >-
            Context for the error. An array of `{field, message}` on most
            `VALIDATION_ERROR`s; an object elsewhere (for example `{id}` on
            `RESOURCE_NOT_FOUND`, `retryAfterSec` on 429 and 503 codes). Omitted
            when there is nothing to add.
          oneOf:
            - type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
            - type: object
              additionalProperties: true
        timestamp:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key, sent as `Authorization: Bearer <key>`.'

````

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