Aerostack
Browse AI endpoint templates now → Explore Templates

LLMs talk. This one works.

Any prompt.
A production API.

Write a system prompt. Connect your Aerostack workspace. Get a REST endpoint that reasons, calls tools, and returns structured JSON — not just text.

MCP Tools JSON Schema Streaming SSE API Key Auth Run History
// The problem

You don't need another chat completion.

LLM APIs return text — your product needs structured data

You parse JSON yourself, handle failures, retry on malformed output. Every time.

No tool access — the AI can answer but can't act

It can tell you what to do but can't query your database, update your CRM, or create a ticket.

Building the agentic loop is a project in itself

Tool selection, result parsing, conversation management, timeout handling, retry logic — weeks of work.

Locked to one LLM provider

Switch from OpenAI to Anthropic? Rewrite your tool calling format, response parsing, and error handling.

// How it works

Three steps. One endpoint.

1

Define the agent

Write a system prompt that describes what the agent does. Add an output schema if you want structured JSON.

The system prompt defines behavior. The output schema enforces structure. The AI follows both — and calls MCP tools when the prompt says to.

2

Connect your workspace

Attach an Aerostack workspace with your tools — database, CRM, GitHub, Slack, anything MCP-compatible.

The API key is SHA-256 hashed and stored. The raw key is returned once — never again. You can regenerate it anytime.

3

Call it from anywhere

Any HTTP client. Any language. No SDK required. One POST, structured response.

The agent reads your input, calls tools if needed (up to 10 iterations), and returns structured JSON matching your schema. All in one HTTP request.

// Trigger modes

Three ways to run. Same agent.

Call it like an API, wire it to events, or let it run on a schedule. Pick the trigger when you create the endpoint.

API (manual)

Call it on demand

A synchronous REST call. POST your input, get a structured response back — output, token usage, cost, latency, and the full tool-call history.

POST /api/run/:slug

Webhook

React to events

A passive listener that fires when an external service sends an event — Stripe payments, GitHub pushes, Slack messages. Includes retry logic and source filtering.

Inbound event → agent runs

Scheduled

Run on a schedule

Cron-driven autonomous execution. The agent runs on its own — daily reports, data sync, content generation — with no caller required.

cron: 0 9 * * *

// Why Aerostack

Not another wrapper API.

Side-by-side with the alternatives you've probably considered.

Feature Raw LLM API OpenAI Assistants Aerostack
Multi-step tool orchestration
Open MCP tool ecosystem
Structured JSON output (schema) ~
Multi-provider (Claude, GPT, Gemini...)
Stateless — one request, one response
Streaming SSE
Your own URL / slug
No SDK required (plain HTTP)
Per-run cost visibility (cents)
Charge consumers per call
Run history & audit trail ~
BYOK — zero platform markup

Stateless — no threads to manage

OpenAI Assistants need Threads, Runs, and polling. Here: one POST, one response. The agent loop runs inside that single request.

MCP tools — not proprietary functions

Your tools use the open MCP standard. Same tools work in your bot, your webhook processor, and your gateway — not locked to one vendor.

Monetize each call

Set price_per_run_cents on your endpoint. Consumers pay per call, deducted from their wallet. Built-in billing — no Stripe integration needed.

// Use cases

Pre-built templates. Ready to deploy.

Start from a proven pattern or build from scratch.

Extractor

Invoice Parser

Extract vendor, amount, due date, and line items from invoice text. Save to database.

Input:

Raw invoice text or PDF content

Output:

{ vendor, amount, due_date, line_items[] }

db__insert_invoice
Actor

Lead Enricher

Enrich a name + company with contact info, company size, and intent signals.

Input:

{ name, company }

Output:

{ email, role, company_size, intent_score }

crm__searchweb__lookup
Extractor

PR Code Reviewer

Review a pull request diff for bugs, security issues, and style violations.

Input:

PR diff text

Output:

{ bugs[], security[], style[], verdict }

github__get_file
Extractor

Resume Screener

Score a resume against job requirements. Identify skills gaps.

Input:

Resume text + job description

Output:

{ match_score, skills_gap[], recommendation }

Pipeline

SQL Query Generator

Convert natural language to SQL. Validate against schema. Run and return results.

Input:

"Show me all users who signed up last week"

Output:

{ sql, explanation, results[] }

db__querydb__schema
Actor

Email Drafter

Draft professional emails from context, intent, and tone preferences.

Input:

{ context, intent, tone }

Output:

{ subject, body }

crm__get_contact
// Real-time

Watch the agent think.

