Developer Portal
← Back to Developer Hub
Agent Documentation
Everything you need to connect AI agents to the Zynocode tool platform.
REST API
Base URL: https://labs.zynocode.com/api/v1
Execute any tool by posting to /api/v1/tools/{slug}.
POST /api/v1/tools/json-formatter
Content-Type: application/json
Authorization: Bearer zyno_ak_...
{
"jsonText": "{\"name\":\"test\"}",
"indent": 2
}Response:
{
"success": true,
"data": "{\n \"name\": \"test\"\n}",
"executionTimeMs": 3
}OpenAPI spec: GET /api/v1/openapi.json
MCP Server
JSON-RPC 2.0 endpoint: POST /api/v1/mcp
SSE stream: GET /api/v1/mcp
All 76 tools are auto-registered. Protocol version: 2024-11-05.
Supported Methods
initialize— Handshake and capabilitiestools/list— List all tools with schemastools/call— Execute a toolping— Health check
// tools/call example
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "emi_calculator",
"arguments": {
"params": { "principal": 1000000, "rate": 8.5, "tenureYears": 15 }
}
}
}Manifest URL: GET /api/v1/mcp/manifest
CLI
# Install globally
npm install -g zynocode
# Or run with npx
npx zynocode
# Commands
zynocode login <api-key>
zynocode tools [--category=X] [--json]
zynocode search <query>
zynocode run <slug> --param key=value [--stream]
zynocode config [list|get|set]
zynocode doctor
zynocode version
# Start as MCP server for IDEs
zynocode mcp-serveSDK
import { ZynocodeClient } from "@zynocode/sdk";
const client = new ZynocodeClient({ apiKey: "zk_live_..." });
// List tools
const { tools, count } = await client.listTools();
// Execute tool
const result = await client.executeTool<{ sha256: string; sha512: string }>("hash-generator", {
text: "Hello World",
});
console.log(result.status, result.result.sha256);Authentication
Pass API key as Bearer token in the Authorization header.
Authorization: Bearer zyno_ak_abc123...Token Types
| Type | Prefix | Use Case |
|---|---|---|
| API Key | zyno_ak_ | Server-to-server, CI/CD |
| Workspace | zyno_ws_ | Team-wide access |
| Personal | zyno_pt_ | Individual dev use |
| Session | zyno_st_ | Temporary, TTL-based |
Create keys: POST /api/v1/auth/keys
Session tokens: POST /api/v1/auth/token
Streaming
SSE streaming for long-running tools.
POST /api/v1/tools/{slug}/stream
Content-Type: application/json
Authorization: Bearer zyno_ak_...
{ "params": { ... } }Event types: progress, log, event, completion, error.
Examples
Python
import requests
r = requests.post(
"https://labs.zynocode.com/api/v1/tools/word-counter",
headers={"Authorization": "Bearer zyno_ak_..."},
json={"text": "Hello world this is a test"},
)
print(r.json()) # {"success": true, "data": {"words": 6, ...}}Go
resp, _ := http.Post(
"https://labs.zynocode.com/api/v1/tools/uuid-generator",
"application/json",
bytes.NewBuffer([]byte(`{"count": 5}`)),
)cURL
curl -X POST https://labs.zynocode.com/api/v1/tools/password-generator \
-H "Authorization: Bearer zyno_ak_..." \
-H "Content-Type: application/json" \
-d '{"length": 32, "uppercase": true, "symbols": true}'