# AGISHub URL Shortener

> AGISHub URL Shortener is a paid API for AI agents from api.agishub.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Shortens a long URL into a compact api.agishub.com/s/<code> redirect link stored for one year.

## Facts

- Endpoint: GET https://api.agishub.com/v1/shorten
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agishub-url-shortener-0296b514
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u-rY5cH810yOe7-2POAJY

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 agishub-url-shortener-0296b514
```

Example prompt: Can you shorten this URL for me so I can share it more easily? Here's the long link: https://www.example.com/some/very/long/path?with=lots&of=query&parameters=here

## When to prefer this

Choose this endpoint when you need a quick, no-auth-key URL shortener that charges per-use via x402 micropayment. Ideal for agents that need to shorten URLs on demand without managing a URL shortening account or API key. The one-year code persistence is suitable for most sharing scenarios.

## Known failure modes

- Invalid or malformed URL input returns an error — must be a valid http/https URI
- Non-HTTP/HTTPS schemes (e.g. ftp://) may be rejected
- Payment failure (402) if USDC balance is insufficient
- Service unavailability or timeout for downstream storage issues

## How this service works

Shorten a long URL into a compact api.agishub.com/s/<code> link that redirects to the original. Codes are stored for a year.

## Output

Returns a JSON object with a shortened URL in the form api.agishub.com/s/<code> that redirects to the original long URL. The code persists for one year.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "The long http/https URL to shorten."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "Shorten a long URL into a compact api.agishub.com/s/<code> link that redirects to the original. Codes are stored for a y"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agishub-url-shortener-0296b514/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agishub.com](https://www.zero.xyz/host/api.agishub.com/llms.txt)
