Quote a run
curl --request POST \
--url https://api.aireserve.com/v1/training/jobs/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"maxCostUsd": 50000,
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 16
},
"providerParameters": {}
}
'import requests
url = "https://api.aireserve.com/v1/training/jobs/quote"
payload = {
"name": "<string>",
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"maxCostUsd": 50000,
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 16
},
"providerParameters": {}
}
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({
name: '<string>',
datasetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
baseModel: '<string>',
maxCostUsd: 50000,
hyperparameters: {epochs: 3, learningRate: 0.0001, batchSize: 16, maxSeqLen: 4096, loraRank: 16},
providerParameters: {}
})
};
fetch('https://api.aireserve.com/v1/training/jobs/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"quoteId": "<string>",
"expiresAt": "<string>",
"baseModel": "<string>",
"method": "lora",
"serving": "serverless",
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"estimatedTokens": 123,
"estimatedCostUsd": "<string>",
"estimatedMinutes": 123,
"servingPrice": {
"kind": "serverless",
"usdPerMillionInputTokens": 123,
"usdPerMillionOutputTokens": 123
},
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 64
},
"adjustments": [
{
"field": "batchSize",
"from": 123,
"to": 123,
"reason": "<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
Quote a run
Prices a fine-tuning request from the validated token count and your choices (base, method, serving, ceiling). Answers a signed quoteId to start from, or 409 no_placement with what would work. Requires compute read access.
POST
/
v1
/
training
/
jobs
/
quote
Quote a run
curl --request POST \
--url https://api.aireserve.com/v1/training/jobs/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"maxCostUsd": 50000,
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 16
},
"providerParameters": {}
}
'import requests
url = "https://api.aireserve.com/v1/training/jobs/quote"
payload = {
"name": "<string>",
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseModel": "<string>",
"maxCostUsd": 50000,
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 16
},
"providerParameters": {}
}
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({
name: '<string>',
datasetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
baseModel: '<string>',
maxCostUsd: 50000,
hyperparameters: {epochs: 3, learningRate: 0.0001, batchSize: 16, maxSeqLen: 4096, loraRank: 16},
providerParameters: {}
})
};
fetch('https://api.aireserve.com/v1/training/jobs/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"quoteId": "<string>",
"expiresAt": "<string>",
"baseModel": "<string>",
"method": "lora",
"serving": "serverless",
"datasetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"estimatedTokens": 123,
"estimatedCostUsd": "<string>",
"estimatedMinutes": 123,
"servingPrice": {
"kind": "serverless",
"usdPerMillionInputTokens": 123,
"usdPerMillionOutputTokens": 123
},
"hyperparameters": {
"epochs": 3,
"learningRate": 0.0001,
"batchSize": 16,
"maxSeqLen": 4096,
"loraRank": 64
},
"adjustments": [
{
"field": "batchSize",
"from": 123,
"to": 123,
"reason": "<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).
Body
application/json
Required string length:
1 - 120Pattern:
^([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 range:
0 <= x <= 100000Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
Signed quote; pass it to POST /v1/training/jobs within 120 seconds.
Available options:
lora, full Available options:
serverless, dedicated, download 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)$- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
As they will be submitted: the request's values clamped into the placed backend's range.
Show child attributes
Show child attributes
Every hyperparameter placement changed to fit the backend's published range, with the reason.
Show child attributes
Show child attributes