Appearance
Your First Request
This page walks through making your first API calls to Universal API.
TIP
If you haven't set up authentication yet, start with the Quick Start guide.
Check Your Account
bash
curl -s https://api.universalapi.co/user/info \
-H "Authorization: Bearer YOUR_TOKEN" | jqjson
{
"authenticated": true,
"userId": "d468e4e8-...",
"alias": "yourname",
"credits": 100,
"subscriptionTier": "free",
"needsAlias": false
}Call an MCP Server Tool
MCP servers expose tools via the Model Context Protocol. You can call them directly:
bash
curl -s -X POST https://mcp.api.universalapi.co/mcp/s/snowtimber/serpapi \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"method": "tools/call",
"params": {
"name": "google_search",
"arguments": {"query": "Universal API MCP servers"}
}
}' | jqINFO
MCP servers are designed to be used by AI clients (Claude, Cline) via the MCP protocol. Direct HTTP calls work but the primary use case is connecting them to your AI assistant. See Quick Start.
Chat with an Agent
Agents use a dedicated streaming endpoint:
bash
curl -s -X POST https://stream.api.universalapi.co/agent/AGENT_ID/chat \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt": "What can you help me with?"}'The response streams back as text, followed by metadata:
I can help you with many things! I have access to tools for...
__META__{"conversationId":"conv-xxx","agentId":"agent-xxx","bedrockProvider":"platform"}
__METRICS__{"totalCycles":1,"totalTokens":500,"toolsUsed":[]}To continue the conversation, include the conversationId:
bash
curl -s -X POST https://stream.api.universalapi.co/agent/AGENT_ID/chat \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt": "Tell me more about that", "conversationId": "conv-xxx"}'Search for Resources
Find resources using semantic search — no auth required for public resources:
bash
curl -s "https://api.universalapi.co/search?q=send+email&type=mcp-tool&limit=5" | jqWhat's Next?
- Authentication — Deep dive into tokens, keys, and security
- Core Concepts — Credits, pricing, resource types
- Creating MCP Servers — Build your own tools
- Creating Agents — Build conversational AI