Streaming SSE shows every step — tool calls, results, and the final output — as they happen.

SSE stream
event: thinking
data: { "status": "loading_tools", "message": "Loading 6 workspace tools..." }
event: thinking
data: { "status": "llm_call", "iteration": 1 }
event: tool_call
data: { "tool": "db__search_invoices", "arguments": { "vendor": "Acme" } }
event: tool_result
data: { "tool": "db__search_invoices", "success": true, "latency_ms": 45 }
event: tool_call
data: { "tool": "db__insert_invoice", "arguments": { ... } }
event: tool_result
data: { "tool": "db__insert_invoice", "success": true, "latency_ms": 23 }
event: done
data: { "output": { "vendor": "Acme Corp", "amount": 4250 }, "usage": { ... } }
thinking

Status updates — loading tools, calling LLM, iteration count. Shows the agent is working.

tool_call

The agent decided to use a tool. Shows the tool name and arguments before execution.

tool_result

Tool execution completed. Shows success/failure and latency — your audit trail.

done

Agent loop complete. Contains the final output, parsed JSON, tool call summary, and cost breakdown.

error

Something went wrong. Contains the error message. Stream ends.

Build real-time UIs

Show users a live progress feed while the agent works. No polling. Standard EventSource API.

// Built in

Production features, not afterthoughts.

Everything you need to run an AI agent as a real API — included from day one.

Async + callback

Fire-and-forget for long-running agents. The request returns immediately and the result is POSTed to your callback URL when it is ready.

Bring your own key

Use your own OpenAI, Anthropic, Gemini, or Groq key for direct provider pricing — or run on Aerostack's managed key. Your choice per endpoint.

JSON schema validation

Declare an output schema and the agent's JSON is validated against it — a stable contract your downstream code can depend on.

Per-endpoint rate limits

Set a request-per-minute limit on each endpoint. API-key or public auth, with a per-IP cap in public mode.

Run history + analytics

Every endpoint tracks total runs, success rate, average latency, cost, token usage, top tools called, and error breakdowns over time.

Your first agent endpoint.
60 seconds.

System prompt. Workspace. Done. You have a production API.

Frequently asked questions

What is an AI agent endpoint?
An agent endpoint is a REST API that wraps an AI agent — it accepts requests, runs LLM reasoning with tool calls, and returns structured JSON. No server management required.
How do I create an agent endpoint on Aerostack?
Write a system prompt, connect your MCP workspace for tool access, and Aerostack generates a REST endpoint. Deploy in under a minute.
Does the agent endpoint support streaming responses?
Yes. Agent endpoints support both streaming via SSE and synchronous JSON responses. Choose per-request via a query parameter.
Can agent endpoints call MCP tools?
Yes. When creating an endpoint, connect your workspace. The endpoint's agent will have access to all tools in that workspace during reasoning.
What LLMs can I use with agent endpoints?
Aerostack supports Claude, GPT-4o, Gemini, and Groq. Select the model when configuring the endpoint.
How do I turn a prompt into a REST endpoint?
Open the creation wizard, write a system prompt that describes what the agent should do, connect an MCP workspace if it needs tools, pick a model, and deploy. Aerostack gives you a live REST endpoint at /api/run/your-slug that you can call from any HTTP client.
Can I run an AI agent on a schedule?
Yes. Each endpoint has a trigger mode. Choose the scheduled mode and set a cron expression, such as 0 9 * * * for every day at 9am, and the agent runs automatically with no caller required. This is ideal for daily reports, data sync, and recurring content generation.
What is the difference between an agent endpoint and a webhook?
They are two trigger modes for the same agent. A manual endpoint is a synchronous API you call and wait for a response. A webhook endpoint is a passive listener that runs when an external service sends an event, such as a Stripe payment or a GitHub push, with built-in retry logic. You can also run the same agent on a cron schedule.
What is async mode in agent endpoints?
Async mode is a fire-and-forget pattern for long-running agents. Instead of holding the connection open, the request returns immediately and Aerostack delivers the result to a callback URL you provide once the agent finishes. This avoids client timeouts on tasks that take a while.
Can I use my own OpenAI or Anthropic API key?
Yes. Each endpoint supports bring your own key, so you can supply your own OpenAI, Anthropic, Gemini, or Groq key and pay the provider directly. Alternatively you can run on the Aerostack managed key. You choose per endpoint.
How do I get structured JSON from an AI agent API?
Set the output format to JSON and declare an output schema when you create the endpoint. The agent returns JSON validated against that schema, so downstream code can rely on the shape. Endpoints can also return plain text or markdown.