The ty\e API
Turn a text prompt or a photo of a part into real, editable CAD — an analytic B-rep STEP file. Bearer auth, Server-Sent Events, rate-limited per plan. Available on Pro and Max.
Overview
The ty\e API turns a text description or a photo of a part into real, editable CAD — an analytic B-rep STEP file (AUTOMOTIVE_DESIGN / AP214) you can open in any CAD/CAM package. It is a small REST API built on three endpoints:
| Endpoint | What it does |
|---|---|
POST /cad/from-image | One call: a part photo → a STEP file (server runs vision + build). Simplest path. |
POST /cad/from-text | One call: a text description → a STEP file. |
POST /cad/step | Build a <tye-cmd> recipe (or a feature list) into a real analytic-B-rep STEP file. The geometry step. |
POST /chat/vision | Reverse-engineer a part photo into a parametric <tye-cmd> recipe (streamed). |
POST /chat | Turn a text prompt into a recipe (streamed) — or hold a normal engineering conversation. |
Simplest — one call: /cad/from-image or /cad/from-text (the server runs vision/chat + build for you, and returns the STEP file). For more control — to inspect or edit the recipe before building — chain the building blocks: /chat/vision or /chat (→ recipe) then /cad/step (→ STEP).
- Request body:
application/json /chat&/chat/visionresponse:text/event-stream(SSE)/cad/stepresponse:application/step(a downloadable STEP file)- Authentication:
Authorization: Bearer gx_... - Available on plans: Pro · Max
Authentication
Every request must include a Bearer token in the Authorization header. Keys are 56-character hex strings prefixed with gx_.
Authorization: Bearer gx_a4f8e2b1c9d7f3e5a2c8b1d4e6f9c3a7b061e2345678901abcdef23
Get a key
- Sign in at tylellm.com/app
- Upgrade to Pro or Max
- Settings → API → Show or Copy
Rotate a key
If a key leaks, click Regenerate in the API panel. The old key is invalidated immediately. There's a hard rate-limit of 3 regenerations per 5 minutes per user.
Models
model field is optional — omit it and the server uses the default pro. Server-hosted (work with your gx_ key alone): pro (ty\e Fast) is live and is the default; research (ty\e VA) is in active development and not yet serving. Bring-your-own-key models (oa_* OpenAI, gm_* Gemini, an_* Anthropic) run on your provider account — pass your key as byok_key in the body; you can also target any served model with the byok:provider:served passthrough. For reliable image→CAD / text→CAD recipe generation, use a strong BYOK model (e.g. gm_31_pro or an_opus48) — the free pro model tends to answer in prose and will not emit a <tye-cmd> recipe. The full current list is below and via GET /models.Available model IDs
Pass one of these as the model field. Vendor model IDs change often — GET /models returns the live list, and the byok:provider:served passthrough targets any served name not listed here.
| id | Model | Provider | Key |
|---|---|---|---|
pro | ty\e Fast (default) | ty\e · server-hosted | gx_ only |
research | ty\e VA (in development) | ty\e · server-hosted | gx_ only |
oa_gpt55 | GPT-5.5 | OpenAI | byok_key |
oa_gpt54 | GPT-5.4 | OpenAI | byok_key |
oa_gpt53 | GPT-5.4 nano | OpenAI | byok_key |
oa_o3 | o3 | OpenAI | byok_key |
gm_35_flash | Gemini 3.5 Flash | byok_key | |
gm_31_pro | Gemini 3.1 Pro | byok_key | |
gm_31_flash_l | Gemini 3.1 Flash-Lite | byok_key | |
an_fable5 | Fable 5 | Anthropic | byok_key |
an_opus48 | Claude Opus 4.8 | Anthropic | byok_key |
an_sonnet46 | Claude Sonnet 4.6 | Anthropic | byok_key |
an_haiku45 | Claude Haiku 4.5 | Anthropic | byok_key |
Engineer roadmap
Where each ty\e tier is heading. Timelines are best-effort and may shift as model training completes.
| Tier | Now | Next | Status |
|---|---|---|---|
| ty\e Fast | ty\e-tuned vision model (AWQ) | QLoRA fine-tune on CAD schema (33K samples) for native <cad> output | In progress |
| ty\e Pro | Same as Fast + priority queue | Concurrent multi-modal sessions, vision-heavy attachments | In progress |
| ty\e VA | Native ty\e engine (in development) | Larger native ty\e engine with a self-learning loop | In progress |
| ty\e Enterprise | Custom fine-tune | Self-serve LoRA portal, on-prem images | Planned |
POST /cad/from-image
One call: a part photo becomes a STEP file. The server runs the vision model to get a recipe, then builds it — you send the image, you get geometry back. The simplest way from a photo to CAD.
Request body
| Field | Type | Description |
|---|---|---|
| image | string | A URL (the server downloads it) or a data:image/...;base64,... URL for a local file. Required. URLs must be publicly reachable — private / internal / cloud-metadata addresses are refused (400). Max 15 MB. |
| model | string | A vision model ID (e.g. gm_31_pro) or byok:provider:served. Required. |
| byok_key | string | Your OpenAI / Gemini / Anthropic key. Required for BYOK models. |
| prompt | string | Optional hint (part type, size, material). Default: Reverse-engineer this part into a parametric 3D CAD model. |
| name | string | Base file name. Default part. |
Response
200 with Content-Type: application/step — the STEP file (analytic B-rep, AP214) + headers X-Tye-Faces, X-Tye-Bodies, X-Tye-Build-Ms. Errors: 400 (image download failed), 422 (no recipe / unbuildable), 502/503 (vision or build unavailable). One request runs vision + build, so expect ~30–60s — use a long client timeout. Rate-limited to about 30 requests/min per IP (429 when exceeded); if the builder is saturated you may get 503 builder busy — retry shortly.
Example request
{
"image": "https://example.com/part.jpg",
"model": "gm_31_pro",
"byok_key": "YOUR_PROVIDER_KEY",
"name": "part"
}
POST /cad/from-text
One call: a text description becomes a STEP file. The server runs the chat model to get a recipe, then builds it.
Request body
| Field | Type | Description |
|---|---|---|
| prompt | string | Describe the part (e.g. a bracket with four M8 holes). Required. |
| model | string | Model ID, e.g. gm_31_pro. Required — use a strong BYOK model; the free model will not emit a recipe. |
| byok_key | string | Your provider key. Required for BYOK models. |
| name | string | Base file name. Default part. |
Response
Same as /cad/from-image — 200 application/step + X-Tye-* headers, ~30–60s.
Example request
{
"prompt": "Design a mounting bracket, 100x60x6 mm, with four M8 holes",
"model": "gm_31_pro",
"byok_key": "YOUR_PROVIDER_KEY"
}
POST /cad/step
Build a recipe into a real analytic-B-rep STEP file — the endpoint that returns geometry. Feed it a <tye-cmd> recipe (from /chat or /chat/vision) or a raw feature list.
Request body
| Field | Type | Description |
|---|---|---|
| recipe | string | Text containing a <tye-cmd>{...}</tye-cmd> block (e.g. the streamed reply from /chat or /chat/vision). This or features is required. |
| features | array | The features array of a recipe, directly. Alternative to recipe. |
| vars | object | Optional Design-Intelligence variables for =formula params. |
| name | string | Base file name. Default tye_part. |
Response
200 with Content-Type: application/step — the STEP file bytes (analytic B-rep, AP214). Headers: X-Tye-Faces, X-Tye-Bodies, X-Tye-Build-Ms. Errors: 400 (no recipe/features), 422 (recipe failed to build), 503 (build service busy).
Example request
{
"features": [
{ "op": "spurGear", "params": { "module": 2, "teeth": 24, "width": 12, "bore": 10 } }
],
"name": "gear"
}
POST /chat/vision
Reverse-engineer a part photo into a parametric <tye-cmd> recipe, streamed as SSE. Requires a signed-in (Pro/Max) key and a vision model.
Request body
| Field | Type | Description |
|---|---|---|
| model | string | A vision model ID (e.g. gm_31_pro) or byok:provider:served. Required. |
| byok_key | string | Your OpenAI / Gemini / Anthropic key. Required for BYOK models. |
| messages | array | Each item {role, text, images}; images = an array of data:image/...;base64,... URLs. |
| stream | boolean | true for SSE. |
The reply streams tokens (same {token, done} format as /chat) and ends with a <tye-cmd>{...}</tye-cmd> recipe. Pass that recipe to /cad/step for the STEP file.
POST /chat
Turn a text prompt into a recipe — or hold a normal engineering conversation. With a build prompt (e.g. “Design a bracket…”) and a strong model, the streamed reply contains a <tye-cmd> recipe you can pass to /cad/step.
Request body
| Field | Type | Description |
|---|---|---|
| model | string | Model ID (pro default, research, or a BYOK id like gm_31_pro). BYOK ids need byok_key. |
| byok_key | string | Your provider key — required only for BYOK models. |
| messages | array | Conversation so far. Each item: {role, content}. Required. |
| stream | boolean | true for SSE (recommended). false returns full response at end. Default true. |
| temperature | number | 0.0–1.0. Lower = more deterministic. Default 0.4. |
| top_p | number | Nucleus sampling. Default 0.85. |
| max_tokens | integer | Cap on reply length. Default 2048 (auto-bumped for CAD/drawing prompts). |
Message roles
user— your promptassistant— previous AI reply (for multi-turn context)system— optional system override (rarely needed; Custom Instructions handle this server-side)
Example request
{
"messages": [
{ "role": "user", "content": "Design a mounting bracket, 100x60x6 mm, with four M8 holes" }
],
"stream": true,
"temperature": 0.3
}
Streaming format
When stream: true, /chat and /chat/vision return text/event-stream. Each line is data: <json>\n\n where the JSON is {"token": "...", "done": false}. Read line by line, strip the data: prefix, and concatenate every token.
data: {"token": "Here", "done": false}
data: {"token": " is", "done": false}
data: {"token": " <tye-cmd>...", "done": false}
…
data: {"token": "", "done": true}
The stream ends with {"token": "", "done": true}. Set stream: false to receive the full reply as one JSON object instead.
Errors
Errors come back as standard HTTP status codes with a JSON body.
| Status | Reason | Action |
|---|---|---|
| 400 | Bad request (no recipe/features, no image, bad JSON) | Check the request body. |
| 401 | Missing / invalid API key | Check Authorization header. Confirm key not regenerated. |
| 403 | Plan downgraded to Free | Re-upgrade to Pro or Max to restore API access. |
| 422 | Recipe failed to build (/cad/step) | The recipe was unbuildable — inspect detail. |
| 429 | Rate limit exceeded | Back off. Retry-After header tells you when. |
| 500 | Internal error | Transient — retry with exponential backoff. Contact support if persistent. |
| 503 | Build service / model unavailable | Retry with backoff. |
{ "detail": "Invalid API key" }
Rate limits
Limits are per-account, not per-key. Regenerating a key does not reset the daily counter.
| Plan | Messages / day | Burst |
|---|---|---|
| Pro | 1,000 | 60 / minute |
| Max | Unlimited | 120 / minute |
When you hit a limit the server returns 429 with a Retry-After header indicating seconds to wait. Implement exponential backoff in production clients.
Code samples
Ready to ship?
Upgrade to Pro to issue your first API key — keep your existing chat history, sync across devices, and unlock advanced models.
Get started