For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
  • Getting Started
    • What is Runtype?
    • Creating your account
    • Platform Keys vs. BYOK
    • Understanding the Runtype UI
    • Quickstart: Social Media Post Generator
    • Quickstart: From Agent to Chat Widget
  • Dashboard
    • What is the Dashboard?
    • Daily Executions
  • Playground
    • What is the Playground?
  • Products & Surfaces
    • What are Products?
    • What are Surfaces?
    • Creating a Product
    • Setting up a Chat Surface
    • Setting up an API Surface
    • Setting up an MCP Surface
    • Setting up an A2A Surface
    • Setting up a Slack Surface
  • Flows
    • What are Flows?
    • Creating and Editing Flows
    • Flow step types overview
    • Agent and Flow Templates
  • Agents
    • What are Agents?
    • Creating and configuring Agents
    • Agent tools
  • Records
    • What are Records?
    • Creating and managing records
  • Tools
    • What are Tools?
    • Built-in Tools
    • Creating custom tools
    • Creating external tools
  • Evals
    • What are Evals?
    • Running an Eval
  • Schedules
    • What are Schedules?
  • Logs
    • What are Logs?
  • Integrations
    • Connecting AI model providers
  • Settings
    • What's in Settings?
    • Available AI models
  • Troubleshooting & FAQ
    • FAQ
    • Rate Limits and Usage
    • Managing Runtype with Claude
Dashboard
LogoLogo
On this page
  • What you’ll build
  • Step 1: Create a Flow
  • Step 2: Test your Flow
  • Step 3: Create a Product and Surface
  • Step 4: Call your endpoint
  • Next steps
Getting Started

Quickstart: Build a Social Media Post Generator as a REST API

Was this page helpful?
Previous

Quickstart: From Agent to Chat Widget

Next
Built with

This quickstart shows you how to build a simple Flow, package it in a Product, and make it available through a REST API Surface from the Runtype dashboard.

New to these concepts? Start with What are Flows?, What are Products?, and What are Surfaces?.

What you’ll build

You’ll create a Flow that turns website content into social media posts, then deploy it as a live REST API endpoint you can call from any application.

Step 1: Create a Flow

You’ll build a Flow with two steps: one to fetch website content and one to generate social posts from it.

  1. From the dashboard, click Flows in the sidebar.
  2. Click Create Flow.
  3. Select Start from scratch.
  4. Click the + button to add your first step.
  5. Select Fetch URL as the step type.
  6. Configure the step to use Firecrawl (Web Scraping).
  7. In the URL field, enter {{website}}. This creates a variable you’ll fill in each time you run the Flow.
  8. Click the + button to add a second step, then select Run Task. This is where you’ll write the AI prompt that processes the fetched content. To learn more, see creating and editing Flows.
  9. Paste the following into the User instructions field:
Here is website content:
{{fetch_result}}
Generate three social media posts for this article. Return a JSON object with these keys:
- "twitter" (under 280 characters)
- "linkedin" (2-3 paragraphs, professional tone)
- "instagram" (casual, with emoji suggestions)
  1. Name your Flow Website Content to Social Media Content.
  2. Click Create.

The double-curly-brace syntax ({{variable}}) lets you pass dynamic values into your Flow. Any step can reference variables set by earlier steps. Here, {{fetch_result}} contains the output from the Fetch URL step.

Step 2: Test your Flow

Before deploying, make sure the Flow works as expected.

  1. Click Run on your Flow.
  2. Enter a URL such as https://runtype.com for the website field.
  3. Click Run Flow.
  4. Review the response and confirm it includes posts for Twitter, LinkedIn, and Instagram.

If the output does not look right, go back and adjust the prompt in the Run Task step. You can iterate as many times as you need.

Step 3: Create a Product and Surface

A Product groups your Flows and Agents for deployment. Each Product has one or more Surfaces that people or applications use to interact with your Capabilities, and one or more Capabilities that are powered by your Flows or Agents.

  1. Click Products in the sidebar.
  2. Click + New Product.
  3. Select REST API as the Surface type.
  4. Enter a name for the Product, such as Social Media Post Generator.
  5. Under the Capability option, choose Use Existing, then select Flows.
  6. Find and select the Flow you created earlier: Website Content to Social Media Content.
  7. Click Create.

Runtype creates a Product with your Flow attached as a Capability and a REST API Surface ready to accept requests.

Step 4: Call your endpoint

Your Surface is live. Open your new Product to find the endpoint URL and API key.

curl

$curl -X POST https://api.runtype.com/v1/products/YOUR_PRODUCT_ID/surfaces/YOUR_SURFACE_ID/api/dispatch \
> -H "Authorization: Bearer YOUR_SURFACE_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "inputs": {
> "website": "https://runtype.com"
> }
> }'

TypeScript

1const response = await fetch(
2 'https://api.runtype.com/v1/products/YOUR_PRODUCT_ID/surfaces/YOUR_SURFACE_ID/api/dispatch',
3 {
4 method: 'POST',
5 headers: {
6 'Authorization': 'Bearer YOUR_SURFACE_API_KEY',
7 'Content-Type': 'application/json',
8 },
9 body: JSON.stringify({
10 inputs: { website: 'https://runtype.com' },
11 }),
12 }
13);

Replace YOUR_PRODUCT_ID, YOUR_SURFACE_ID, and YOUR_SURFACE_API_KEY with the values shown on your Product page.

You now have a working REST API that turns any article into social media content, ready to integrate into your app, CMS, or automation workflow.

Next steps

  • Flow step types overview to build more advanced Flows
  • What are Tools? to understand how Flows and Agents can call external systems and built-in capabilities
  • What are Logs? to troubleshoot executions
  • Creating and managing Records to add structured context to your Flows
  • What are Evals? to compare prompts and models side by side