> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apiosk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Examples

> Minimal copy-paste examples for discovery, metadata, execute, and publisher management.

# Examples

## MCP first-run setup

If you are using the local Apiosk MCP package, start with `apiosk_get_started` instead of assembling the first payment flow by hand.

```json theme={null}
{
  "wallet_label": "Starter wallet",
  "test_slug": "agent-json-diff",
  "test_input": {
    "before": { "ok": true },
    "after": { "ok": false }
  }
}
```

## Catalog discovery

```bash theme={null}
curl "https://gateway.apiosk.com/v1/apis?search=graph&limit=5"
```

## Metadata fetch

```bash theme={null}
curl https://gateway.apiosk.com/neural-sync-01/metadata
```

## Execute with raw default input

```bash theme={null}
curl -X POST https://gateway.apiosk.com/neural-sync-01/execute \
  -H "Content-Type: application/json" \
  -H "x-payment: <proof>" \
  -d '{
    "query": "What does Apiosk do?",
    "context": "Apiosk is a pay-per-call API marketplace for agents."
  }'
```

## Execute with explicit operation envelope

```bash theme={null}
curl -X POST https://gateway.apiosk.com/graph-nexus-api/execute \
  -H "Content-Type: application/json" \
  -H "x-payment: <proof>" \
  -d '{
    "operation": "extract",
    "input": {
      "text": "OpenAI partnered with Microsoft to scale AI infrastructure."
    }
  }'
```

## Register a listing

```bash theme={null}
curl -X POST https://gateway.apiosk.com/v1/apis/register \
  -H "Content-Type: application/json" \
  -H "x-wallet-address: <wallet>" \
  -H "x-wallet-signature: <signature>" \
  -H "x-wallet-timestamp: <timestamp>" \
  -H "x-wallet-nonce: <nonce>" \
  -d '{
    "name": "My API",
    "slug": "my-api",
    "endpoint_url": "https://example.com/api",
    "price_usd": 0.01,
    "description": "Public paid API",
    "owner_wallet": "<wallet>",
    "category": "compute"
  }'
```

## Update a listing

```bash theme={null}
curl -X POST https://gateway.apiosk.com/v1/apis/my-api \
  -H "Content-Type: application/json" \
  -H "x-wallet-address: <wallet>" \
  -H "x-wallet-signature: <signature>" \
  -H "x-wallet-timestamp: <timestamp>" \
  -H "x-wallet-nonce: <nonce>" \
  -d '{
    "owner_wallet": "<wallet>",
    "price_usd": 0.025,
    "description": "Updated public description",
    "active": true
  }'
```

## Minimal TypeScript metadata fetch

```ts theme={null}
const res = await fetch("https://gateway.apiosk.com/neural-sync-01/metadata");
const data = await res.json();
console.log(data);
```
