REST API / v1
Canyon API
Submit STEP files from your integration and download STL meshes when conversion finishes.
Authentication
Create a key in Developer settings and send it in the X-API-Key header on every job request.
A read-only key can retrieve jobs and download results. Use Create and read jobs to submit files. Save the full key in a server-side secret store when Canyon displays it.
export CANYON_API_URL='https://canyon-api.app.canida.io'
export CANYON_API_KEY='your-api-key'Create a job
/v1/jobsStream the raw file bytes in one request as application/octet-stream. Set Content-Length to the file size. cURL sets it automatically with --upload-file for a regular file.
filenamequery · required- URL-encoded filename ending in
.stepor.stp. Send the filename alone, without directory components. presetquery · optional- Choose
draftfor low,standardfor medium, orfinefor high. Defaults tostandard. Idempotency-Keyheader · optional- Use a unique value of 1–255 visible ASCII characters per intended job. Reuse it when retrying the same upload.
202 Accepted means the upload is stored and the job has been created. The Location header points to its status. Conversion runs in the background.
Set JOB_ID to the returned id for the status and download examples below. An interrupted upload restarts from the beginning.
Retries with the same idempotency key and matching filename, size, and preset return the original job. Use a new key for new file contents. Without a key, each accepted upload creates a job.
curl -i --request POST "$CANYON_API_URL/v1/jobs?filename=bracket.step&preset=standard" \
-H "X-API-Key: $CANYON_API_KEY" \
-H 'Content-Type: application/octet-stream' \
-H 'Idempotency-Key: bracket-upload-01' \
--upload-file bracket.step{
"id": "2fb19c46-c2de-4ac7-84c5-c4b5b50e594b",
"status": "queued"
}Retrieve a job
/v1/jobs/{id}Poll the job URL returned in Location or fetch it after receiving a webhook. The API returns 200 OK with the current state.
queuedstatus- The file is stored and the job is waiting to run.
runningstatus- Conversion is in progress.
succeededstatus- The response includes
compute_ms, the STL filename, and its relative download URL. failedstatus- The response includes
error.codeanderror.message. Terminal error codes includeINSUFFICIENT_CREDITSandCONVERSION_FAILED.
curl -sS "$CANYON_API_URL/v1/jobs/$JOB_ID" \
-H "X-API-Key: $CANYON_API_KEY"{
"id": "2fb19c46-c2de-4ac7-84c5-c4b5b50e594b",
"status": "succeeded",
"compute_ms": 1613,
"result": {
"filename": "bracket.stl",
"download_url": "/v1/jobs/2fb19c46-c2de-4ac7-84c5-c4b5b50e594b/result"
}
}Download STL
/v1/jobs/{id}/resultOnce the job succeeds, request its result.download_url with your API key. The response is 200 OK with the binary STL body, Content-Type: model/stl, and a filename in Content-Disposition.
curl --fail --output bracket.stl \
"$CANYON_API_URL/v1/jobs/$JOB_ID/result" \
-H "X-API-Key: $CANYON_API_KEY"Job completion webhooks
Save one public HTTPS URL on port 443 in Developer settings. Copy the signing secret when it appears. Canyon sends a signed JSON POST for job.succeeded and job.failed.
webhook-idheader- Stable event ID. Use it to deduplicate delivery attempts.
webhook-timestampheader- Delivery time in Unix seconds. Apply a freshness check.
webhook-signatureheader- The
v1HMAC-SHA256 signature over the event ID, delivery timestamp, and raw body.
Verify the raw body using the Standard Webhooks specification before parsing JSON. Return a 2xx once you accept the event. Canyon retries failed deliveries with backoff.
{
"type": "job.succeeded",
"timestamp": "2026-11-18T12:00:00.000Z",
"data": {
"id": "2fb19c46-c2de-4ac7-84c5-c4b5b50e594b",
"status": "succeeded",
"url": "/v1/jobs/2fb19c46-c2de-4ac7-84c5-c4b5b50e594b"
}
}Errors and limits
Request errors include an error object with code and message. Base retry decisions on the HTTP status and error code.
Files can be up to 100,000,000 bytes, subject to the deployment’s upload limit. An account can create up to 30 API jobs per minute. API jobs draw from the same balance as the web app and use monthly free time first.
| HTTP | Code | What to do |
|---|---|---|
| 400 | INVALID_FILE | Supply a nonempty STEP file and a valid filename. |
| 400 | INVALID_IDEMPOTENCY_KEY | Use 1–255 visible ASCII characters. |
| 401 | INVALID_API_KEY | Check that the key exists, is active, and has not expired. |
| 403 | INSUFFICIENT_SCOPE | Use a key with Create and read jobs permission. |
| 404 | NOT_FOUND | Check the endpoint path and API base URL. |
| 404 | JOB_NOT_FOUND | Check the job ID and that the key belongs to the job’s account. |
| 404 | RESULT_NOT_FOUND | The STL is unavailable in storage. |
| 405 | METHOD_NOT_ALLOWED | Check the HTTP method for the endpoint. |
| 409 | IDEMPOTENCY_CONFLICT | Use a fresh key for a different filename, preset, or size. |
| 409 | RESULT_UNAVAILABLE | Check the job status before downloading. |
| 411 | LENGTH_REQUIRED | Send the file size in Content-Length. |
| 413 | FILE_TOO_LARGE | Reduce the file size or use a smaller STEP file. |
| 415 | EXPECTED_STEP_BYTES | Send raw bytes with application/octet-stream. |
| 422 | INVALID_PRESET | Choose draft, standard, or fine. |
| 429 | JOB_LIMIT | Wait the number of seconds in Retry-After before retrying. |
| 503 | UPLOAD_UNAVAILABLE | Retry the upload with the same idempotency key. |
| 503 | STORAGE_UNAVAILABLE | Retry the STL download. |
| 503 | TEMPORARILY_UNAVAILABLE | Retry later. For POST, reuse your Idempotency-Key. |