How to use it
Sign up, create a twin, and point your test base URL at its invoke address.
Call it
Public twins need no login. Private twins need a workspace API key.
curl -sS http://localhost:3000/sim/demo/v1/orders \
-H 'content-type: application/json' \
-d '{"sku":"cable","qty":1}'
curl -sS http://localhost:3000/sim/demo/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"messages":[{"role":"user","content":"ping"}]}'GET /sim/{slug}/__routes lists routes. GET /__openapi exports OpenAPI. A member or key can POST /__reset to clear state.
Stateful resources
With behavior set to Stateful resource, one path supports GET list, POST create, and GET, PATCH, and DELETE /:id. State stays on the twin across page reloads.
Templates
{{param.id}} {{body.sku}} {{query.q}} {{header.x-request-id}} {{uuid}} {{now}} {{state.collections.orders}}
Models
POST /v1/chat/completions returns OpenAI-compatible JSON. stream: true switches the response to SSE and ends with data: [DONE]. A request that includes tools, and a prompt that mentions tool, function, or weather, returns tool_calls. Force tool calls whenever tools are present from the Faults tab.
Recording, gRPC, WebSocket, Kafka
Turn on Record upstream in the twin settings to forward live calls and keep the exchange. POST /__tap stores one captured call, and createRoute saves it as a static route when you send a member cookie or API key.
curl -sS -X POST http://localhost:3000/sim/demo/__kafka/topics/orders \
-H 'content-type: application/json' \
-d '{"records":[{"value":{"sku":"cable"}}]}'
curl -sS -X POST http://localhost:3000/sim/demo/__grpc/helloworld.Greeter/SayHello \
-H 'content-type: application/json' \
-d '{"name":"Ada"}'WebSocket clients use ws://localhost:3001/sim/{slug}/{path}. POST /__ws exchanges one frame over HTTP when a socket is unavailable.
SSO and billing
An owner on Team can save an OIDC issuer, client id, and client secret for one email domain. Sign-in starts at the login page with a work email. Team checkout uses Stripe. Point the webhook at /api/stripe/webhook.
Control API
curl -sS http://localhost:3000/api/v1/twins \
-H "authorization: Bearer at_live_..."
curl -sS -X POST http://localhost:3000/api/v1/twins/my-slug/scenario \
-H "authorization: Bearer at_live_..." \
-H "content-type: application/json" \
-d '{"scenario":"outage"}'