# Citiview Context Packer

> Citiview Context Packer is a paid API for AI agents from agents.citiviewgroup.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-14).

Extracts and ranks the most relevant passages from long texts or URLs to fit a user's question within a specified token budget, returning source-marked excerpts.

## Facts

- Endpoint: GET https://agents.citiviewgroup.com/v1/context?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/citiview-context-packer-4315c419
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eCv7_nPUQFr-ccGo3Gjtl

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 citiview-context-packer-4315c419
```

Example prompt: From these two URLs — https://example.com/article1 and https://example.com/article2 — extract only the passages most relevant to 'What are the main risks of lithium mining?' and pack them into 1500 tokens with source markers so I can use them in my next prompt.

## When to prefer this

Choose this endpoint when you need to fit relevant content from long documents or multiple web pages into a limited token window for an LLM prompt. It is especially useful when you have more source material than your context window can hold and need automatic relevance ranking and source attribution. Prefer it over full document retrieval when token efficiency matters, or over generic summarization when you need question-specific passage selection rather than a general summary.

## Known failure modes

- Missing 'question' parameter returns a validation error
- Unreachable or invalid URLs result in fetch errors for those sources
- Token budget set too low may return very few or truncated passages
- Overly broad questions may yield low-relevance passages
- Large numbers of long texts may increase latency or hit size limits
- Malformed URL format in the pipe-separated list causes parsing errors

## How this service works

Context packer: from long texts or URLs, picks the passages most relevant to your question and packs them into your token budget, with source markers. Fit more useful context into a prompt for less. Also callable as GET with the same fields as query parameters.

## Output

A set of the most relevant text passages extracted from the provided URLs or raw texts, trimmed to fit the specified token budget (default 2000 tokens), each annotated with source markers indicating which URL or text it came from.

## 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",
     "required": [
      "question"
     ],
     "properties": {
      "urls": {
       "type": "string",
       "description": "| separated"
      },
      "texts": {
       "type": "string",
       "description": "| separated or an array"
      },
      "question": {
       "type": "string"
      },
      "token_budget": {
       "type": "integer",
       "description": "Default 2000"
      }
     }
    }
   },
   "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/citiview-context-packer-4315c419/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.citiviewgroup.com](https://www.zero.xyz/host/agents.citiviewgroup.com/llms.txt)
