# main-image-detect

> main-image-detect is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Extracts the main representative image from any URL by preferring Open Graph/Twitter meta tags, then falling back to the largest declared content image, returning alt text, resolved URL, content type, and byte size.

## Facts

- Endpoint: GET https://intel.rallylive.ca/page/main-image
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/main-image-detect-e5f388e2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KxpJ1Ms7hVc8_d6h4H_B3

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 main-image-detect-e5f388e2
```

Example prompt: What's the main image for this URL — https://www.bbc.com/news/technology? Give me the resolved image URL, its content type, and file size.

## When to prefer this

Use this endpoint when you need a single representative thumbnail for any public URL without writing custom scraping logic. It is ideal for link-preview generation, content aggregation pipelines, and social-sharing audits where you want the canonical OG/Twitter image with fallback to the largest declared image — and you also need file metadata (content type, byte size) without downloading the full image.

## Known failure modes

- Page has no images and no OG/Twitter meta tags — returns null or empty image result
- Target URL is unreachable or returns non-2xx status — fetch fails with an error
- Image URL found in meta tags returns a 4xx/5xx on HEAD request — byte size and content type may be unavailable
- Page blocks crawlers via robots.txt or bot detection — HTML may not be accessible
- Redirects to a login wall or CAPTCHA page — no meaningful image can be detected

## How this service works

Main image of a page: the Open Graph / Twitter image when declared, else the largest content image by declared dimensions, with alt text, resolved URL, content type and byte size via a HEAD request. Get a representative thumbnail for any URL. $0.01 per page.

## Output

Returns the resolved URL of the main page image (Open Graph > Twitter Card > largest declared content image), along with its alt text, MIME content type, and byte size obtained via a HEAD request against the image URL.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/main-image-detect-e5f388e2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
