This guide will help you make your first Runtype API call and execute an AI flow.
Let’s verify your API key works by checking your profile:
The /dispatch endpoint is the main way to execute AI flows. Here’s a minimal example:
The inputs field lets you pass variables directly accessible as {{varName}} in templates.
For transient data, inputs provides cleaner syntax than record.metadata. Use record.metadata when you need data to persist with the record in the database.
The dispatch endpoint returns a Server-Sent Events (SSE) stream:
Install our TypeScript SDK for a better developer experience:
The withInputs() method passes data that’s accessible as {{varName}} in your prompts.
This is the recommended approach for passing dynamic data to flows.
If you already have a product described as JSON, you can preview and create it through Runtype’s import flow instead of building it step by step.
These flows power /now, “Deploy to Runtype” buttons, and other integrations that hand Runtype a complete product definition.