PayWeavePayWeaveBack to Home
Discovery

Skills API

The Skills API is a paginated JSON REST endpoint that returns all discoverable resources on the platform. It is the primary machine-readable interface for programmatic discovery, supporting filtering by type, full-text search, and cursor-based pagination.

Endpoints

GET/api/discovery/skills

Returns all discoverable skills across every workspace on the platform.

GET/api/discovery/:workspaceId/skills

Returns discoverable skills belonging to a single workspace. workspaceId must be a valid UUID. Returns 404 if the workspace does not exist.

Query parameters

ParameterTypeDefaultDescription
typegateway | function | fileFilter by skill type. Omit to return all types.
searchstringCase-insensitive search against name and description.
limitinteger (1–200)50Maximum number of skills to return.
offsetinteger (≥ 0)0Number of skills to skip for pagination.

Response shape

The response is a SkillSet object:

JSON
{
  "platform": "PayWeave",
  "version": "0.1.0",
  "scope": "global",              // "global" | "workspace"
  "workspaceId": "uuid",          // present when scope is "workspace"
  "workspaceName": "Acme AI Labs", // present when scope is "workspace"
  "skills": [ /* Skill[] */ ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 142
  },
  "generatedAt": "2026-04-02T10:30:00.000Z"
}

Each entry in skills is a Skill object:

JSON
{
  "id": "gw_abc123",             // unique public ID
  "type": "gateway",             // "gateway" | "function" | "file"
  "name": "Sentiment Analysis API",
  "description": "Analyse text sentiment using a fine-tuned model.",
  "baseUrl": "https://api.payweave.dev/gw/gw_abc123",
  "openApiUrl": "https://api.payweave.dev/gw/gw_abc123/openapi.json",
  "endpoints": [ /* SkillEndpoint[] */ ]
}

Each entry in endpoints is a SkillEndpoint object:

JSON
{
  "path": "/v1/analyse",
  "name": "Analyse Text",
  "description": "Returns a sentiment score between -1.0 and 1.0.",
  "methods": "POST",
  "priceUsd": "0.005",
  "inputSchema": { "text": { "type": "string" } },   // optional
  "exampleInput": { "text": "PayWeave is great!" },  // optional
  "exampleOutput": { "score": 0.92, "label": "positive" } // optional
}

Fetch example

JavaScript
const res = await fetch(
  'https://api.payweave.dev/api/discovery/skills?type=gateway&limit=10'
);
const data = await res.json();

for (const skill of data.skills) {
  console.log(skill.name, skill.openApiUrl);
  for (const ep of skill.endpoints) {
    console.log(`  ${ep.methods} ${ep.path} — $${ep.priceUsd}/call`);
  }
}

Pagination

JavaScript
async function fetchAllSkills() {
  const PAGE = 50;
  let offset = 0;
  const all = [];

  while (true) {
    const res = await fetch(
      `https://api.payweave.dev/api/discovery/skills?limit=${PAGE}&offset=${offset}`
    );
    const { skills, pagination } = await res.json();
    all.push(...skills);

    offset += PAGE;
    if (offset >= pagination.total) break;
  }

  return all;
}
Results are cached for five minutes. Only resources with discoverable = true and status = active are returned. Changes may take up to five minutes to appear.

OpenAPI specs

Every skill exposes a machine-readable OpenAPI 3.1 specification at its openApiUrl. The spec includes the x-payment-info extension on each operation describing the MPP payment intent, method, amount, and accepted currencies.