Quote a model file
Uploads a model file, creates a quote and waits for the price. Slicing is automatic and usually takes seconds to a few minutes. Before your account is approved, quotes are limited per round and per day; get_integrator_onboarding shows the allowance.
What you need
- file_namestringRequired
Name of the model file, for example
bracket.stl. - content_typestringRequired
MIME type of the file, for example
model/stl,model/3mformodel/step. - size_bytesintegerRequired
Size of the file in bytes, up to 250 MiB.
- namestring
A name for the quote; defaults to the file name.
Step 1: Start a file upload
Reserve an upload for the model file. Then send the file bytes to upload_url with the returned method and headers. That transfer goes straight to storage, not to this API, so it is not a step here; do it before the next step.
{
"purpose": "quote_file",
"file_name": "$inputs.file_name",
"content_type": "$inputs.content_type",
"size_bytes": "$inputs.size_bytes"
}Succeeds when:
$statusCode == 201
Keeps for the next steps:
upload_id:$response.body#/id
Step 2: Quote a model file
Start pricing. upload_limit_reached (409) means this round is used up: request approval next. approval_in_review (409) means quoting resumes after the review. daily_quote_limit_reached (429) resets at midnight UTC.
{
"file": {
"upload": "$steps.upload_model.outputs.upload_id"
},
"name": "$inputs.name"
}Succeeds when:
$statusCode == 201
Otherwise:
quota_or_review: stop the workflow when$statusCode == 409.daily_quote_limit_reached: stop the workflow when$statusCode == 429.
Keeps for the next steps:
quote_id:$response.body#/id
Step 3: Get a quote
Poll the quote every few seconds until status is ready (it has a price) or failed (failure_reason says why; a failed quote is given back to your allowance).
{
"path id": "$steps.create_quote.outputs.quote_id"
}Succeeds when:
$statusCode == 200$response.body#/status == 'ready'
Otherwise:
still_processing: retry after 5 seconds, at most 120 times, when$response.body#/status == 'processing'.quote_failed: stop the workflow when$response.body#/status == 'failed'.
Keeps for the next steps:
status:$response.body#/statusprice:$response.body#/pricefailure_reason:$response.body#/failure_reason
As a workflow file
The workflow returns:
quote_id:$steps.create_quote.outputs.quote_idprice:$steps.wait_for_price.outputs.price
Values starting with $ are filled in as you go: $inputs.x is something you provide, $steps.s.outputs.o is a value an earlier step returned, and $response.body#/path a field of this response.
This recipe is the workflow quote_model_file of arazzo.json, an Arazzo 1.0 document that tools and AI agents can follow step by step.