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

# Cancel a solve

> Cancels a pending or solving request and stops its work. A cancelled solve is not charged. Returns 409 if it has already finished.

Cancel an open solve. This changes the solve's state.


## OpenAPI

````yaml https://ninetile.io/openapi.json DELETE /solves/{id}
openapi: 3.1.0
info:
  title: Ninetile API
  version: 1.0.0
  description: >-
    Native Ninetile JSON API. Solve hCaptcha challenges, retrieve solve status,
    report token outcomes, inspect account usage, and recognize hCaptcha image
    challenges. Successful solves and recognitions are charged to the account's
    prepaid USD balance.
servers:
  - url: https://api.ninetile.io/v1
    description: Primary API
  - url: https://api.radiumstore.org/v1
    description: Alternate API host
security:
  - BearerAuth: []
  - ApiKeyHeader: []
tags:
  - name: Solves
    description: Create, inspect, cancel, and report hCaptcha token solves.
  - name: Feedback
    description: Report verdicts for completed solves.
  - name: Account
    description: Inspect account balance, limits, and daily usage.
  - name: Recognition
    description: Recognize hCaptcha image challenges for clients running their own browser.
  - name: Status
    description: Public service liveness.
paths:
  /solves/{id}:
    parameters:
      - $ref: '#/components/parameters/SolveId'
    delete:
      tags:
        - Solves
      summary: Cancel an open solve
      description: >-
        Cancels a pending or solving request and stops its work. A cancelled
        solve is not charged. Returns 409 if it has already finished.
      operationId: cancelSolve
      responses:
        '200':
          description: Solve cancelled.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Solve'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    SolveId:
      name: id
      in: path
      required: true
      description: ID of a solve owned by the authenticated account.
      schema:
        type: string
        pattern: ^solve_
  headers:
    RequestId:
      description: Request identifier for support inquiries.
      schema:
        type: string
        format: uuid
    RetryAfter:
      description: >-
        Seconds to wait before retrying; present when the error asks the client
        to wait.
      schema:
        type: integer
        minimum: 1
  schemas:
    Solve:
      type: object
      required:
        - id
        - object
        - type
        - status
        - sitekey
        - url
        - token
        - user_agent
        - error
        - charged_usd
        - proxy_bytes
        - created_at
        - started_at
        - finished_at
        - queue_ms
        - resolve_ms
        - warnings
      properties:
        id:
          type: string
          pattern: ^solve_
        object:
          const: solve
        type:
          $ref: '#/components/schemas/SolveType'
        status:
          $ref: '#/components/schemas/SolveStatus'
        sitekey:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        token:
          type:
            - string
            - 'null'
          description: >-
            hCaptcha response token when the solve succeeds; otherwise null.
            Token is cleared after 7 days.
        user_agent:
          type:
            - string
            - 'null'
        error:
          oneOf:
            - $ref: '#/components/schemas/SolveFailure'
            - type: 'null'
        charged_usd:
          type:
            - number
            - 'null'
          description: Final charge; null until the solve is final.
        proxy_bytes:
          type: 'null'
          description: Currently always null.
        created_at:
          type: string
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        finished_at:
          type:
            - string
            - 'null'
          format: date-time
        queue_ms:
          type:
            - integer
            - 'null'
        resolve_ms:
          type:
            - integer
            - 'null'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/SolveWarning'
    SolveType:
      type: string
      enum:
        - hcaptcha
        - hcaptcha_enterprise
    SolveStatus:
      type: string
      enum:
        - pending
        - solving
        - solved
        - failed
        - cancelled
        - expired
    SolveFailure:
      type: object
      required:
        - code
        - message
        - reason
        - retryable
        - docs_url
      properties:
        code:
          type: string
          description: Solve failure code.
        message:
          type: string
        reason:
          type:
            - string
            - 'null'
        retryable:
          type: boolean
        docs_url:
          type:
            - string
            - 'null'
          format: uri
    SolveWarning:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - user_agent_not_applied
        message:
          type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - param
            - request_id
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - unauthorized
                - insufficient_credits
                - key_credit_limit_exceeded
                - account_locked
                - forbidden
                - not_eligible
                - not_found
                - conflict
                - payload_too_large
                - unsupported_media_type
                - expired_window
                - recognition_failed
                - validation_error
                - concurrency_limit_exceeded
                - proxy_unavailable
                - rate_capped
                - rate_limited
                - sitekey_rate_limited
                - internal_error
                - maintenance
                - capacity_exhausted
                - proxy_pool_depleted
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            request_id:
              type: string
              format: uuid
  responses:
    Unauthorized:
      description: API key missing, malformed, unknown, or revoked (`unauthorized`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        Account locked or key not permitted to access this endpoint
        (`account_locked`, `forbidden`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource does not exist for this account (`not_found`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: Solve already finished and cannot be cancelled (`conflict`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Unexpected server error (`internal_error`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Ninetile API key, sent as `Authorization: Bearer <key>`. Keys are issued
        in the dashboard.
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternative to the Authorization Bearer header.

````

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