Agentic Endpoints Compress API

The Compress API from Agentic Endpoints — 1 operation(s) for compress.

Operations 1

POST /compress Token compression for LLMs #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agentic-endpoints-com:agentic-endpoints-com-compress-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

agentic-endpoints-com-compress-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: agentic-endpoints Compress API
  version: 1.0.0
  license:
    name: MIT
    identifier: MIT
  description: 'Pay-per-call utilities for autonomous agents. No signup, no API keys, no invoices: every endpoint answers HTTP 402 with a price and serves the request once payment is signed.'
servers:
- url: https://agentic-endpoints.com
tags:
- name: Compress
paths:
  /compress:
    post:
      summary: Token compression for LLMs
      description: Token compression for LLMs. Costs $0.010, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.
      operationId: compress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: Text to compress
                target_tokens:
                  type: number
                  description: Target token count
                strategy:
                  type: string
                  enum:
                  - extractive
                  - truncate
                  description: Compression strategy (default extractive)
              required:
              - text
            example:
              text: Long input text to be compressed before it is sent to a model.
              target_tokens: 100
              strategy: extractive
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                original_length: 5000
                compressed_length: 1200
                ratio: 0.24
                text: '...'
                strategy: extractive
        '402':
          description: Payment required. The body names the price and all three ways to pay, including the free trial that needs no wallet. The `payment-required` response header carries the same challenge base64-encoded, which is where x402 v2 clients read it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentRequired'
        '429':
          description: Rate limited.
      security:
      - creditToken: []
      - x402Payment: []
      - {}
      tags:
      - Compress
components:
  schemas:
    PaymentRequired:
      type: object
      description: Body of a 402. Every field is derived from the same challenge the caller is asked to sign, so it cannot quote a different price or recipient.
      properties:
        error:
          type: string
          const: payment_required
        price:
          type: string
          description: List price in dollars, e.g. $0.005
        resource:
          type: string
          description: The URL being charged for
        ways_to_pay:
          type: object
          description: The three routes in, cheapest first. free_trial needs no wallet, no signature, no account and no email.
          properties:
            free_trial:
              type: object
            prepaid_credit:
              type: object
            per_call_x402:
              type: object
        accepts:
          type: array
          description: The x402 challenge, echoed here for v1 clients that read it from the body rather than the payment-required header.
          items:
            type: object
        x402Version:
          type: number
      required:
      - error
      - ways_to_pay
  securitySchemes:
    creditToken:
      type: apiKey
      in: header
      name: X-Credit-Token
      description: A prepaid or trial balance. Get one free with no wallet and no account at POST https://agentic-endpoints.com/credits/trial, or buy credit at POST https://agentic-endpoints.com/credits/buy. Each call is debited at the route's list price and nothing is signed per request.
    x402Payment:
      type: apiKey
      in: header
      name: X-PAYMENT
      description: A signed x402 payment authorising this one call, built from the challenge returned with HTTP 402. Requires a funded wallet on Base; the credit token does not.