Quote a build
OpenAPI contract
- Method
- POST
- Path
/api/v1/billing/quote- Security
- jwtBearer (bearer)
- Response status
- 200 400 401 403 429 500
Request and response schemas
JSON
{
"requestBody": {
"application/json": {
"$ref": "#/components/schemas/QuoteRequest"
}
},
"responses": {
"200": {
"description": "Build quote",
"content": {
"application/json": {
"$ref": "#/components/schemas/BuildQuote"
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}POST /api/v1/billing/quote is JWT-only. Send optional features, platforms, inputBytes, and methodCountHint; null or negative numeric hints become 0, and strings are trimmed. The response gives the estimated NCU, current balance, affordability, and cost-line breakdown. A quote does not reserve credits.
The earlier quote is advisory. At build submission, the service recalculates a quote from the uploaded file and the final parsed platforms and features, then holds that submission-time amount. Completion reconciles the hold to the actual charge, capped at the held amount. A failure before Phase 2 receives a full hold refund; a later failure is prorated by the reached compilation phase and the unused portion is returned as BUILD_REFUND.
http
POST /api/v1/billing/quote
Authorization: Bearer <access token>
Content-Type: application/json
{"features":"native-llvm-direct-call","platforms":"windows-x86_64","inputBytes":1048576,"methodCountHint":12}