Extend a live session's provider lease.
curl --request POST \
--url http://localhost:3001/v1/training/sessions/{session_id}/heartbeat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>"
}
'import requests
url = "http://localhost:3001/v1/training/sessions/{session_id}/heartbeat"
payload = { "request_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({request_id: '<string>'})
};
fetch('http://localhost:3001/v1/training/sessions/{session_id}/heartbeat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"status": "provisioning",
"provider": "modal",
"funding_source": "platform",
"lease_epoch": 1,
"lease_expires_at": "2023-11-07T05:31:56Z",
"max_cost_microusd": 123,
"error_code": "<string>",
"capability": {
"provider": "modal",
"models": [
"<string>"
],
"operations": [
"<string>"
],
"sampler_operations": [
"<string>"
],
"resource_profiles": {},
"billing_snapshot": {}
},
"capability_snapshot": {
"provider": "modal",
"models": [
"<string>"
],
"operations": [
"<string>"
],
"sampler_operations": [
"<string>"
],
"resource_profiles": {},
"billing_snapshot": {}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"request_id": "<string>",
"funding_source": "platform"
}unified-training
Extend a live session's provider lease.
POST
/
v1
/
training
/
sessions
/
{session_id}
/
heartbeat
Extend a live session's provider lease.
curl --request POST \
--url http://localhost:3001/v1/training/sessions/{session_id}/heartbeat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>"
}
'import requests
url = "http://localhost:3001/v1/training/sessions/{session_id}/heartbeat"
payload = { "request_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({request_id: '<string>'})
};
fetch('http://localhost:3001/v1/training/sessions/{session_id}/heartbeat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"status": "provisioning",
"provider": "modal",
"funding_source": "platform",
"lease_epoch": 1,
"lease_expires_at": "2023-11-07T05:31:56Z",
"max_cost_microusd": 123,
"error_code": "<string>",
"capability": {
"provider": "modal",
"models": [
"<string>"
],
"operations": [
"<string>"
],
"sampler_operations": [
"<string>"
],
"resource_profiles": {},
"billing_snapshot": {}
},
"capability_snapshot": {
"provider": "modal",
"models": [
"<string>"
],
"operations": [
"<string>"
],
"sampler_operations": [
"<string>"
],
"resource_profiles": {},
"billing_snapshot": {}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"request_id": "<string>",
"funding_source": "platform"
}Authorizations
Whitney-issued API key. No organization-selection header is accepted.
Path Parameters
Pattern:
^wts_[0-9a-f]{32}$Body
application/json
Required string length:
1 - 200Response
The session after the lease heartbeat.
Pattern:
^wts_[0-9a-f]{32}$Available options:
provisioning, ready, failed, closing, closed, interrupted, timed_out Available options:
modal, tinker Available options:
platform, byok Required range:
x >= 0Show child attributes
Show child attributes
Show child attributes
Show child attributes
