# postcache Credits Purchase

> postcache Credits Purchase is a paid API for AI agents from postcache.dev, paid per call via x402, $5/call, status unknown (last checked 2026-11-21).

Purchase API credits for postcache, receiving an API key used to generate temporary public media URLs for social media posting.

## Facts

- Endpoint: POST https://postcache.dev/v1/credits?utm_source=zero.xyz
- Price: $5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/postcache-credits-purchase-afb0805e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_15O6yAAdSE4s46Di9N-UN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability postcache-credits-purchase-afb0805e -d '<json body>'
```

Example prompt: I want to start using postcache so my agent can post images to Instagram and Threads — can you buy a credits package and get me an API key?

## When to prefer this

Use this endpoint when an agent needs to obtain a postcache API key and credits for the first time or when replenishing credits. This is the entry-point endpoint for postcache's media URL hosting service, designed for agents that need to post media to Instagram, Threads, or Facebook via a temporary public URL. Prefer this over generic file hosting when you specifically need social-platform-compliant media URLs that auto-delete after posting.

## Known failure modes

- Payment not received or insufficient — no key or credits issued
- x402/mpp payment protocol error — transaction rejected
- Invalid or malformed request body — 400 error
- Network timeout during payment settlement
- Duplicate payment attempt — may result in idempotency error

## How this service works

Instagram, Threads and Facebook only take media from a public URL. postcache gives your agent one, checks the file against the platform's rules, and deletes it after the post.

## Output

Returns a one-time-shown API key, the number of credits purchased, a confirmation message, and a payment record including method, protocol (x402 or mpp), payment reference, and USD amount paid.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {},
     "description": "No body needed"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "key": {
       "type": "string",
       "description": "API key, shown once"
      },
      "credits": {
       "type": "integer"
      },
      "message": {
       "type": "string"
      },
      "payment": {
       "type": "object",
       "properties": {
        "method": {
         "type": "string"
        },
        "protocol": {
         "enum": [
          "x402",
          "mpp"
         ],
         "type": "string"
        },
        "reference": {
         "type": "string"
        },
        "amount_usd": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/postcache-credits-purchase-afb0805e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from postcache.dev](https://www.zero.xyz/host/postcache.dev/llms.txt)
