API Reference

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:

EndpointWhat it does
POST /cad/from-imageOne call: a part photo → a STEP file (server runs vision + build). Simplest path.
POST /cad/from-textOne call: a text description → a STEP file.
POST /cad/stepBuild a <tye-cmd> recipe (or a feature list) into a real analytic-B-rep STEP file. The geometry step.
POST /chat/visionReverse-engineer a part photo into a parametric <tye-cmd> recipe (streamed).
POST /chatTurn 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/vision response: text/event-stream (SSE)
  • /cad/step response: application/step (a downloadable STEP file)
  • Authentication: Authorization: Bearer gx_...
  • Available on plans: Pro · Max
Pro / Max only. API keys are issued from Settings → API after you upgrade. Free plan accounts cannot issue keys.

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

  1. Sign in at tylellm.com/app
  2. Upgrade to Pro or Max
  3. 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.

Never commit keys to a repo. Use environment variables. If your plan lapses to Free, the key stops working until you re-upgrade.

Models

The 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.

idModelProviderKey
proty\e Fast (default)ty\e · server-hostedgx_ only
researchty\e VA (in development)ty\e · server-hostedgx_ only
oa_gpt55GPT-5.5OpenAIbyok_key
oa_gpt54GPT-5.4OpenAIbyok_key
oa_gpt53GPT-5.4 nanoOpenAIbyok_key
oa_o3o3OpenAIbyok_key
gm_35_flashGemini 3.5 FlashGooglebyok_key
gm_31_proGemini 3.1 ProGooglebyok_key
gm_31_flash_lGemini 3.1 Flash-LiteGooglebyok_key
an_fable5Fable 5Anthropicbyok_key
an_opus48Claude Opus 4.8Anthropicbyok_key
an_sonnet46Claude Sonnet 4.6Anthropicbyok_key
an_haiku45Claude Haiku 4.5Anthropicbyok_key

Engineer roadmap

Where each ty\e tier is heading. Timelines are best-effort and may shift as model training completes.

TierNowNextStatus
ty\e Fastty\e-tuned vision model (AWQ)QLoRA fine-tune on CAD schema (33K samples) for native <cad> outputIn progress
ty\e ProSame as Fast + priority queueConcurrent multi-modal sessions, vision-heavy attachmentsIn progress
ty\e VANative ty\e engine (in development)Larger native ty\e engine with a self-learning loopIn progress
ty\e EnterpriseCustom fine-tuneSelf-serve LoRA portal, on-prem imagesPlanned

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.

POST https://tylellm.com/cad/from-image

Request body

FieldTypeDescription
imagestringA 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.
modelstringA vision model ID (e.g. gm_31_pro) or byok:provider:served. Required.
byok_keystringYour OpenAI / Gemini / Anthropic key. Required for BYOK models.
promptstringOptional hint (part type, size, material). Default: Reverse-engineer this part into a parametric 3D CAD model.
namestringBase 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.

POST https://tylellm.com/cad/from-text

Request body

FieldTypeDescription
promptstringDescribe the part (e.g. a bracket with four M8 holes). Required.
modelstringModel ID, e.g. gm_31_pro. Required — use a strong BYOK model; the free model will not emit a recipe.
byok_keystringYour provider key. Required for BYOK models.
namestringBase file name. Default part.

Response

Same as /cad/from-image200 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.

POST https://tylellm.com/cad/step

Request body

FieldTypeDescription
recipestringText containing a <tye-cmd>{...}</tye-cmd> block (e.g. the streamed reply from /chat or /chat/vision). This or features is required.
featuresarrayThe features array of a recipe, directly. Alternative to recipe.
varsobjectOptional Design-Intelligence variables for =formula params.
namestringBase 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.

POST https://tylellm.com/chat/vision

Request body

FieldTypeDescription
modelstringA vision model ID (e.g. gm_31_pro) or byok:provider:served. Required.
byok_keystringYour OpenAI / Gemini / Anthropic key. Required for BYOK models.
messagesarrayEach item {role, text, images}; images = an array of data:image/...;base64,... URLs.
streambooleantrue 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

FieldTypeDescription
modelstringModel ID (pro default, research, or a BYOK id like gm_31_pro). BYOK ids need byok_key.
byok_keystringYour provider key — required only for BYOK models.
messagesarrayConversation so far. Each item: {role, content}. Required.
streambooleantrue for SSE (recommended). false returns full response at end. Default true.
temperaturenumber0.0–1.0. Lower = more deterministic. Default 0.4.
top_pnumberNucleus sampling. Default 0.85.
max_tokensintegerCap on reply length. Default 2048 (auto-bumped for CAD/drawing prompts).

Message roles

  • user — your prompt
  • assistant — 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.

StatusReasonAction
400Bad request (no recipe/features, no image, bad JSON)Check the request body.
401Missing / invalid API keyCheck Authorization header. Confirm key not regenerated.
403Plan downgraded to FreeRe-upgrade to Pro or Max to restore API access.
422Recipe failed to build (/cad/step)The recipe was unbuildable — inspect detail.
429Rate limit exceededBack off. Retry-After header tells you when.
500Internal errorTransient — retry with exponential backoff. Contact support if persistent.
503Build service / model unavailableRetry with backoff.
{ "detail": "Invalid API key" }

Rate limits

Limits are per-account, not per-key. Regenerating a key does not reset the daily counter.

PlanMessages / dayBurst
Pro1,00060 / minute
MaxUnlimited120 / 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