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

# Side-by-side comparison of two of the tenant's jobs

> Compare two jobs side-by-side. Useful for 'did changing the model improve cost?' or 'which run succeeded — the original or the duplicate?'…

Compare two jobs side-by-side.

Useful for 'did changing the model improve cost?' or 'which run
succeeded — the original or the duplicate?'. Surfaces the two jobs'
full status snapshots plus a `deltas` dict highlighting the fields
that actually differ. Both jobs must belong to the calling tenant.

### Query parameters

<ParamField query="a" type="string (uuid)" required>
  UUID of the first job.
</ParamField>

<ParamField query="b" type="string (uuid)" required>
  UUID of the second job.
</ParamField>

### Response

`JobDiffResponse`

<ResponseField name="a" type="JobDiffSide" required>
  <Expandable title="JobDiffSide">
    <ResponseField name="id" type="string" required />

    <ResponseField name="template" type="string" required />

    <ResponseField name="status" type="string" required />

    <ResponseField name="summary" type="string,null" />

    <ResponseField name="error" type="string,null" />

    <ResponseField name="input_tokens" type="integer,null" />

    <ResponseField name="output_tokens" type="integer,null" />

    <ResponseField name="cost_usd" type="number,null" />

    <ResponseField name="duration_seconds" type="number,null">
      updated\_at - created\_at, in seconds. None when not terminal.
    </ResponseField>

    <ResponseField name="model" type="string,null" />

    <ResponseField name="effort" type="string,null" />

    <ResponseField name="agent_mode" type="string" required />

    <ResponseField name="tags" type="string[]" />

    <ResponseField name="instruction_preview" type="string" required>
      First 280 chars of the original instruction.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="b" type="JobDiffSide" required>
  <Expandable title="JobDiffSide">
    <ResponseField name="id" type="string" required />

    <ResponseField name="template" type="string" required />

    <ResponseField name="status" type="string" required />

    <ResponseField name="summary" type="string,null" />

    <ResponseField name="error" type="string,null" />

    <ResponseField name="input_tokens" type="integer,null" />

    <ResponseField name="output_tokens" type="integer,null" />

    <ResponseField name="cost_usd" type="number,null" />

    <ResponseField name="duration_seconds" type="number,null">
      updated\_at - created\_at, in seconds. None when not terminal.
    </ResponseField>

    <ResponseField name="model" type="string,null" />

    <ResponseField name="effort" type="string,null" />

    <ResponseField name="agent_mode" type="string" required />

    <ResponseField name="tags" type="string[]" />

    <ResponseField name="instruction_preview" type="string" required>
      First 280 chars of the original instruction.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="deltas" type="object" required>
  Field-by-field diff summary, e.g. `&#123;'cost_usd': '0.0420 → 0.0085 (-80.95%)'&#125;`. Only fields that actually differ between A and B appear here.
</ResponseField>

<ResponseField name="same" type="string[]" required>
  Field names that matched on both sides — quick visual confirmation.
</ResponseField>

### Status codes

| Code  | Meaning             |
| ----- | ------------------- |
| `200` | Successful Response |
| `422` | Validation Error    |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.computer.stateset.app/api/v1/jobs/diff' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "a": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "template": "string",
      "status": "pending",
      "summary": "Two-person tent, green — replacement for damaged pole set.",
      "error": "string",
      "input_tokens": 1,
      "output_tokens": 1,
      "cost_usd": 1.5,
      "duration_seconds": 7.5,
      "model": "string",
      "effort": "string",
      "agent_mode": "string",
      "tags": [
        "priority"
      ],
      "instruction_preview": "string"
    },
    "b": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "template": "string",
      "status": "pending",
      "summary": "Two-person tent, green — replacement for damaged pole set.",
      "error": "string",
      "input_tokens": 1,
      "output_tokens": 1,
      "cost_usd": 1.5,
      "duration_seconds": 7.5,
      "model": "string",
      "effort": "string",
      "agent_mode": "string",
      "tags": [
        "priority"
      ],
      "instruction_preview": "string"
    },
    "deltas": {},
    "same": [
      "string"
    ]
  }
  ```
</ResponseExample>
