job_id), poll the job, then download its artifacts.
Upload a model
Models are uploaded to R2 with a presigned PUT. Ask for a grant, thenPUT the file bytes to the returned URL.
PUT the file to upload_url, then reference it in a job as r2://<object_key>. Single uploads are limited to 5 GB. Calibration images are uploaded the same way.
Submit a job
Jobs acceptr2://<key> model references and always return 202 with a job_id.
Both
quantize and qat are asynchronous: they return a job_id immediately, since a run can take longer than an HTTP client’s timeout. Poll the job for progress and the result.Poll a job
status moves through pending, running, then a terminal completed or error. On completed, result carries the deliverable metadata; on error, an error object with a code and message.
Download artifacts
Once a job iscompleted, request presigned download URLs for its artifacts.
url (presigned GET). The bundle contains the quantized ONNX model and r3alai_manifest.json.
Delete a job
404 if the id does not exist.
Usage and plan
quantize or qat job consumes one run; a run beyond your quota fails with 402 plan_limit_reached (see Errors).
Method field
method applies to POST /v1/quantize only:
ptq_static(default): requirescalibration_data(a list of uploaded image refs).ptq_dynamic: no calibration data needed; it quantizes MatMul and Gemm layers, so it suits MatMul-heavy models rather than convolution-heavy backbones.
wbit, abit, epochs) go on POST /v1/qat. See the Python SDK for the field-level reference; only the transport differs.
