Documentation

Developer docs & Postman collections

Every mlslabs API ships with a Postman collection, a consistent REST contract and an async job model. Start here — most teams run their first request in under five minutes.

Quickstart

Five minutes to your first job

1

Get an API key

Sign up and copy your key from the dashboard. Keys are scoped per project and rotate anytime.

2

Set up the Postman environment

Fork the mlslabs workspace and set two variables: base_url and api_key. Every collection reads them.

3

Submit a job

Pick any API collection, choose a sample request, press Send. Async jobs return a job_id immediately.

4

Poll or webhook

Poll the job endpoint, or register a webhook URL and receive a callback when processing completes.

Authentication

All requests authenticate with the X-API-Key header. Jobs are submitted to /v1/<api>/jobs and polled on /v1/<api>/jobs/<id>.

  • Async job model — submit, poll or webhook, download
  • Object-storage in/out — S3-compatible buckets and public URLs
  • Credits auto-refunded on failed jobs
  • Rate limits per tier — raised automatically as you scale
See tier limits
cURL
curl -X POST "https://api.mlslabs.io/v1/sdr2hdr/jobs" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "s3://bucket/input.mp4",
       "output": "s3://bucket/output-hdr.mp4",
       "target": "hdr10"}'

# => {"job_id": "job_9f2k...", "status": "queued"}

curl "https://api.mlslabs.io/v1/sdr2hdr/jobs/job_9f2k..." \
  -H "X-API-Key: YOUR_API_KEY"

# => {"status": "done", "output": "s3://bucket/output-hdr.mp4"}

Error handling

One error envelope, 45 stable codes

Every API answers with the same error object — synchronous responses, GET /jobs/{id} when a job fails, and the job.failed webhook. Branch on type for the family and code for the exact cause.

  • 401 invalid_api_key — rotate the credential
  • 402 insufficient_credits — top up, credits are never charged on failure
  • 429 rate_limit_exceeded — back off, the SDK retries for you
Open the error code reference
JSON
{
  "error": {
    "type": "billing_error",
    "code": "insufficient_credits",
    "message": "Not enough credits for this job. Required 120, available 45.",
    "param": null,
    "request_id": "req_01J8ZK3M9QX4HD2N9R",
    "doc_url": "https://mlslabs.io/docs/errors.html#insufficient_credits",
    "retryable": false,
    "details": {
      "required_credits": 120,
      "available_credits": 45
    }
  }
}