# List the agents and models a run can use

- **OpenAPI Version:** `3.2.0`
- **API Version:** `3.1.0`
- **Contact:** Syndai <https://syndai.ai>

## Contents

**Operations**

- [GET /api/v1/external/coding/catalog](#scalar-operation-get-apiv1externalcodingcatalog)

**Schemas**

- [HarnessCatalogResponse](#scalar-schema-harnesscatalogresponse)
- [CatalogAutoRead](#scalar-schema-catalogautoread)
- [EconomyResponse](#scalar-schema-economyresponse)
- [EconomyModelDTO](#scalar-schema-economymodeldto)
- [CatalogHarnessRead](#scalar-schema-catalogharnessread)
- [CatalogModelRead](#scalar-schema-catalogmodelread)
- [ProblemDetail](#scalar-schema-problemdetail)
- [ExternalErrorCode](#scalar-schema-externalerrorcode)

<a id="scalar-context-global-servers"></a>

## Servers

- **URL:** `https://api.syndai.ai`

<a id="scalar-context-global-authentication"></a>

## Authentication

- **CustomerApiKey**: HTTP bearer (`API Key`)

  Customer API key sent as a bearer token

## Tags

### Policy

Workspace-wide run defaults: validation, review gates, autonomy and budget. Read the JSON Schema a policy must match and the current defaults, list earlier versions, or replace them; a run's own `policy_config` overrides them for that run.

## Operations

<a id="scalar-operation-get-apiv1externalcodingcatalog"></a>

### List the agents and models a run can use

- **Method:** `GET`
- **Path:** `/api/v1/external/coding/catalog`
- **Operation ID:** `getHarnessCatalog`
- **Tags:** Policy

Every agent a run can name in `policy_config.harness.kind`, whether this workspace can run it (and the one connection that would change that), who pays for it, every model each agent can run here for `policy_config.harness.model`, what Auto resolves to right now, and whether Economy is available. Models are read live from the OpenRouter account that serves this workspace's runs, so a listed model is reachable; they are ranked by coding score. `?harness=` keeps only that agent's models; an unknown agent is a 400. A signed-in person must be the workspace owner. Requires the `coding:runs:create` scope.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Query parameters

- **`harness`**: `string | null`
- **`customer_id`**: `string | null`, format: `uuid`

#### Responses

##### 200 Request fulfilled, document follows

**Headers:**

- **`cache-control`**

  `string`

**Content type:** `application/json`

[HarnessCatalogResponse](#scalar-schema-harnesscatalogresponse)

<a id="scalar-example-1"></a>

**Generated example:**

```json
{
  "auto": {
    "harness": "",
    "harness_label": "",
    "model": "",
    "model_label": "",
    "paid_by": "",
    "plan": ""
  },
  "economy": {
    "available": true,
    "default_coding_score": 1,
    "model": {
      "coding_score": 1,
      "context_length": 1,
      "id": "",
      "name": ""
    },
    "reason": ""
  },
  "harnesses": [
    {
      "action": "",
      "available": true,
      "kind": "",
      "label": "",
      "paid_by": "",
      "plan": ""
    }
  ],
  "models": [
    {
      "coding_score": 1,
      "context_window": 1,
      "harnesses": [
        ""
      ],
      "id": "",
      "label": "",
      "price_in_per_mtok": 1,
      "price_out_per_mtok": 1,
      "vendor": ""
    }
  ]
}
```

##### 400, 401, 403, 404

- `400` Bad request syntax or unsupported method
- `401` Invalid or missing customer API key
- `403` Insufficient scope or forbidden customer access
- `404` Resource not found

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

<a id="scalar-example-2"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

##### 429 Rate limit exceeded

**Headers:**

- **`Retry-After`**

  Seconds to wait before retrying the request

  `integer`

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

[Generated example](#scalar-example-2)

##### default Unexpected error

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

<a id="scalar-example-3"></a>

**Generated example:**

```json
null
```

## Schemas

<a id="scalar-schema-harnesscatalogresponse"></a>

### HarnessCatalogResponse

**Type:** `object`

- **`auto` (required)**: [CatalogAutoRead](#scalar-schema-catalogautoread)
- **`economy` (required)**: [EconomyResponse](#scalar-schema-economyresponse)
- **`harnesses` (required)**: array of [CatalogHarnessRead](#scalar-schema-catalogharnessread)
- **`models` (required)**: array of [CatalogModelRead](#scalar-schema-catalogmodelread)

<a id="scalar-example-4"></a>

**Generated example:**

```json
{
  "auto": {
    "harness": "",
    "harness_label": "",
    "model": "",
    "model_label": "",
    "paid_by": "",
    "plan": ""
  },
  "economy": {
    "available": true,
    "default_coding_score": 1,
    "model": {
      "coding_score": 1,
      "context_length": 1,
      "id": "",
      "name": ""
    },
    "reason": ""
  },
  "harnesses": [
    {
      "action": "",
      "available": true,
      "kind": "",
      "label": "",
      "paid_by": "",
      "plan": ""
    }
  ],
  "models": [
    {
      "coding_score": 1,
      "context_window": 1,
      "harnesses": [
        ""
      ],
      "id": "",
      "label": "",
      "price_in_per_mtok": 1,
      "price_out_per_mtok": 1,
      "vendor": ""
    }
  ]
}
```

<a id="scalar-schema-catalogautoread"></a>

### CatalogAutoRead

**Type:** `object`

- **`harness` (required)**: `string`
- **`harness_label` (required)**: `string`
- **`paid_by` (required)**: `string`
- **`model`**: `string | null`
- **`model_label`**: `string | null`
- **`plan`**: `string | null`

<a id="scalar-example-5"></a>

**Generated example:**

```json
{
  "harness": "",
  "harness_label": "",
  "model": "",
  "model_label": "",
  "paid_by": "",
  "plan": ""
}
```

<a id="scalar-schema-economyresponse"></a>

### EconomyResponse

**Type:** `object`

- **`available` (required)**: `boolean`
- **`default_coding_score`**: `number | null`
- **`model`**: [EconomyModelDTO](#scalar-schema-economymodeldto) | `null`
- **`reason`**: `string | null`

<a id="scalar-example-6"></a>

**Generated example:**

```json
{
  "available": true,
  "default_coding_score": 1,
  "model": {
    "coding_score": 1,
    "context_length": 1,
    "id": "",
    "name": ""
  },
  "reason": ""
}
```

<a id="scalar-schema-economymodeldto"></a>

### EconomyModelDTO

**Type:** `object`

- **`context_length` (required)**: `integer`
- **`id` (required)**: `string`
- **`name` (required)**: `string`
- **`coding_score`**: `number | null`

<a id="scalar-example-7"></a>

**Generated example:**

```json
{
  "coding_score": 1,
  "context_length": 1,
  "id": "",
  "name": ""
}
```

<a id="scalar-schema-catalogharnessread"></a>

### CatalogHarnessRead

**Type:** `object`

- **`available` (required)**: `boolean`
- **`kind` (required)**: `string`
- **`label` (required)**: `string`
- **`paid_by` (required)**: `string`
- **`action`**: `string | null`
- **`plan`**: `string | null`

<a id="scalar-example-8"></a>

**Generated example:**

```json
{
  "action": "",
  "available": true,
  "kind": "",
  "label": "",
  "paid_by": "",
  "plan": ""
}
```

<a id="scalar-schema-catalogmodelread"></a>

### CatalogModelRead

**Type:** `object`

- **`harnesses` (required)**: `array of string`
- **`id` (required)**: `string`
- **`label` (required)**: `string`
- **`vendor` (required)**: `string`
- **`coding_score`**: `number | null`
- **`context_window`**: `integer | null`
- **`price_in_per_mtok`**: `number | null`
- **`price_out_per_mtok`**: `number | null`

<a id="scalar-example-9"></a>

**Generated example:**

```json
{
  "coding_score": 1,
  "context_window": 1,
  "harnesses": [
    ""
  ],
  "id": "",
  "label": "",
  "price_in_per_mtok": 1,
  "price_out_per_mtok": 1,
  "vendor": ""
}
```

<a id="scalar-schema-problemdetail"></a>

### ProblemDetail

**Type:** `object`

RFC 7807 problem detail returned for public CaaS errors.

- **`code` (required)**: `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "INSUFFICIENT_CREDITS", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "REPO_ARCHIVED", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "PUBLISH_TAG_EXISTS", "PUBLISH_VERSION_EXISTS", "VERSION_NOT_DEPLOYED", "DATA_REFUSED", "HARNESS_MODEL_UNSUPPORTED", "ECONOMY_CONFLICTS_WITH_MODEL", "HARNESS_UNKNOWN", "INTERNAL_ERROR"`

  Stable error codes surfaced to public CaaS clients.
- **`status` (required)**: `integer`
- **`title` (required)**: `string`
- **`detail`**: `string | null`, default: `null`
- **`existing_run_id`**: `string | null`, default: `null`
- **`instance`**: `string | null`, default: `null`
- **`type`**: `string`, default: `"about:blank"`

<a id="scalar-example-10"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

<a id="scalar-schema-externalerrorcode"></a>

### ExternalErrorCode

**Type:** `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "INSUFFICIENT_CREDITS", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "REPO_ARCHIVED", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "PUBLISH_TAG_EXISTS", "PUBLISH_VERSION_EXISTS", "VERSION_NOT_DEPLOYED", "DATA_REFUSED", "HARNESS_MODEL_UNSUPPORTED", "ECONOMY_CONFLICTS_WITH_MODEL", "HARNESS_UNKNOWN", "INTERNAL_ERROR"`

Stable error codes surfaced to public CaaS clients.
