Bandwise docs
API reference

Question sets

Available from Phases 3 to 4b

The HTTP API is not live yet. These endpoints are the planned contract, generated from the same schema the server will use. Paths and fields can still change before they ship.
POST/api/v1/sets/{ref}/run

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Query Parameters

channel?string

Value in

  • "production"
  • "staging"

Header Parameters

Idempotency-Key?string

Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.

Length1 <= length
Bandwise-Interface?integer

The interface major the caller was built against. A different live major returns 409 interface_mismatch.

Range0 <= value

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/sets/string/run" \  -H "Content-Type: application/json" \  -d '{    "state": "string"  }'
{  "runId": "78c33d18-170c-44d3-a227-b3194f134f73",  "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3",  "version": 1,  "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",  "interfaceMajor": 0,  "interfaceHash": "string",  "channel": "production",  "rollout": "inactive",  "experiment": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "arm": "champion"  },  "status": "ok",  "error": {    "code": "invalid_state",    "message": "string"  },  "modelRequested": "string",  "modelResolved": "string",  "typesafeRequestId": "string",  "stages": [    {      "id": "string",      "skipped": true,      "calls": [        {          "modelResolved": "string",          "provider": "typesafe",          "providerCostUsd": 0,          "typesafeRequestId": "string",          "inputTokens": 0,          "outputTokens": 0,          "latencyMs": 0        }      ]    }  ],  "checks": {    "property1": true,    "property2": true  },  "answers": {    "property1": {      "type": "noul",      "noul": 0,      "property1": null,      "property2": null    },    "property2": {      "type": "noul",      "noul": 0,      "property1": null,      "property2": null    }  },  "decisions": {    "property1": {      "kind": "question",      "value": "string",      "band": "high",      "level": "high",      "relevant": true,      "action": "auto",      "effectiveAction": "auto",      "executed": true,      "escalation": {        "model": "string",        "value": "string",        "costUsd": 0,        "status": "ok",        "error": "string"      },      "fallbackRunId": "47fc17e3-c2d5-4271-a546-fe240e29fda1"    },    "property2": {      "kind": "question",      "value": "string",      "band": "high",      "level": "high",      "relevant": true,      "action": "auto",      "effectiveAction": "auto",      "executed": true,      "escalation": {        "model": "string",        "value": "string",        "costUsd": 0,        "status": "ok",        "error": "string"      },      "fallbackRunId": "47fc17e3-c2d5-4271-a546-fe240e29fda1"    }  },  "runBand": "high",  "overallAction": "auto",  "route": "string",  "cost": {    "systemOneInputTokens": 0,    "systemOneOutputTokens": 0,    "systemOneCostUsd": 0,    "counterfactualInputTokens": 0,    "counterfactualOutputTokens": 0,    "counterfactualLlmCostUsd": 0,    "comparatorModel": "string",    "counterfactualMode": "one_call",    "savingsUsd": 0,    "savingsKind": "decision",    "savingsSuppressed": "shadow",    "llmCallsAvoided": 0,    "contextTokensPruned": -9007199254740991,    "escalationCostUsd": 0,    "llmCallsMade": 0,    "estimated": true,    "latencyMs": 0  },  "reviewItemIds": [    "ee8896de-a7f2-4bf6-bb6d-9d5061803553"  ],  "warnings": [    "string"  ]}
GET/api/v1/sets/{ref}/manifest

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/sets/string/manifest"
{  "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3",  "slug": "string",  "version": 1,  "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",  "channel": "production",  "model": "string",  "interfaceMajor": 0,  "interfaceHash": "string",  "inputSchema": {    "property1": "string",    "property2": "string"  },  "questions": [    {      "id": "string",      "type": "noul",      "label": "string",      "description": "string",      "options": [        "string"      ],      "levels": 1    }  ],  "composites": [    "string"  ],  "routeOutputs": [    "string"  ],  "actions": [    "auto"  ]}
GET/api/v1/sets

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Length1 <= length

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/sets"
{  "data": [    null  ],  "nextCursor": "string"}
POST/api/v1/sets

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Header Parameters

Idempotency-Key?string

Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/sets" \  -H "Content-Type: application/json" \  -d '{    "slug": "string",    "name": "string",    "goalId": "eca7991a-9711-43cb-a95b-b261e3bcd08e"  }'
null
GET/api/v1/sets/{ref}

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/sets/string"
null
PATCH/api/v1/sets/{ref}

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Header Parameters

Idempotency-Key?string

Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/sets/string" \  -H "Content-Type: application/json" \  -d '{}'
null

Archive a set.

POST/api/v1/sets/{ref}/archive

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Header Parameters

Idempotency-Key?string

Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.

Length1 <= length

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/sets/string/archive"
null
POST/api/v1/sets/{ref}/publish

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Query Parameters

dryRun?boolean

Preview: run the checks and return a DryRunResult. Writes nothing.

Header Parameters

Idempotency-Key?string

Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.

Length1 <= length
If-Match*string

The draft ETag (its spec_hash).

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/sets/string/publish" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "channel": "production",    "changelog": "string"  }'
{  "version": 1,  "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",  "experimentId": "7cb83992-f615-4081-9f22-54e0b618e006"}
POST/api/v1/sets/{ref}/compare

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Header Parameters

Idempotency-Key?string

Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/sets/string/compare" \  -H "Content-Type: application/json" \  -d '{    "from": "draft",    "to": "draft"  }'
{  "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",  "evalRunId": "48c66916-3a2f-4912-aef2-bb48b65d9a07"}
POST/api/v1/sets/{ref}/improve

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Header Parameters

Idempotency-Key?string

Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/sets/string/improve" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{  "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",  "evalRunId": "48c66916-3a2f-4912-aef2-bb48b65d9a07"}
POST/api/v1/sets/{ref}/try-model

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Query Parameters

dryRun?boolean

Preview: run the checks and return a DryRunResult. Writes nothing.

Header Parameters

Idempotency-Key?string

Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/sets/string/try-model" \  -H "Content-Type: application/json" \  -d '{    "model": "string"  }'
{  "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",  "evalRunId": "48c66916-3a2f-4912-aef2-bb48b65d9a07"}
GET/api/v1/sets/{ref}/codegen

Authorization

AuthorizationBearer <token>

An app token (sk_live_, sk_test_, pk_live_), a browser token (a 5-minute ES256 JWT) or an agent token (sa_live_).

In: header

Path Parameters

ref*string
Length1 <= length

Query Parameters

lang*string

Value in

  • "ts"
  • "py"
channel?string

Value in

  • "production"
  • "staging"
version?integer
Range0 < value <= 9007199254740991
appId?string
Formatuuid
target?string

Value in

  • "managed_typed"
  • "standalone"

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/sets/string/codegen?lang=ts"
null

Bandwise is an independent product built on TypeSafe's System One models. It is not TypeSafe's documentation. For the System One models themselves, see docs.typesafe.ai.