Self-hosting (BYOC)

Self-hosting lets you export a saved flow or agent as a self-contained @runtypelabs/runtime definition and run it on your own infrastructure (Cloudflare Workers, Cloud Run, Node, Vercel Functions, anywhere a runtime adapter is supplied). The exported runtime still reaches back to Runtype for the platform capabilities it needs — model execution through the platform-key proxy, plus hosted memory, crawl, email, search, and asset storage.

Self-hosting (BYOC, bring your own cloud) is an Enterprise-plan capability. The export endpoints and every hosted /v1/runtime/* endpoint below are documented for everyone, but calls from an account that is not on an Enterprise plan return HTTP 403 with the machine code BYOC_PLAN_REQUIRED. Contact support to enable self-hosting for your account.

Exporting a flow or agent

The export endpoints are in limited preview: they are dark-launched and return 404 Not Found in production until general availability. They are reachable in non-production environments today.

Export a saved flow or agent version as a runtime definition:

Export a flow
$curl https://api.runtype.com/v1/flows/FLOW_ID/export-runtime \
> -H "Authorization: Bearer YOUR_API_KEY"
Export an agent
$curl https://api.runtype.com/v1/agents/AGENT_ID/export-runtime \
> -H "Authorization: Bearer YOUR_API_KEY"

The response is a self-contained runtime definition you vendor into your own deployment. On an ineligible plan both endpoints return:

1{
2 "error": "Feature Not Available",
3 "message": "Self-hosting (BYOC) requires an Enterprise plan. Contact support to enable it for your account.",
4 "code": "BYOC_PLAN_REQUIRED"
5}

Hosted capability endpoints

A standalone runtime authenticates to these endpoints with an ordinary Runtype API key (Bearer token) and reaches the same platform capabilities its flow/agent steps use inside Runtype. Tenant identity is always taken from the authenticated key — identity fields in the request body are ignored.

EndpointCapability
POST /v1/runtime/memory/*Hosted MemoryStore (save / recall / summary)
POST /v1/runtime/crawlHosted SiteCrawler (synchronous crawl)
POST /v1/runtime/email/sendHosted EmailSender (send a rendered email)
POST /v1/runtime/searchHosted WebSearcher (Exa search)
POST /v1/runtime/assetsHosted AssetStore (store an asset)

Each requires an Enterprise plan and returns the same 403 (BYOC_PLAN_REQUIRED) for ineligible accounts. See the API Reference for the full request and response schema of each endpoint.

The public POST /v1/assets first-class asset endpoint is not part of self-hosting and is available on every plan — only its runtime-family mount (POST /v1/runtime/assets) is Enterprise-gated.

Next steps