An API Surface turns your Flows and Agents into ready-to-use REST API endpoints. Once set up, any application can call your AI Capabilities using standard HTTP requests.
You can create an API Surface when setting up a new Product with the REST API template, or add one to an existing Product at any time. If you need more context first, see What are Surfaces?.
Before you begin: You need a Product with at least one Capability attached. If you have not created the Product yet, see Creating a Product.
Runtype creates the API Surface and generates a REST endpoint for each Capability attached to the Product.
First-time setup may show a Launch Your API guide with steps for getting your API key and trying an example request.
Runtype creates the Product and API Surface together, then generates endpoints and a test API key so you can start right away.
Use the tabs in the Surface panel to configure and manage your API Surface.
API Surfaces use API keys for authentication. Every request must include a valid key.
All API keys use the papi_ prefix. You can send them with the Authorization header as a Bearer token or with the X-API-Key header.
Store API keys securely. Test keys are rate-limited for development. Use a Production key when you are ready to go live.
Use the Overview tab to control whether the API Surface is available.
Use Paused when you need to take the API offline for maintenance without changing the rest of the configuration.
In the Overview tab, response settings control how your API returns results.
For multi-step Flows, you can also choose which step output to return as the final response.
Runtype automatically generates an OpenAPI 3.0 specification for every API Surface. You can use it with tools like Postman, Swagger UI, or code generators.
Find the spec in the Endpoints tab in JSON or YAML format, or access it directly at:
The spec updates automatically when you add or change Capabilities.
Use the Ship tab for ready-to-use TypeScript and cURL examples.
Once the API Surface is active, each Capability gets its own endpoint. Find the exact URLs in the Endpoints or Ship tab.
The {capabilitySlug} value is generated from the Capability name. For example, Summarize Article becomes summarize-article.