Start a run
curl --request POST \
--url https://api.aireserve.com/v1/training/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"costAcknowledged": true,
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"quoteId": "<string>",
"name": "<string>",
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 16
},
"maxCostUsd": 50000,
"providerParameters": {}
}
'import requests
url = "https://api.aireserve.com/v1/training/jobs"
payload = {
"costAcknowledged": True,
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"quoteId": "<string>",
"name": "<string>",
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 16
},
"maxCostUsd": 50000,
"providerParameters": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
costAcknowledged: true,
datasetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
baseModel: '<string>',
quoteId: '<string>',
name: '<string>',
hyperparameters: {epochs: 3, learningRate: 0.0001, batchSize: 16, maxSeqLen: 4096, loraRank: 16},
maxCostUsd: 50000,
providerParameters: {}
})
};
fetch('https://api.aireserve.com/v1/training/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"method": "lora",
"serving": "serverless",
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 64
},
"maxCostUsd": "<string>",
"state": "pending",
"backend": "<string>",
"estimatedCostUsd": "<string>",
"estimatedMinutes": 123,
"actualCostUsd": "<string>",
"trainedTokens": 123,
"chargeState": "none",
"modelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"createdAt": "<string>",
"startedAt": "<string>",
"completedAt": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}Fine-tuning
Start a run
Starts a run from a quoteId (priced fields fixed) or the full request with name and maxCostUsd. The estimate is reserved from the wallet, settled when the run succeeds and released if it fails or is cancelled. Requires compute manage access.
POST
/
v1
/
training
/
jobs
Start a run
curl --request POST \
--url https://api.aireserve.com/v1/training/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"costAcknowledged": true,
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"quoteId": "<string>",
"name": "<string>",
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 16
},
"maxCostUsd": 50000,
"providerParameters": {}
}
'import requests
url = "https://api.aireserve.com/v1/training/jobs"
payload = {
"costAcknowledged": True,
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"quoteId": "<string>",
"name": "<string>",
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 16
},
"maxCostUsd": 50000,
"providerParameters": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
costAcknowledged: true,
datasetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
baseModel: '<string>',
quoteId: '<string>',
name: '<string>',
hyperparameters: {epochs: 3, learningRate: 0.0001, batchSize: 16, maxSeqLen: 4096, loraRank: 16},
maxCostUsd: 50000,
providerParameters: {}
})
};
fetch('https://api.aireserve.com/v1/training/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"method": "lora",
"serving": "serverless",
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 64
},
"maxCostUsd": "<string>",
"state": "pending",
"backend": "<string>",
"estimatedCostUsd": "<string>",
"estimatedMinutes": 123,
"actualCostUsd": "<string>",
"trainedTokens": 123,
"chargeState": "none",
"modelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"createdAt": "<string>",
"startedAt": "<string>",
"completedAt": "<string>"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": null,
"code": "<string>",
"details": {}
}
}Authorizations
bearerAuthapiKeyAuth
Your AI Reserve API key (aireserve_api_…) from the API Keys page in the portal (https://portal.aireserve.com/keys).
Headers
Client-chosen key of 8–180 characters [A-Za-z0-9:_-]. Replaying it returns the same run.
Required string length:
8 - 180Pattern:
^[A-Za-z0-9:_-]+$Body
application/json
Available options:
true Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Required string length:
1 - 200Available options:
lora, full Available options:
serverless, dedicated, download Required string length:
16 - 8192Required string length:
1 - 120Show child attributes
Show child attributes
Required range:
0 <= x <= 100000Show child attributes
Show child attributes
Response
Accepted.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Available options:
lora, full Available options:
serverless, dedicated, download Show child attributes
Show child attributes
Available options:
pending, submitting, queued, running, succeeded, failed, cancelling, cancelled Where the run executed, once started. A fact about the run, never an input.
Available options:
none, pending, settled, released, failed Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$