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

# Cancel a benchmark

> Runs not started yet never start; runs going are stopped and restore their hosts before they report `cancelled`. A benchmark that has ended is 409.



## OpenAPI

````yaml /0.17/openapi.json post /api/v1/benchmarks/{id}/cancel
openapi: 3.0.3
info:
  title: 2501 Public API
  version: v1
  description: >-
    The stable, versioned HTTP API for driving 2501 as code. See the API
    Overview for authentication, the org_id rule, cursor pagination, and the
    error envelope.
servers:
  - url: https://{command_center_host}
    variables:
      command_center_host:
        default: your-command-center-host
        description: Your Command Center host
security:
  - bearerAuth: []
paths:
  /api/v1/benchmarks/{id}/cancel:
    post:
      tags:
        - Benchmarks
      summary: Cancel a benchmark
      description: >-
        Runs not started yet never start; runs going are stopped and restore
        their hosts before they report `cancelled`. A benchmark that has ended
        is 409.
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: The benchmark
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Benchmark'
        '401':
          description: >-
            No credentials, or a key that is invalid, revoked, or expired
            (UNAUTHORIZED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Authenticated but not allowed (FORBIDDEN, ORG_ACCESS_DENIED,
            STEP_UP_REFUSED, TWO_FACTOR_ENROLLMENT_REQUIRED,
            LICENSE_CAP_REACHED, LICENSE_EXPIRED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such row that this caller can see (NOT_FOUND)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The write conflicts with existing data (CONFLICT, DUPLICATE_KEY,
            FOREIGN_KEY_VIOLATION, RESOURCE_IN_USE)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Benchmark:
      type: object
      properties:
        id:
          type: string
          example: bch_0f4a6d1b-...
        status:
          type: string
          enum:
            - queued
            - running
            - completed
            - failed
            - cancelled
        scenarios:
          type: array
          items:
            type: string
          description: The titles of the scenarios it ran, as they were at launch
        total:
          type: integer
        completed:
          type: integer
        passed:
          type: integer
          description: Runs graded passed so far
        mode:
          type: string
          nullable: true
        source:
          type: string
          nullable: true
        branch:
          type: string
          nullable: true
        main_engine:
          type: string
          nullable: true
        secondary_engine:
          type: string
          nullable: true
        gateway_engine:
          type: string
          nullable: true
        gateway:
          type: string
          example: runner
        model_config:
          nullable: true
          description: The models resolved for each agent at launch
        triggered_by:
          type: string
          nullable: true
        errors:
          nullable: true
        org_id:
          type: string
          example: org_460b541c-...
        tenant_id:
          type: string
          example: ten_115bea44-...
        started_at:
          type: string
          nullable: true
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        completed_at:
          type: string
          nullable: true
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        created_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
      required:
        - id
        - status
        - scenarios
        - total
        - completed
        - passed
        - mode
        - source
        - branch
        - main_engine
        - secondary_engine
        - gateway_engine
        - gateway
        - triggered_by
        - org_id
        - tenant_id
        - started_at
        - completed_at
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        code:
          type: string
          example: VALIDATION_FAILED
        message:
          type: string
          example: Validation failed
        request_id:
          type: string
          example: req_3702b7e7-...
        field:
          type: string
          description: Set when one input is at fault
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
          description: Set when several inputs are at fault
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - message
        - request_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key minted in Command Center (Settings -> API Keys), sent as
        `Authorization: Bearer 2501_ak_...`. A Command Center session cookie is
        also accepted.

````

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