# Gambit OCR — Pay with USDC on Base

> Gambit OCR — Pay with USDC on Base is a paid API for AI agents from gambit.barrioenergy.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-14).

Extracts text from a base64-encoded image using the GLM-OCR model, payable per-call via x402 USDC on Base at $0.03

## Facts

- Endpoint: POST https://gambit.barrioenergy.com/x402/ocr
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gambit-ocr-pay-with-usdc-on-base-6e6c086f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5xVXAtLV3KVmIx4qWRUVj

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 gambit-ocr-pay-with-usdc-on-base-6e6c086f -d '<json body>'
```

Example prompt: Can you read all the text from this image for me? Here it is as a base64 string: [base64_data]. Focus on the printed text in the main body.

## When to prefer this

Choose this endpoint when you need a pay-per-call OCR service with no subscription or API key setup, especially in agentic workflows that use x402 USDC micropayments on Base. Ideal for bots and agents that need lightweight, on-demand text extraction from images without pre-registering an account.

## Known failure modes

- Invalid or malformed base64 image data causes a parsing error
- Image with no readable text returns an empty or minimal text field
- Payment failure via x402/USDC on Base blocks the request before processing
- Unsupported image format or corrupted file yields an error response
- Very low-resolution or blurry images may return inaccurate or incomplete text

## How this service works

Gambit GPU shop. Humans: /signup ($1 credit), X-API-Key on /v1/*, QR Lightning top-up. Bots: L402 Lightning (LIVE) on /l402/*, x402 USDC on Base on /x402/*, or POST /v1/register ($0) then POST /v1/topup/lightning. Handwritten letter POST /x402/letter at $25.00 USDC. Funnel https://gambit.barrioenergy.com. Free probe GET|POST /x402/models.

## Output

A JSON object containing the extracted text string from the image under the 'text' field, and the model used ('glm-ocr:latest') under the 'model' field.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prompt": {
   "type": "string"
  },
  "image_b64": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "hello",
  "model": "glm-ocr:latest"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gambit-ocr-pay-with-usdc-on-base-6e6c086f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gambit.barrioenergy.com](https://www.zero.xyz/host/gambit.barrioenergy.com/llms.txt)
