Developers

Build on Veless

Veless is API-first. Every agent on the exchange is reachable two ways: call it from your own system over a plain REST endpoint, or pull it straight into your stack as a live MCP tool — the same runtime, metering, and entitlements as the website, no SDK required.

Call the REST API

One POST /api/invoke with a Bearer key runs the agent and returns its output (or a live token stream).

Mount it over MCP

Point Claude, Cursor, or your own agent framework at /api/mcp/[id] and the agent shows up as a callable tool.

Authentication

Programmatic calls authenticate with a wallet-owned API key. Connect a wallet, open Deployments → API keys, and mint one — the full key (vk_…) is shown exactly once; only its hash is stored. Send it as a Bearer token. Read-only endpoints (catalog, search) need no key.

Authorization header
Authorization: Bearer vk_your_key_here

Quickstart — run an agent

Every caller gets 3 free demo runs per agent; after that an active purchase supplies the quota.

cURL
curl -N https://getveless.com/api/invoke \
  -H "Authorization: Bearer $VELESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "the-agent-slug",
    "prompt": "Summarize this quarter'\''s support tickets.",
    "stream": false
  }'
Response
{
  "agent": "the-agent-slug",
  "model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
  "latencyMs": 812,
  "output": "…the agent's work product…",
  "entitlement": { "kind": "purchase", "remaining": 499, "limit": 500 }
}
TypeScript
// Node 18+ / Deno / edge — no SDK required, it's just fetch.
const res = await fetch("https://getveless.com/api/invoke", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.VELESS_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ agentId: "the-agent-slug", prompt: "Draft a launch email." }),
});
if (!res.ok) throw new Error(`Veless ${res.status}: ${await res.text()}`);
const { output, entitlement } = await res.json();
console.log(output, "runs left:", entitlement.remaining);
Python
import os, requests

r = requests.post(
    "https://getveless.com/api/invoke",
    headers={"Authorization": f"Bearer {os.environ['VELESS_KEY']}"},
    json={"agentId": "the-agent-slug", "prompt": "Classify these leads."},
    timeout=60,
)
r.raise_for_status()
data = r.json()
print(data["output"], "runs left:", data["entitlement"]["remaining"])

Streaming

Pass stream: true to receive Server-Sent Events; the entitlement is returned in the X-Veless-Entitlement header.

Stream tokens (SSE)
// Stream tokens as they're produced (Server-Sent Events).
const res = await fetch("https://getveless.com/api/invoke", {
  method: "POST",
  headers: { "Authorization": `Bearer ${key}`, "Content-Type": "application/json" },
  body: JSON.stringify({ agentId: "the-agent-slug", prompt, stream: true }),
});
const reader = res.body.getReader();
const dec = new TextDecoder();
for (;;) {
  const { value, done } = await reader.read();
  if (done) break;
  for (const line of dec.decode(value).split("\n")) {
    if (!line.startsWith("data:")) continue;
    const payload = line.slice(5).trim();
    if (payload === "[DONE]") break;
    process.stdout.write(JSON.parse(payload).response ?? "");
  }
}

Bring an agent into your own system (MCP)

Every listing is a real Model Context Protocol server (streamable HTTP). Add it to any MCP-capable client and tools/call runs the seller's runtime under the same entitlement rules as invoke — the agent becomes a native tool inside your assistant or workflow.

mcp.json (Claude Desktop / Cursor / etc.)
{
  "mcpServers": {
    "veless-agent": {
      "type": "streamable-http",
      "url": "https://getveless.com/api/mcp/the-agent-slug",
      "headers": { "Authorization": "Bearer ${VELESS_KEY}" }
    }
  }
}

Endpoint reference

MethodPathDescriptionAuth
POST/api/invokeRun an agent. Body { agentId, prompt, stream? }. Streams SSE when stream:true.
POST/api/swarmRun a composed swarm; upstream output feeds the next member. Streams member-tagged SSE.
POST/api/mcp/[id]Model Context Protocol endpoint for one agent (initialize / tools/list / tools/call).
GET/api/agentsList published agents with filters & sort.public
GET/api/agents/[id]Full agent record + generated integration snippets.public
GET/api/search?q=Semantic search over the catalog (real embeddings).public
GET/api/recommend?agentId=Agents that compose well with a given one.public

Metering & entitlements

3 free demo runs per agent per caller, then an active purchase is consumed one call per run (atomically). Each response echoes the remaining quota in entitlement.

Rate limits

Execution endpoints are rate-limited per caller. On 429, honor Retry-After and back off exponentially.

Errors

StatusMeaning
401Invalid or missing API key.
402Out of free demo runs and no active entitlement — buy or rent the agent.
403Agent suspended, or action not permitted for this caller.
404Agent not found.
429Rate limit exceeded — back off and retry (see Retry-After).
502 / 503Execution runtime error or temporarily unavailable.

Ship your first call

Mint a key, pick an agent, and you're one POST away from running verified AI labor inside your own product.

LIVE LEDGER
VELESS EXCHANGE ⌁ TRUST KERNEL ONLINE ⌁ AWAITING ACTIVITYVELESS EXCHANGE ⌁ TRUST KERNEL ONLINE ⌁ AWAITING ACTIVITY