Skip to content

The AutoPrintFarm API allows you to programmatically manage your print farm, integrate with existing systems, and build custom applications.

All API requests should be made to:

https://api.autoprintfarm.com/v1
  • v1 (Current): Stable, production-ready
  • v2 (Beta): New features, breaking changes possible
Terminal window
curl https://api.autoprintfarm.com/v1/printers \
-H "Authorization: Bearer YOUR_API_KEY"
{
"printers": [
{
"id": "prt_abc123",
"name": "Prusa-A-01",
"status": "printing",
"current_job": "job_xyz789"
}
]
}
  • List and manage printers
  • Monitor printer status
  • Configure printer settings
  • Group and organize printers
  • Create and queue jobs
  • Monitor job progress
  • Cancel or pause jobs
  • Retrieve job history
  • Track material inventory
  • Monitor consumption
  • Set reorder alerts
  • Manage material profiles
  • Retrieve performance metrics
  • Generate reports
  • Export historical data
  • Track costs and ROI
  • Subscribe to events
  • Real-time notifications
  • Custom integrations
  • Event filtering

All API requests require authentication using an API key:

Terminal window
Authorization: Bearer YOUR_API_KEY

Get your API key from the dashboard settings.

Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"printer_id": "prt_abc123",
"action": "pause"
}
{
"success": true,
"data": {
"id": "job_xyz789",
"status": "queued"
}
}
{
"success": false,
"error": {
"code": "invalid_printer",
"message": "Printer not found",
"details": "No printer with ID prt_abc123"
}
}
CodeMeaning
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

API requests are rate limited to ensure fair usage:

  • Free tier: 100 requests/hour
  • Pro tier: 1,000 requests/hour
  • Enterprise: Custom limits

Rate limit headers are included in responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1633024800

List endpoints support pagination:

Terminal window
GET /v1/jobs?page=2&per_page=50

Response includes pagination metadata:

{
"data": [...],
"pagination": {
"page": 2,
"per_page": 50,
"total": 234,
"total_pages": 5
}
}

Most list endpoints support filtering:

Terminal window
GET /v1/printers?status=printing&group=production

And sorting:

Terminal window
GET /v1/jobs?sort=-created_at&status=completed

Use - prefix for descending order.

POST requests that create resources support idempotency keys:

Terminal window
curl -X POST https://api.autoprintfarm.com/v1/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: unique-key-123" \
-d '{"file_url": "https://example.com/model.gcode"}'

Repeating the request with the same key returns the original response.

Subscribe to events for real-time updates:

POST /v1/webhooks
{
"url": "https://your-app.com/webhook",
"events": ["job.completed", "printer.offline"],
"secret": "your_webhook_secret"
}

Learn more about webhooks →

Official SDKs available:

  • JavaScript/Node.js: npm install @autoprintfarm/sdk
  • Python: pip install autoprintfarm
  • Ruby: gem install autoprintfarm
  • Go: go get github.com/autoprintfarm/autoprintfarm-go

Community libraries:

Try the API interactively in our API Explorer.