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

View Full API Reference Documentation →

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 capabilities
  • tools/list — List all tools with schemas
  • tools/call — Execute a tool
  • ping — 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

View Full MCP Server Documentation & Setup →

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-serve

View Full CLI Reference & Options →

SDK

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);

View Full @zynocode/sdk Package Guide →

Authentication

Pass API key as Bearer token in the Authorization header.

Authorization: Bearer zyno_ak_abc123...

Token Types

TypePrefixUse Case
API Keyzyno_ak_Server-to-server, CI/CD
Workspacezyno_ws_Team-wide access
Personalzyno_pt_Individual dev use
Sessionzyno_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}'