Question sets
Available from Phases 3 to 4b
/api/v1/sets/{ref}/runAn 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
1 <= lengthQuery Parameters
Value in
- "production"
- "staging"
Header Parameters
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthThe interface major the caller was built against. A different live major returns 409 interface_mismatch.
0 <= valueRequest 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" ]}/api/v1/sets/{ref}/manifestAn 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
1 <= lengthResponse 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" ]}/api/v1/setsAn 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
1 <= value <= 200501 <= lengthResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/sets"{ "data": [ null ], "nextCursor": "string"}/api/v1/setsAn 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
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthRequest 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/api/v1/sets/{ref}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
1 <= lengthResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/sets/string"null/api/v1/sets/{ref}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
1 <= lengthHeader Parameters
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthRequest 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/api/v1/sets/{ref}/archiveAn 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
1 <= lengthHeader Parameters
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthResponse Body
application/json
application/json
curl -X POST "https://example.com/api/v1/sets/string/archive"null/api/v1/sets/{ref}/publishAn 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
1 <= lengthQuery Parameters
Preview: run the checks and return a DryRunResult. Writes nothing.
Header Parameters
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthThe draft ETag (its spec_hash).
1 <= lengthRequest 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"}/api/v1/sets/{ref}/compareAn 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
1 <= lengthHeader Parameters
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthRequest 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"}/api/v1/sets/{ref}/improveAn 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
1 <= lengthHeader Parameters
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthRequest 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"}/api/v1/sets/{ref}/try-modelAn 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
1 <= lengthQuery Parameters
Preview: run the checks and return a DryRunResult. Writes nothing.
Header Parameters
Required for app and agent tokens on mutations. A replay within 24 hours returns the stored response.
1 <= lengthRequest 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"}/api/v1/sets/{ref}/codegenAn 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
1 <= lengthQuery Parameters
Value in
- "ts"
- "py"
Value in
- "production"
- "staging"
0 < value <= 9007199254740991uuidValue in
- "managed_typed"
- "standalone"
Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/sets/string/codegen?lang=ts"nullBandwise 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.