Getting started
Code examples
The same calls in curl, Node.js, and Python.
We do not ship an SDK yet. The API is plain HTTPS and JSON, so any HTTP client works. These are the quickstart calls in three languages.
Create a job
curl -X POST https://glyphtech.io/api/intake/jobs \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: po-2026-0142" \
-d '{
"name": "Bracket run",
"material": "304 stainless",
"material_cost_cents": 12000,
"quantity": 50,
"operations": [
{"op_ref": "OP-10", "name": "Rough mill",
"machine_options": "MILL", "duration_hr": 2}
]
}'
const res = await fetch("https://glyphtech.io/api/intake/jobs", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GLYPH_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": "po-2026-0142",
},
body: JSON.stringify({
name: "Bracket run",
material: "304 stainless",
material_cost_cents: 12000,
quantity: 50,
operations: [
{ op_ref: "OP-10", name: "Rough mill", machine_options: "MILL", duration_hr: 2 },
],
}),
});
const job = await res.json();
console.log(job.status, job.estimate.total_cents);
import os, requests
res = requests.post(
"https://glyphtech.io/api/intake/jobs",
headers={
"Authorization": f"Bearer {os.environ['GLYPH_KEY']}",
"Idempotency-Key": "po-2026-0142",
},
json={
"name": "Bracket run",
"material": "304 stainless",
"material_cost_cents": 12000,
"quantity": 50,
"operations": [
{"op_ref": "OP-10", "name": "Rough mill", "machine_options": "MILL", "duration_hr": 2},
],
},
)
job = res.json()
print(job["status"], job["estimate"]["total_cents"])
Attach a file
curl -X POST https://glyphtech.io/api/intake/jobs/$JOB/files \
-H "Authorization: Bearer $KEY" \
-F files=@bracket.step
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("files", new Blob([await readFile("bracket.step")]), "bracket.step");
const res = await fetch(`https://glyphtech.io/api/intake/jobs/${jobId}/files`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.GLYPH_KEY}` },
body: form,
});
console.log((await res.json()).files);
with open("bracket.step", "rb") as f:
res = requests.post(
f"https://glyphtech.io/api/intake/jobs/{job_id}/files",
headers={"Authorization": f"Bearer {os.environ['GLYPH_KEY']}"},
files=[("files", ("bracket.step", f))],
)
print(res.json()["files"])
Accept and read the payment link
curl -X POST https://glyphtech.io/api/intake/jobs/$JOB/accept \
-H "Authorization: Bearer $KEY"
const res = await fetch(`https://glyphtech.io/api/intake/jobs/${jobId}/accept`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.GLYPH_KEY}` },
});
const job = await res.json();
if (res.status === 201) console.log("pay at", job.invoice.url);
if (res.status === 202) console.log("waiting for a quote from Glyph");
res = requests.post(
f"https://glyphtech.io/api/intake/jobs/{job_id}/accept",
headers={"Authorization": f"Bearer {os.environ['GLYPH_KEY']}"},
)
job = res.json()
if res.status_code == 201:
print("pay at", job["invoice"]["url"])
elif res.status_code == 202:
print("waiting for a quote from Glyph")