Endpoints
POST /convert
Synchronous file conversion
Use POST /convert when you want one request that returns the converted file bytes.
POST /convertThis is the simplest conversion endpoint. For production jobs, larger files, or cleaner retry behavior, use POST /convert/jobs.
Request
Send multipart/form-data.
Examples
curl
curl https://api.convert3d.org/convert \
-F file=@model.glb \
-F from=glb \
-F to=usdz \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-o model.usdzJavaScript
import { openAsBlob } from "node:fs";
import { writeFile } from "node:fs/promises";
const token = process.env.CONVERT3D_API_TOKEN;
const file = await openAsBlob("model.glb");
const form = new FormData();
form.append("file", file, "model.glb");
form.append("from", "glb");
form.append("to", "usdz");
const response = await fetch("https://api.convert3d.org/convert", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
},
body: form,
});
if (!response.ok) {
throw new Error(await response.text());
}
const bytes = new Uint8Array(await response.arrayBuffer());
await writeFile("model.usdz", bytes);Python
import os
import requests
with open("model.glb", "rb") as file:
response = requests.post(
"https://api.convert3d.org/convert",
headers={"Authorization": f"Bearer {os.environ['CONVERT3D_API_TOKEN']}"},
files={"file": ("model.glb", file)},
data={"from": "glb", "to": "usdz"},
timeout=300,
)
response.raise_for_status()
with open("model.usdz", "wb") as output:
output.write(response.content)Response
On success, the response body is the converted file.
Important response headers:
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="model.usdz"Errors
Errors are JSON.
{
"error": "Missing 'file' field"
}See API errors for status codes and retry guidance.