REST API / v1

Canyon API

Submit STEP files from your integration and download STL meshes when conversion finishes.

Developer settings

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.

Set up your shellshell
export CANYON_API_URL='https://canyon-api.app.canida.io'
export CANYON_API_KEY='your-api-key'

Create a job

POST/v1/jobs

Stream 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 .step or .stp. Send the filename alone, without directory components.
presetquery · optional
Choose draft for low, standard for medium, or fine for high. Defaults to standard.
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.

Upload a STEP filecURL
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
202 AcceptedJSON
{
  "id": "2fb19c46-c2de-4ac7-84c5-c4b5b50e594b",
  "status": "queued"
}

Retrieve a job

GET/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.code and error.message. Terminal error codes include INSUFFICIENT_CREDITS and CONVERSION_FAILED.
Check statuscURL
curl -sS "$CANYON_API_URL/v1/jobs/$JOB_ID" \
  -H "X-API-Key: $CANYON_API_KEY"
Successful jobJSON
{
  "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

GET/v1/jobs/{id}/result

Once 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.

Save the STLcURL
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 v1 HMAC-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.

Completion eventJSON
{
  "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.

HTTPCodeWhat to do
400INVALID_FILESupply a nonempty STEP file and a valid filename.
400INVALID_IDEMPOTENCY_KEYUse 1–255 visible ASCII characters.
401INVALID_API_KEYCheck that the key exists, is active, and has not expired.
403INSUFFICIENT_SCOPEUse a key with Create and read jobs permission.
404NOT_FOUNDCheck the endpoint path and API base URL.
404JOB_NOT_FOUNDCheck the job ID and that the key belongs to the job’s account.
404RESULT_NOT_FOUNDThe STL is unavailable in storage.
405METHOD_NOT_ALLOWEDCheck the HTTP method for the endpoint.
409IDEMPOTENCY_CONFLICTUse a fresh key for a different filename, preset, or size.
409RESULT_UNAVAILABLECheck the job status before downloading.
411LENGTH_REQUIREDSend the file size in Content-Length.
413FILE_TOO_LARGEReduce the file size or use a smaller STEP file.
415EXPECTED_STEP_BYTESSend raw bytes with application/octet-stream.
422INVALID_PRESETChoose draft, standard, or fine.
429JOB_LIMITWait the number of seconds in Retry-After before retrying.
503UPLOAD_UNAVAILABLERetry the upload with the same idempotency key.
503STORAGE_UNAVAILABLERetry the STL download.
503TEMPORARILY_UNAVAILABLERetry later. For POST, reuse your Idempotency-Key.