Trajectory Krun API

The krun API from Trajectory — 4 operation(s) for krun.

Operations 4

GET /api/v1/krun/jobs List Krun Jobs #
GET /api/v1/krun/pools List Krun Pools #
POST /api/v1/krun/jobs/{job_name}/cancel Cancel Krun Job #
POST /api/v1/experiments/{xid}/cancel Cancel Experiment #

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-krun-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-krun-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Trajectory Krun 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: krun
paths:
  /api/v1/krun/jobs:
    get:
      tags:
      - krun
      summary: List Krun Jobs
      operationId: listKrunJobs
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KrunJobsResponse'
      x-trajectory-visibility: browser
  /api/v1/krun/pools:
    get:
      tags:
      - krun
      summary: List Krun Pools
      operationId: listKrunPools
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KrunPoolsResponse'
      x-trajectory-visibility: browser
  /api/v1/krun/jobs/{job_name}/cancel:
    post:
      tags:
      - krun
      summary: Cancel Krun Job
      operationId: cancelKrunJob
      parameters:
      - name: job_name
        in: path
        required: true
        schema:
          type: string
          title: Job Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelKrunJobResponse'
      x-trajectory-visibility: browser
  /api/v1/experiments/{xid}/cancel:
    post:
      tags:
      - krun
      summary: Cancel Experiment
      operationId: cancelExperiment
      parameters:
      - name: xid
        in: path
        required: true
        schema:
          type: string
          title: Xid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelExperimentResponse'
      x-trajectory-visibility: browser
