---
title: "Import Job"
method: POST
path: "/v2/jobs/import"
tags: ["jobs"]
---

# Import Job

`POST /v2/jobs/import`

## Request

- Base URL: `https://api.hud.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.hud.ai/v2/jobs/import`
- Auth: none declared

Add runs done outside HUD to an imported job, creating the job on first call.

Each trace is linked to its task by content digest and starts running. A
running trace with no span upload for an hour is errored, so add traces as
they are uploaded rather than all at once. Retried traces are reported as
already imported.

## Request body

- JobImportRequest: Runs of a job done outside HUD, imported into the taskset holding their tasks. The job is created by the first call for its `external_id` in the taskset; later calls add traces and leave its fields as they are.
  - `taskset_id` string, uuid, required
  - `external_id` string, required: Identity of the job in the system that ran it, as `<system>:<id>`
  - `name` string, required
  - `group_size` integer: Runs per task
  - `metadata` object
  - `traces` JobImportTrace[], required
    - `external_id` string, required
    - `task_digest` string, required: `content_digest` of the build whose source defines the task the run executed
    - `name` string, nullable
    - `agent` JobImportAgent: The agent that did an imported run.
      - `name` string, required
      - `version` string, nullable
    - `model` string, nullable: Model the run used, as the source reported it. A HUD model id or `model_name` also links the trace to that model.
    - `metadata` object

## Response `200`

Successful Response

- JobImportResponse
  - `job_id` string, uuid, required
  - `status` 'pending' | 'running' | 'completed' | 'error' | 'cancelling' | 'cancelled', required
  - `traces` JobImportTraceResponse[], required
    - `external_id` string, required
    - `trace_id` string, uuid, required
    - `task_version_id` string, uuid, required
    - `status` 'pending' | 'initializing' | 'running' | 'completed' | 'error' | 'cancelling' | 'cancelled', required

## Other responses

- `400`: Invalid or malformed request
- `401`: Missing or invalid credentials
- `403`: Caller may not access this resource
- `404`: Referenced entity does not exist
- `409`: Resource already exists
- `422`: Validation Error
- `429`: Rate limit exceeded; wait at least Retry-After seconds
- `503`: The server is at capacity; retry after Retry-After seconds

## Changes

- **2026-10-09** `76e7e99cfcd1`: 2 info
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
- **2026-10-09** `704a4fe08267`: 1 info
  - the `external_id` request property's minLength was decreased from `1` to `0`
- **2026-10-05** `bfbeea10c39b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hud/apis/hud-platform/changes/v2/jobs/import/post.md)

---

[API](https://skmtc.dev/hud/apis/hud-platform.md) - [All operations](https://skmtc.dev/hud/apis/hud-platform/llms.txt) - [OpenAPI document](https://skmtc.dev/hud/apis/hud-platform/revisions/d642039f5fa6?raw)
