JT to glTF REST API | CADCON
Convert Siemens JT files with the CADCON REST API. Authentication, upload, conversion status and glTF or GLB downloads, with code examples.
Authentication
All API requests require an API key sent as a request header. Your API key is available in your Workspace.
X-Api-Key: YOUR_API_KEYPOST /api/convert
Convert a JT file to glTF, GLB, or both formats. Uses 1 credit per conversion.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | file | Yes | The .jt file to convert |
format | string | No | gltf (default), glb, or both |
curl
# Convert a JT file to glTF
curl -X POST https://cadcon.io/api/convert \
-H "X-Api-Key: YOUR_API_KEY" \
-F "[email protected]" \
-F "outputFormat=gltf"JavaScript (fetch)
const form = new FormData()
form.append('file', fileInput.files[0])
form.append('outputFormat', 'glb')
const res = await fetch('/api/convert', {
method: 'POST',
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
body: form
})
const { gltfUrl, binUrl, glbUrl } = await res.json()Python
import requests
with open('model.jt', 'rb') as f:
r = requests.post(
'https://cadcon.io/api/convert',
headers={'X-Api-Key': 'YOUR_API_KEY'},
files={'file': f},
data={'outputFormat': 'glb'}
)
data = r.json()
print(data['glbUrl'])Response
{
"jobId": 42,
"status": "Completed",
"fileName": "model",
"gltfUrl": "/api/files/<token>",
"binUrl": "/api/files/<token>",
"glbUrl": null
}GET /api/jobs
Returns your 20 most recent completed conversions with download URLs.
curl
# List previous conversions
curl https://cadcon.io/api/jobs \
-H "X-Api-Key: YOUR_API_KEY"Response
[
{
"id": 42,
"originalFileName": "part.jt",
"outputFormat": "gltf",
"completedAt": "2025-06-01T10:30:00Z",
"creditsUsed": 1,
"gltfUrl": "/api/files/<token>",
"binUrl": "/api/files/<token>",
"glbUrl": null
}
]GET /api/files/{token}
Download a converted file using the token returned by /api/convert or /api/jobs. Tokens expire after 24 hours.
curl https://cadcon.io/api/files/<token> \
-H "X-Api-Key: YOUR_API_KEY" \
-o model.gltf.NET NuGet Package
Use the Cadcon.Conversion NuGet package to convert JT files locally in your .NET application — no HTTP calls, no file uploads. One credit is deducted per conversion via the Cadcon API.
Install
dotnet add package Cadcon.ConversionConvert locally (offline)
using Cadcon.Conversion;
var converter = new JtConverter();
var result = converter.Convert("part.jt", "part.glb", new JtConversionOptions { WriteGlb = true });
if (result.Success)
Console.WriteLine($"Done: {result.VertexCount} verts, {result.TriangleCount} tris");
else
Console.WriteLine($"Error: {result.ErrorMessage}");Convert with API key (metered)
Validate your key and fetch credits on startup, then deduct 1 credit per conversion.
using Cadcon.Conversion;
// Validate key + fetch credits on startup
var client = await CadconApiClient.CreateAsync("YOUR_API_KEY");
Console.WriteLine($"Credits: {client.Credits}");
// 1 credit deducted per Convert() call
var converter = new JtConverter(client);
var result = converter.Convert("part.jt", "part.glb", new JtConversionOptions { WriteGlb = true });
Console.WriteLine($"Credits remaining: {client.Credits}");Error Codes
| Status | Meaning |
|---|---|
400 | Bad request — invalid file or parameters |
401 | Unauthorized — missing or invalid API key |
402 | Payment required — insufficient credits |
500 | Conversion failed — see error message |