Create a sample run
POST
/v1/algorithms/sample-runscurl -X POST 'https://api.embodiflow.io/v1/algorithms/sample-runs' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"source": "string",
"algorithmVersion": {
"algorithmId": "00000000-0000-0000-0000-000000000000",
"version": "string"
},
"inputs": {
"recordingId": "00000000-0000-0000-0000-000000000000",
"episode": {
"recordingId": "00000000-0000-0000-0000-000000000000",
"index": 0
},
"versionId": "00000000-0000-0000-0000-000000000000"
},
"window": {},
"params": {}
}'认证
每个请求都需要携带个人访问令牌(PAT)。
- Authorization: Bearer PAT
请求头参数
- Idempotency-Keystring
Optional idempotency key, at most 255 characters (UUIDv4 recommended). A repeated key returns the first response byte-for-byte, including a 5xx. The same key with a different body, or a second in-flight request, returns 409 IDEMPOTENCY_CONFLICT. Keys are unique per tenant and retained for 24 hours.
请求体
Content-Typeapplication/json
- sourcestring | null
- algorithmVersionobject | null
- algorithmIdstring (uuid)必填
- versionstring必填
- inputsobject必填
- recordingIdstring (uuid) | null
- episodeobject | null
- versionIdstring (uuid) | null
- windowobject | null
- paramsobject | null
响应
Run accepted; poll GET for state
- dataobject必填
- idstring必填
- statestring必填可选值queuedrunningsucceededfailedtimed_out
- recordingIdsarray<string>必填
- inputKindstring必填可选值metadata_onlyrecording_filesversion_files
- inputBytesnumber | null必填
- deadlineSecondsnumber必填
- createdAtstring必填
- startedAtstring | null必填
- finishedAtstring | null必填
- resultobject必填
响应示例
{
"data": {
"id": "string",
"state": "queued",
"recordingIds": [
"string"
],
"inputKind": "metadata_only",
"inputBytes": 0,
"deadlineSeconds": 0,
"createdAt": "string",
"startedAt": "string",
"finishedAt": "string",
"result": {
"state": "succeeded",
"durationMs": 0,
"logs": "string",
"logsTruncated": false,
"outputs": [
{
"name": "string",
"type": "string",
"summary": "string"
}
],
"preview": {
"contract": "embodiflow-sample-preview/v1",
"category": "export",
"window": {
"startS": 0,
"endS": 0
},
"outcome": "succeeded",
"series": [
{
"name": "string",
"type": "string",
"unit": "string",
"columns": [],
"t": [],
"y": [],
"rows": 0
}
],
"recordingValues": [
{
"name": "string",
"type": "string"
}
],
"episodeValues": [
{
"name": "string",
"type": "string",
"values": []
}
],
"checks": [
{
"id": "string",
"title": "string",
"status": "warn",
"value": 0,
"threshold": 0,
"message": "string",
"at": {},
"episodeIndex": 0
}
],
"episodes": [
{
"index": 0,
"startS": 0,
"endS": 0,
"task": "string",
"labels": {},
"confidence": 0
}
],
"selection": {
"kept": 0,
"dropped": 0,
"items": [
{}
]
},
"canonical": {
"ok": false,
"issues": [
{}
]
},
"artifact": {
"format": "string",
"files": [
{}
],
"summary": {}
},
"logs": "string",
"errors": [
{
"code": "string",
"message": "string",
"file": "string",
"line": 0
}
]
},
"error": {
"code": "string",
"message": "string"
}
}
}
}服务器https://api.embodiflow.io/v1https://api.embodiflow.dev/v1