Quickstart
You submit a structured JSON job. Splixir checks the output and returns a signed download URL. A delivered image job costs $0.002.
-
Create an API key
Open Console keys and create a key starting with
splx_live_. Verified accounts start with $1.00 in free credit with no expiration. Export the key as an environment variable:Terminal window export SPLIXIR_API_KEY="splx_live_..." -
Run your first verified image job
Submit a job that resizes an image inside an 800 px bounding box and converts it to WebP. You can omit
kindwhen using namespaced operations likeimage.resizeandimage.convert. Settingwait: trueholds the connection for up to 25 seconds so you receive the finished file in one request.Terminal window curl -X POST https://api.splixir.com/v1/jobs \-H "Authorization: Bearer $SPLIXIR_API_KEY" \-H "Content-Type: application/json" \-d '{"input": "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=2400","operations": [{ "type": "image.resize", "width": 800, "height": 600, "fit": "inside" },{ "type": "image.convert", "format": "webp", "quality": 82 }],"output": { "format": "webp" },"wait": true}'const response = await fetch("https://api.splixir.com/v1/jobs", {method: "POST",headers: {Authorization: `Bearer ${process.env.SPLIXIR_API_KEY}`,"Content-Type": "application/json",},body: JSON.stringify({input: "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=2400",operations: [{ type: "image.resize", width: 800, height: 600, fit: "inside" },{ type: "image.convert", format: "webp", quality: 82 },],output: { format: "webp" },wait: true,}),});const job = await response.json();console.log(job.id, job.state, job.output.downloadUrl);import osimport requestsresponse = requests.post("https://api.splixir.com/v1/jobs",headers={"Authorization": f"Bearer {os.environ['SPLIXIR_API_KEY']}","Content-Type": "application/json",},json={"input": "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=2400","operations": [{"type": "image.resize", "width": 800, "height": 600, "fit": "inside"},{"type": "image.convert", "format": "webp", "quality": 82},],"output": {"format": "webp"},"wait": True,},)job = response.json()print(job["id"], job["state"], job["output"]["downloadUrl"])Terminal window npx splixir image input.jpg --resize 800x600 --fit inside --format webp --quality 82 -o output.webp -
Inspect the response
Splixir sets
statetodelivered,costUsdto0.002, and attaches the signed download URL andverificationReport:{"id": "job_...","kind": "image","category": "image","state": "delivered","costUsd": 0.002,"billed": true,"output": {"format": "webp","downloadUrl": "https://files.splixir.com/outputs/job_....webp?exp=...&sig=..."},"verificationReport": {"verified": true,"outputProbe": {"width": 800,"height": 533,"format": "webp","sha256": "..."}}} -
Download or chain the verified output
Fetch
output.downloadUrlwith your HTTP client, use-o output.webpin the CLI, or pass{ "jobId": "job_..." }into a follow-up job. Signed URLs expire at the end of your retention window, starting at 24 hours on Free through Pro or up to 30 days withretainDays.Next, inspect
GET https://api.splixir.com/v1/capabilities, explore the Image reference, and read the interactive REST API reference.