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

# Benchmark Spec



## OpenAPI

````yaml /openapi.json get /api/v1/benchmarks/{bench_id}/spec
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
servers:
  - url: https://api.trajectory.ai
security: []
paths:
  /api/v1/benchmarks/{bench_id}/spec:
    get:
      tags:
        - benchmarks
      summary: Benchmark Spec
      operationId: getBenchmarkSpec
      parameters:
        - name: bench_id
          in: path
          required: true
          schema:
            type: string
            title: Bench Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkSpecResponse'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
components:
  schemas:
    BenchmarkSpecResponse:
      properties:
        bench_id:
          type: string
          title: Bench Id
        task_count:
          type: integer
          title: Task Count
        tasks:
          items:
            $ref: '#/components/schemas/BenchmarkSpecTask'
          type: array
          title: Tasks
        tools:
          items:
            $ref: '#/components/schemas/BenchmarkSpecTool'
          type: array
          title: Tools
      type: object
      required:
        - bench_id
        - task_count
      title: BenchmarkSpecResponse
    BenchmarkSpecTask:
      properties:
        task_id:
          type: string
          title: Task Id
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        split:
          anyOf:
            - $ref: '#/components/schemas/TaskSplit'
            - type: 'null'
        input_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Message
        task_category:
          anyOf:
            - $ref: '#/components/schemas/BenchmarkTaskCategory'
            - type: 'null'
      type: object
      required:
        - task_id
      title: BenchmarkSpecTask
    BenchmarkSpecTool:
      properties:
        tool_id:
          type: string
          title: Tool Id
        name:
          type: string
          title: Name
      type: object
      required:
        - tool_id
        - name
      title: BenchmarkSpecTool
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    TaskSplit:
      type: string
      enum:
        - train
        - test
      title: TaskSplit
    BenchmarkTaskCategory:
      properties:
        task_category_id:
          type: string
          title: Task Category Id
        label:
          type: string
          title: Label
      type: object
      required:
        - task_category_id
        - label
      title: BenchmarkTaskCategory
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          title: Code
          type: string
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string

````