components:
  schemas:
    KrunPoolNode:
      properties:
        name:
          type: string
          title: Name
        node_pool:
          anyOf:
          - type: string
          - type: 'null'
          title: Node Pool
        machine_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Machine Type
        ready:
          type: boolean
          title: Ready
        unschedulable:
          type: boolean
          title: Unschedulable
        cpu_allocatable_millis:
          type: number
          title: Cpu Allocatable Millis
        cpu_requested_millis:
          type: number
          title: Cpu Requested Millis
        memory_allocatable_bytes:
          type: number
          title: Memory Allocatable Bytes
        memory_requested_bytes:
          type: number
          title: Memory Requested Bytes
        pod_count:
          type: integer
          title: Pod Count
        created_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Created At
        pods:
          items:
            $ref: '#/components/schemas/KrunPoolPod'
          type: array
          title: Pods
      type: object
      required:
      - name
      - node_pool
      - machine_type
      - ready
      - unschedulable
      - cpu_allocatable_millis
      - cpu_requested_millis
      - memory_allocatable_bytes
      - memory_requested_bytes
      - pod_count
      - created_at
      - pods
      title: KrunPoolNode
    KrunJobsResponse:
      properties:
        jobs:
          items:
            $ref: '#/components/schemas/KrunJob'
          type: array
          title: Jobs
        environment:
          type: string
          enum:
          - production
          - staging
          title: Environment
        count:
          type: integer
          title: Count
        cluster_profile:
          type: string
          title: Cluster Profile
        cluster:
          type: string
          title: Cluster
        namespace:
          type: string
          title: Namespace
        timestamp:
          type: string
          title: Timestamp
      type: object
      required:
      - jobs
      - environment
      - count
      - cluster_profile
      - cluster
      - namespace
      - timestamp
      title: KrunJobsResponse
    KrunPoolPod:
      properties:
        name:
          type: string
          title: Name
        namespace:
          type: string
          title: Namespace
        xid:
          anyOf:
          - type: string
          - type: 'null'
          title: Xid
        experiment:
          anyOf:
          - type: string
          - type: 'null'
          title: Experiment
        phase:
          anyOf:
          - type: string
          - type: 'null'
          title: Phase
        cpu_requested_millis:
          type: number
          title: Cpu Requested Millis
        memory_requested_bytes:
          type: number
          title: Memory Requested Bytes
      type: object
      required:
      - name
      - namespace
      - xid
      - experiment
      - phase
      - cpu_requested_millis
      - memory_requested_bytes
      title: KrunPoolPod
    KrunPool:
      properties:
        compute_class:
          type: string
          title: Compute Class
        nodes:
          items:
            $ref: '#/components/schemas/KrunPoolNode'
          type: array
          title: Nodes
        pending_pod_count:
          type: integer
          title: Pending Pod Count
      type: object
      required:
      - compute_class
      - nodes
      - pending_pod_count
      title: KrunPool
    CancelJobError:
      properties:
        job:
          type: string
          title: Job
        error:
          type: string
          title: Error
      type: object
      required:
      - job
      - error
      title: CancelJobError
    KrunPoolsResponse:
      properties:
        pools:
          items:
            $ref: '#/components/schemas/KrunPool'
          type: array
          title: Pools
        cluster:
          type: string
          title: Cluster
        timestamp:
          type: string
          title: Timestamp
      type: object
      required:
      - pools
      - cluster
      - timestamp
      title: KrunPoolsResponse
    KrunJob:
      properties:
        job_name:
          type: string
          title: Job Name
        namespace:
          type: string
          title: Namespace
        xid:
          anyOf:
          - type: string
          - type: 'null'
          title: Xid
        experiment:
          anyOf:
          - type: string
          - type: 'null'
          title: Experiment
        status:
          type: string
          enum:
          - running
          - pending
          - succeeded
          - failed
          - unknown
          title: Status
        reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Reason
        created_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Created At
        started_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Started At
        age_seconds:
          anyOf:
          - type: integer
          - type: 'null'
          title: Age Seconds
        active:
          type: integer
          title: Active
        succeeded:
          type: integer
          title: Succeeded
        failed:
          type: integer
          title: Failed
        pod_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Pod Name
        pod_phase:
          anyOf:
          - type: string
          - type: 'null'
          title: Pod Phase
        node_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Node Name
        user:
          anyOf:
          - type: string
          - type: 'null'
          title: User
        experiment_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Experiment Name
        git_sha:
          anyOf:
          - type: string
          - type: 'null'
          title: Git Sha
        wandb_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Wandb Url
        aim_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Aim Url
        tempo_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Tempo Url
        pyroscope_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Pyroscope Url
        logging_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Logging Url
        firestore_status:
          anyOf:
          - type: string
          - type: 'null'
          title: Firestore Status
        firestore_created_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Firestore Created At
        job_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Job Type
        training_backend_mode:
          anyOf:
          - type: string
          - type: 'null'
          title: Training Backend Mode
        cost_status:
          anyOf:
          - type: string
            enum:
            - pending
            - succeeded
            - failed
          - type: 'null'
          title: Cost Status
        cost_total_usd:
          anyOf:
          - type: number
          - type: 'null'
          title: Cost Total Usd
        cost_breakdown:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Cost Breakdown
      type: object
      required:
      - job_name
      - namespace
      - xid
      - experiment
      - status
      - reason
      - created_at
      - started_at
      - age_seconds
      - active
      - succeeded
      - failed
      - pod_name
      - pod_phase
      - node_name
      - user
      title: KrunJob
      description: A live xm-runner Kubernetes Job, enriched with its experiment row when one is visible.
    CancelExperimentResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        xid:
          type: string
          title: Xid
        killed:
          items:
            type: string
          type: array
          title: Killed
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/CancelJobError'
            type: array
          - type: 'null'
          title: Errors
      type: object
      required:
      - success
      - message
      - xid
      - killed
      title: CancelExperimentResponse
    CancelKrunJobResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        job_name:
          type: string
          title: Job Name
        killed:
          items:
            type: string
          type: array
          title: Killed
      type: object
      required:
      - success
      - message
      - job_name
      - killed
      title: CancelKrunJobResponse
  securitySchemes:
    TrajectoryAccessToken:
      type: http
      description: Short-lived token scoped to one rollout trajectory
      scheme: bearer
    InferenceAuthorization:
      type: http
      scheme: bearer