Thrixel API

Auto

Let Thrixel choose between Architect and Sculptor for a prompt.

When to use Auto: you have a prompt or an image and do not want to decide the engine yourself. Auto reads the request and suggests Architect (editable, multi-part) or Sculptor (one dense, organic mesh). You then submit to that engine as usual, passing the route along.

Auto is two calls: route, then submit. Routing only suggests an engine. Nothing is generated until you submit, and nothing is charged until a submit uses the route.

Choose an engine

POST /api/v1/route

Requires API key.

Request Body

NameTypeDescription
taskstringThe prompt you are about to submit. Up to 8,000 characters.
imagesstring[]Reference images as data URLs. Up to 6; the first 3 are looked at.
imagestringSingle-image alias for images.

Provide task, an image, or both. Send the same inputs you will submit, so the suggestion describes the request you actually make.

Example Request

POST /route
curl -X POST https://api.thrixel.com/api/v1/route \
  -H "Authorization: Bearer sk-thrixel-<YOUR_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "a wooden treasure chest with a hinged lid"
  }'

Example Response

{
  "route_id": "0b1c2d3e-...",
  "engine": "architect",
  "confidence": 0.93,
  "reason_code": "moving_parts",
  "ask_user": false,
  "cubes": 1
}

Response Fields

NameTypeDescription
route_idstring | nullPass it back as auto_route_id on the submit. Null when no suggestion could be made.
enginestring | nullarchitect or sculptor. Null when no suggestion could be made.
confidencenumber0 to 1. How sure the suggestion is.
reason_codestring | nullWhy this engine, from the list below.
ask_userbooleantrue when the suggestion is not confident enough to follow on its own. Show the user both engines and let them pick.
cubesintegerWhat the route costs when a submit uses it. 0 when there is no route.

When engine is null, ask_user is true and nothing is owed: let the user pick the engine and submit without auto_route_id.

Reason codes

CodeSuggestsMeaning
moving_partsArchitectPart of it needs to move on its own (a lid, a wheel, a door).
multi_partArchitectSeparate, editable parts were asked for.
sceneArchitectSeveral objects laid out together.
hard_surfaceArchitectA man-made object with clean edges and exact proportions.
furniture_vehicle_buildingArchitectFurniture, vehicles and buildings build best from separate parts.
lowpoly_styleArchitectA low-poly, voxel or blocky style.
product_photoArchitectThe image shows a man-made object.
organic_singleSculptorAn organic subject in one piece: a creature, character, plant or rock.
organic_photoSculptorThe image shows an organic subject.
one_piece_requestSculptorA single fused piece was asked for.

New codes may be added. Treat an unknown code as "no reason given" rather than as an error.

Submit with the route

Submit to the engine you settled on, Architect or Sculptor, exactly as you would without Auto, and add one field:

NameTypeDescription
auto_route_idstringThe route_id from /route. Records that Auto made the choice and charges the route.
POST /architect/submit
curl -X POST https://api.thrixel.com/api/v1/architect/submit \
  -H "Authorization: Bearer sk-thrixel-<YOUR_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "a wooden treasure chest with a hinged lid",
    "auto_route_id": "0b1c2d3e-..."
  }'

You may submit to the other engine than the one suggested. The route is still used and charged, and the submission records both the suggestion and what you chose: GET /{submission_id}/info returns them to you as auto_route.engine and auto_route.chosen_engine.

Rules for a route id

A route id is single-use, belongs to the account that asked for it, and expires after 30 minutes. A submit carrying one that is unknown, already used or expired is refused with 400 before anything is created or charged. Ask /route again with the current prompt.

Cost

A route costs 1 Cube (the exact amount is in the cubes field), charged only when a submit uses it. A route you never submit costs nothing. The submission itself is priced as usual for its engine. The route's Cube shows in your billing activity under Auto.

Errors

StatusWhen
402Your Cube balance is empty. Top up before routing, since you could not submit either.
422Neither task nor an image was sent, or more than 6 images.
429Too many routes requested without a submit (30 unused within 30 minutes). Submit one, or wait a few minutes.

A routing outage never fails the call: it returns engine: null and ask_user: true, so you can still let the user choose.

On this page