Trajectory Diagnostics API

The diagnostics API from Trajectory — 5 operation(s) for diagnostics.

Operations 5

POST /api/v1/diagnostics/task/ingest Ingest Task For Diagnostics #
POST /api/v1/diagnostics/task/run Start Task Diagnostics #
POST /api/v1/diagnostics/benchmark/run Start Benchmark Diagnostics #
GET /api/v1/diagnostics/{benchmark_diagnostic_id}/status Get Benchmark Diagnostics Status #
GET /api/v1/diagnostics/{benchmark_diagnostic_id} Get Benchmark Diagnostics #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trajectory:trajectory-diagnostics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

trajectory-diagnostics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Trajectory Diagnostics API
  version: 0.1.0
  x-trajectory-api-version: '2026-10-14'
  description: This contract is API version 2026-10-14. The optional Trajectory-API-Version header pins it, and tmp-contract is accepted as an alias. Requests without the header get this version. Version 2026-10-07 and the pre-launch legacy response formats are retired.
tags:
- name: Diagnostics
paths:
  /api/v1/diagnostics/task/ingest:
    post:
      tags:
      - Diagnostics
      summary: Ingest Task For Diagnostics
      description: Register one task as a private benchmark and return its ingestion result. Call buildBenchmarkImages, poll every page of listBenchmarkImages until each image is ready, then call startTaskDiagnostics with the returned bench_id.
      operationId: ingestTaskForDiagnostics
      parameters:
      - name: agent_id
        in: query
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^agt_[a-z0-9]+$
          title: Agent Id
      - name: bench_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            pattern: ^bm_[a-z0-9]+$
          - type: 'null'
          title: Bench Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskSpec'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestBenchmarkResponse'
      x-trajectory-visibility: public
      x-trajectory-root-body-parameter: task
  /api/v1/diagnostics/task/run:
    post:
      tags:
      - Diagnostics
      summary: Start Task Diagnostics
      description: Start diagnostics for up to 10 tasks in an existing benchmark after its images are ready.
      operationId: startTaskDiagnostics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartBenchmarkDiagnosticsRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartBenchmarkDiagnosticsResponse'
      x-trajectory-visibility: public
  /api/v1/diagnostics/benchmark/run:
    post:
      tags:
      - Diagnostics
      summary: Start Benchmark Diagnostics
      description: Start diagnostics for an existing benchmark after its images are ready. Defaults to Nemotron 3.5 Lightning.
      operationId: startBenchmarkDiagnostics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartBenchmarkDiagnosticsRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartBenchmarkDiagnosticsResponse'
      x-trajectory-visibility: public
  /api/v1/diagnostics/{benchmark_diagnostic_id}/status:
    get:
      tags:
      - Diagnostics
      summary: Get Benchmark Diagnostics Status
      description: Poll the status of a benchmark diagnostic.
      operationId: getBenchmarkDiagnosticsStatus
      parameters:
      - name: benchmark_diagnostic_id
        in: path
        required: true
        schema:
          type: string
          title: Benchmark Diagnostic Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkDiagnosticStatusResponse'
      x-trajectory-visibility: public
  /api/v1/diagnostics/{benchmark_diagnostic_id}:
    get:
      tags:
      - Diagnostics
      summary: Get Benchmark Diagnostics
      description: Get task outcomes and failure reasons after a benchmark diagnostic finishes.
      operationId: getBenchmarkDiagnostics
      parameters:
      - name: benchmark_diagnostic_id
        in: path
        required: true
        schema:
          type: string
          title: Benchmark Diagnostic Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkDiagnosticsResponse'
      x-trajectory-visibility: public
