Quickstart: REST API
Use appgrammar from any language or tool that can make HTTP requests. No MCP client required.
1. Get a Token
You need a bearer token. Two options:
- MCP token — Sign in at appgrammar.com, go to MCP Setup, and generate a token
- Agent session token — Call
POST /api/agent/sessionswith no auth (see Quickstart: Agents)
All examples below use $TOKEN as a placeholder.
2. Search the Registry
Find an existing appgrammar to fork or use as a starting point:
curl https://appgrammar.com/api/registry?q=ecommerce&tags=saas&limit=5 \
-H "Authorization: Bearer $TOKEN"
Browse trending appgrammars:
curl https://appgrammar.com/api/registry/trending?limit=10&window_days=7 \
-H "Authorization: Bearer $TOKEN"
3. Fork an Appgrammar
curl -X POST https://appgrammar.com/api/appgrammars/APPGRAMMAR_ID/fork \
-H "Authorization: Bearer $TOKEN"
Returns the forked appgrammar with a new ID and slug.
4. Or Create One from Scratch
Start a tool operation to create an appgrammar:
curl -X POST https://appgrammar.com/api/tools/operations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tool_type": "create",
"params": {
"description": "Task management API with TypeScript and PostgreSQL",
"language": "typescript",
"framework": "Express"
}
}'
The response includes an operation ID and a token for the first step. Submit each of the 5 creation steps:
curl -X POST https://appgrammar.com/api/tools/operations/OPERATION_ID/submit \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"token": "STEP_TOKEN",
"submission": { }
}'
Each submission returns the next step's prompt and token. After all 5 steps, the appgrammar is ready.
5. Execute an Appgrammar
Start execution to get the first step, system prompt, and all stage tokens:
curl https://appgrammar.com/api/appgrammars/APPGRAMMAR_ID/start \
-H "Authorization: Bearer $TOKEN"
Walk through each step using the token from the previous response:
curl "https://appgrammar.com/api/appgrammars/APPGRAMMAR_ID/step/1?token=STEP_TOKEN" \
-H "Authorization: Bearer $TOKEN"
Continue until the response includes "dn": true (done).
6. Use Any Tool
All 25 tools (breed, splice, transmute, distill, etc.) use the same unified endpoint:
# Start a tool operation
curl -X POST https://appgrammar.com/api/tools/operations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tool_type": "transmute",
"source_appgrammar_ids": ["APPGRAMMAR_ID"],
"params": {}
}'
# Check status
curl https://appgrammar.com/api/tools/operations/OPERATION_ID \
-H "Authorization: Bearer $TOKEN"
# Cancel
curl -X POST https://appgrammar.com/api/tools/operations/OPERATION_ID/cancel \
-H "Authorization: Bearer $TOKEN"
Available tool types: breed, splice, shatter, weave, transmute, distill, amplify, style_transfer, subtract, intersect, difference, fuzz, inoculation, phenotyping, holographic_doc, swarm_partition, semantic_rollback, topological_search, upstream_shield.
Next Steps
- Quickstart: Agents — Self-provision sessions without a human account
- Agent Access — Full REST API reference for all endpoints
- Tool Operations Guide — How multi-turn tools work
- MCP Tools Reference — All 25+ tools (same functionality, MCP interface)