Download result
Download the result of a completed conversion as a ZIP archive.
| Method | GET |
| Path | /api/conversions/:id/result |
| Returns | streaming application/zip |
Query parameters
Section titled “Query parameters”| Param | Values | Default | Notes |
|---|---|---|---|
format | usd · mjcf · all | all | usd = USD + textures only. mjcf = MuJoCo XML package. all = both. |
Examples
Section titled “Examples”curl -L "https://api.rigyd.com/api/conversions/abc123.../result?format=usd" \ -H "Authorization: Bearer rgyd_live_..." \ -o simready.zipimport fs from 'node:fs';import { Readable } from 'node:stream';
const res = await fetch( `https://api.rigyd.com/api/conversions/${jobId}/result?format=usd`, { headers: { Authorization: `Bearer ${process.env.RIGYD_API_KEY}` } },);if (!res.ok) throw new Error(`HTTP ${res.status}`);await new Promise((resolve, reject) => { Readable.fromWeb(res.body) .pipe(fs.createWriteStream('simready.zip')) .on('finish', resolve).on('error', reject);});import os, requests
with requests.get( f"https://api.rigyd.com/api/conversions/{job_id}/result", headers={"Authorization": f"Bearer {os.environ['RIGYD_API_KEY']}"}, params={"format": "usd"}, stream=True,) as res: res.raise_for_status() with open("simready.zip", "wb") as out: for chunk in res.iter_content(chunk_size=1024 * 1024): out.write(chunk)ZIP contents
Section titled “ZIP contents”format | Contents |
|---|---|
usd | *.usd + *.png / *.jpg textures referenced by it |
mjcf | MuJoCo *.xml + meshes + textures |
all | Both, in separate sub-directories |
Errors specific to this endpoint
Section titled “Errors specific to this endpoint”| Status | Body | When |
|---|---|---|
400 | { "error": "Invalid format. Expected one of: usd, mjcf, all" } | Bad format value |
404 | { "error": "Conversion job not found" } | Bad id or not your job |
404 | { "error": "MJCF package is not available for this conversion" } | format=mjcf but the pipeline did not produce an MJCF package |
409 | { "error": "Job not yet completed", "status": "running" } | Job is still in flight |
502 | upstream fetch failure | Underlying media store unreachable |