components:
  schemas:
    TaskSpec:
      properties:
        name:
          type: string
          title: Name
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        split:
          anyOf:
          - $ref: '#/components/schemas/TaskSplit'
          - type: 'null'
        input_messages:
          items:
            $ref: '#/components/schemas/BenchmarkMessage'
          type: array
          title: Input Messages
          description: Messages stored on the task. For SDK evaluation and training, your agent script must pass messages to the model; this field does not do that automatically.
        reference_trajectory_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Reference Trajectory Id
        image:
          type: 'null'
          title: Image
        runtime:
          anyOf:
          - $ref: '#/components/schemas/RuntimeSpec'
          - type: 'null'
        run_command:
          type: string
          title: Run Command
          description: For SDK evaluation and training, the command to run your agent in the sandbox, e.g. `python /app/agent.py`; include the executable, not only its arguments. Your script must call the model, run any tools, log a reward, and finalize the trajectory before exiting.
        env_vars:
          additionalProperties:
            anyOf:
            - type: string
            - $ref: '#/components/schemas/SecretRef'
          type: object
          title: Env Vars
          description: Keys must match [A-Za-z_][A-Za-z0-9_]* and cannot start with TRAJECTORY_ or use MODEL_ENDPOINT_ID, MODEL_ENDPOINT_ACCESS_TOKEN, or MODEL_ENDPOINT_URL.
        env_resources:
          $ref: '#/components/schemas/EnvResources'
        spec:
          additionalProperties: true
          type: object
          title: Spec
        task_spec_uri:
          anyOf:
          - type: string
          - type: 'null'
          title: Task Spec Uri
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Up to 20 distinct, non-empty task tags of at most 64 characters each.
      additionalProperties: false
      type: object
      required:
      - name
      - run_command
      title: TaskSpec
    ToolResponseMetadata:
      properties:
        generated_tool_info:
          anyOf:
          - $ref: '#/components/schemas/GeneratedToolInfo'
          - type: 'null'
      additionalProperties: false
      type: object
      title: ToolResponseMetadata
    IngestBenchmarkResponse:
      properties:
        bench_id:
          type: string
          title: Bench Id
        name:
          type: string
          title: Name
        family:
          anyOf:
          - type: string
          - type: 'null'
          title: Family
        task_count:
          type: integer
          title: Task Count
        failed_tasks:
          items:
            $ref: '#/components/schemas/BenchmarkTaskWriteFailure'
          type: array
          title: Failed Tasks
        warnings:
          items:
            type: string
          type: array
          title: Warnings
          description: Provider resource adjustments made before ingestion.
      type: object
      required:
      - bench_id
      - name
      - task_count
      title: IngestBenchmarkResponse
    BaseModelSlug:
      type: string
      enum:
      - thinkingmachines/Inkling-Small
      - Qwen/Qwen3.5-4B
      - Qwen/Qwen3.5-397B-A17B
      - Qwen/Qwen3.6-35B-A3B
      - Qwen/Qwen3.8-27B
      - qwen/qwen3-235b-a22b
      - nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16
      - nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16
      - nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16
      - nvidia/NVIDIA-Nemotron-3.5-Super-120B-A12B-BF16
      - openai/gpt-6.1-sol
      - openai/gpt-6-sol
      - openai/gpt-6-astra
      - openai/gpt-5.6-sol
      - openai/gpt-5.6-luna
      - anthropic/claude-opus-5.5
      - anthropic/claude-sonnet-5.5
      - openai/gpt-5-mini
      - openai/gpt-5.4-mini
      - openai/gpt-5.5
      - anthropic/claude-sonnet-4.6
      - google/gemini-3.1-pro-preview
      - z-ai/glm-5.3
      - z-ai/glm-5.3-flash
      - moonshotai/kimi-k3
      title: BaseModelSlug
    ToolResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        arguments:
          additionalProperties: true
          type: object
          title: Arguments
        response:
          title: Response
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
        raw_name_args:
          anyOf:
          - type: string
          - type: 'null'
          title: Raw Name Args
        metadata:
          anyOf:
          - $ref: '#/components/schemas/ToolResponseMetadata'
          - type: 'null'
        duration_seconds:
          anyOf:
          - type: number
          - type: 'null'
          title: Duration Seconds
        is_env_done:
          type: boolean
          title: Is Env Done
          default: false
      additionalProperties: false
      type: object
      required:
      - id
      - name
      - arguments
      title: ToolResponse
    McpServerSpec:
      properties:
        name:
          type: string
          title: Name
        transport:
          type: string
          enum:
          - sse
          - streamable-http
          - stdio
          title: Transport
          default: sse
        url:
          anyOf:
          - type: string
          - type: 'null'
          title: Url
        command:
          anyOf:
          - type: string
          - type: 'null'
          title: Command
        args:
          items:
            type: string
          type: array
          title: Args
      additionalProperties: false
      type: object
      required:
      - name
      title: McpServerSpec
    TaskSplit:
      type: string
      enum:
      - train
      - test
      title: TaskSplit
    MessageUsage:
      properties:
        prompt_tokens:
          type: integer
          title: Prompt Tokens
          default: 0
        completion_tokens:
          type: integer
          title: Completion Tokens
          default: 0
        total_tokens:
          type: integer
          title: Total Tokens
          default: 0
      additionalProperties: false
      type: object
      title: MessageUsage
    EnvResources:
      properties:
        docker_engine:
          type: boolean
          title: Docker Engine
          description: Require a Docker-capable sandbox. The user image must provide Docker and the harness; the harness owns nested containers and grading.
          default: false
        cpus:
          anyOf:
          - type: number
          - type: 'null'
          title: Cpus
        memory_mb:
          anyOf:
          - type: integer
          - type: 'null'
          title: Memory Mb
        gpus:
          type: integer
          title: Gpus
          default: 0
        network_mode:
          $ref: '#/components/schemas/NetworkMode'
          default: no-network
        allowed_hosts:
          items:
            type: string
          type: array
          title: Allowed Hosts
        agent_user:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent User
        env:
          additionalProperties:
            type: string
          type: object
          title: Env
        setup_commands:
          items:
            items:
              type: string
            type: array
          type: array
          title: Setup Commands
        mcp_servers:
          items:
            $ref: '#/components/schemas/McpServerSpec'
          type: array
          title: Mcp Servers
        allow_internet:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Allow Internet
      additionalProperties: false
      type: object
      title: EnvResources
    GeneratedToolInfo:
      properties:
        provider:
          type: string
          title: Provider
        model:
          type: string
          title: Model
        messages:
          items:
            $ref: '#/components/schemas/BenchmarkMessage'
          type: array
          title: Messages
      additionalProperties: false
      type: object
      required:
      - provider
      - model
      - messages
      title: GeneratedToolInfo
    ImageSpec:
      properties:
        dockerfile_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Dockerfile Path
        image_ref:
          anyOf:
          - type: string
          - type: 'null'
          title: Image Ref
      additionalProperties: false
      type: object
      title: ImageSpec
    ToolDefinition:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        parameters:
          additionalProperties: true
          type: object
          title: Parameters
      additionalProperties: false
      type: object
      required:
      - name
      - description
      - parameters
      title: ToolDefinition
    ToolCall:
      properties:
        name:
          type: string
          title: Name
        arguments:
          additionalProperties: true
          type: object
          title: Arguments
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        raw_string:
          anyOf:
          - type: string
          - type: 'null'
          title: Raw String
        argument_encoding:
          type: string
          enum:
          - json
          - xml
          title: Argument Encoding
          default: json
        is_parsed_successfully:
          type: boolean
          title: Is Parsed Successfully
          default: true
        parser_error_msg:
          anyOf:
          - type: string
          - type: 'null'
          title: Parser Error Msg
      additionalProperties: false
      type: object
      required:
      - name
      - arguments
      title: ToolCall
    BenchmarkMessage:
      properties:
        role:
          type: string
          title: Role
        content:
          anyOf:
          - type: string
          - type: 'null'
          title: Content
        tool_calls:
          items:
            $ref: '#/components/schemas/ToolCall'
          type: array
          title: Tool Calls
        tool_response:
          anyOf:
          - $ref: '#/components/schemas/ToolResponse'
          - type: 'null'
        tool_definitions:
          items:
            $ref: '#/components/schemas/ToolDefinition'
          type: array
          title: Tool Definitions
        usage:
          anyOf:
          - $ref: '#/components/schemas/MessageUsage'
          - type: 'null'
        finish_reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Finish Reason
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
        reasoning:
          anyOf:
          - type: string
          - type: 'null'
          title: Reasoning
        reasoning_details:
          title: Reasoning Details
        tokens:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Tokens
        token_masks:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Token Masks
        logprobs:
          anyOf:
          - items:
              type: number
            type: array
          - type: 'null'
          title: Logprobs
        trainable_status:
          type: string
          enum:
          - trainable
          - not_trainable
          - superseded
          - summarization_boundary
          title: Trainable Status
          default: not_trainable
      additionalProperties: false
      type: object
      required:
      - role
      title: BenchmarkMessage
    BenchmarkDiagnosticTask:
      properties:
        task_id:
          type: string
          title: Task Id
        runtime_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Runtime Id
        status:
          type: string
          enum:
          - pending
          - running
          - completed
          - failed
          - cancelled
          title: Status
        failure:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Failure
          description: Failure for this task, including rollout details when available.
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        started_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Started At
        completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Completed At
      type: object
      required:
      - task_id
      - runtime_id
      - status
      - failure
      - created_at
      - updated_at
      - started_at
      - completed_at
      title: BenchmarkDiagnosticTask
    BenchmarkDiagnosticsResponse:
      properties:
        benchmark_diagnostic_id:
          type: string
          title: Benchmark Diagnostic Id
        bench_id:
          type: string
          title: Bench Id
        eval_run_id:
          type: string
          title: Eval Run Id
        base_model_slug:
          type: string
          title: Base Model Slug
          description: Model used for the diagnostic run.
        status:
          type: string
          enum:
          - completed
          - failed
          - cancelled
          title: Status
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        started_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Started At
        completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Completed At
        failure:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Failure
          description: Run-wide failure summary; task errors appear on tasks.
        task_counts:
          $ref: '#/components/schemas/BenchmarkDiagnosticTaskCounts'
          description: Number of tasks by final status.
        tasks:
          items:
            $ref: '#/components/schemas/BenchmarkDiagnosticTask'
          type: array
          title: Tasks
      type: object
      required:
      - benchmark_diagnostic_id
      - bench_id
      - eval_run_id
      - base_model_slug
      - status
      - created_at
      - updated_at
      - started_at
      - completed_at
      - failure
      - task_counts
      - tasks
      title: BenchmarkDiagnosticsResponse
    BenchmarkDiagnosticStatusResponse:
      properties:
        benchmark_diagnostic_id:
          type: string
          title: Benchmark Diagnostic Id
        status:
          type: string
          enum:
          - pending
          - running
          - completed
          - failed
          - cancelled
          title: Status
      type: object
      required:
      - benchmark_diagnostic_id
      - status
      title: BenchmarkDiagnosticStatusResponse
    BenchmarkDiagnosticTaskCounts:
      properties:
        completed:
          type: integer
          title: Completed
        failed:
          type: integer
          title: Failed
        cancelled:
          type: integer
          title: Cancelled
      type: object
      required:
      - completed
      - failed
      - cancelled
      title: BenchmarkDiagnosticTaskCounts
    StartBenchmarkDiagnosticsRequest:
      properties:
        bench_id:
          type: string
          title: Bench Id
        base_model_slug:
          $ref: '#/components/schemas/BaseModelSlug'
          default: nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16
      additionalProperties: false
      type: object
      required:
      - bench_id
      title: StartBenchmarkDiagnosticsRequest
    SecretRef:
      properties:
        secret_ref:
          type: string
          title: Secret Ref
          description: Organization secret name. The containing env_vars key names the runtime variable.
      additionalProperties: false
      type: object
      required:
      - secret_ref
      title: SecretRef
    RuntimeSpec:
      properties:
        runtime_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Runtime Id
        source:
          anyOf:
          - $ref: '#/components/schemas/ImageSpec'
          - type: 'null'
      additionalProperties: false
      type: object
      title: RuntimeSpec
    NetworkMode:
      type: string
      enum:
      - no-network
      - public
      - allowlist
      title: NetworkMode
    BenchmarkTaskWriteFailure:
      properties:
        task_id:
          type: string
          title: Task Id
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
        error:
          type: string
          title: Error
      type: object
      required:
      - task_id
      - error
      title: BenchmarkTaskWriteFailure
      description: A task that did not land; its siblings did, so the bench is short exactly these.
    StartBenchmarkDiagnosticsResponse:
      properties:
        benchmark_diagnostic_id:
          type: string
          title: Benchmark Diagnostic Id
        bench_id:
          type: string
          title: Bench Id
        status:
          type: string
          const: pending
          title: Status
      type: object
      required:
      - benchmark_diagnostic_id
      - bench_id
      - status
      title: StartBenchmarkDiagnosticsResponse
  securitySchemes:
    TrajectoryAccessToken:
      type: http
      description: Short-lived token scoped to one rollout trajectory
      scheme: bearer
    InferenceAuthorization:
      type: http
      scheme: bearer