Hive Civilization Smsh API

The smsh API from Hive Civilization — 8 operation(s) for smsh.

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/smsh/compress Compress a prompt with smsh · Smsh Compress #
Ask an LLM
“How do I shrink a long prompt to save tokens?”
“Can I compress a prompt and have it signed or encrypted in the same step?”
Tell an agent
Compress this prompt: {text}.
Compress {text} using mode {mode} with fidelity target {fidelity_target}.
POST /v1/smsh/decompress Decompress an smsh-compressed prompt · Smsh Decompress #
Ask an LLM
“How do I turn an smsh-compressed prompt back into readable text?”
“Does decompression restore the structural dedup backreferences too?”
Tell an agent
Decompress {compressed}.
Expand this smsh output back to plain text: {compressed}.
POST /v1/smsh/compress/demo Try smsh compression for free · Smsh Compress Demo #
Ask an LLM
“Can I try prompt compression for free before paying?”
“What is the character limit on the free compression demo?”
Tell an agent
Run the free compression demo on {text}.
Try the demo compressor on {text} in {mode} mode.
GET /v1/smsh/health Check smsh service health · Smsh Health #
Ask an LLM
“Is the prompt compression service up?”
“How big is the smsh dictionary currently loaded?”
Tell an agent
Check the smsh service health.
Show smsh health, available modes and dictionary size.
GET /v1/smsh/v1_5/warmup Check or trigger v1.5 model warmup (GET) · Smsh V1 5 Warmup #
Ask an LLM
“Are the v1.5 compression models loaded yet?”
“Can I check warmup status with a simple GET?”
Tell an agent
Check the v1.5 warmup status via GET.
GET the smsh v1.5 warmup endpoint to see if models are loaded.
POST /v1/smsh/v1_5/warmup Pre-load v1.5 compression models (POST) · Smsh V1 5 Warmup #
Ask an LLM
“How do I warm up the compression models after a deploy to avoid a slow first call?”
“Is it safe to POST the warmup more than once?”
Tell an agent
POST to warm up the smsh v1.5 models.
Pre-load the v1.5 compression models into memory with a POST.
GET /v1/smsh/dictionary Get the smsh boilerplate dictionary · Smsh Dictionary #
Ask an LLM
“Which boilerplate phrases does smsh replace with sentinels?”
“Can I download the full compression dictionary?”
Tell an agent
Get the smsh boilerplate dictionary.
Show me all sentinel mappings used for compression.
GET /v1/smsh/modes List smsh compression modes · Smsh Modes #
Ask an LLM
“What compression modes are available and what ratio does each target?”
“Which smsh modes are v1 versus v2?”
Tell an agent
List all smsh compression modes.
Show the target ratio and description of each compression mode.
GET /v1/smsh/bench/summary Get the latest smsh benchmark summary · Smsh Bench Summary #
Ask an LLM
“How well does smsh compression perform in the latest benchmark?”
“Where can I get the live benchmark numbers for prompt compression?”
Tell an agent
Get the latest smsh benchmark summary.
Show me the most recent compression bench results.

Documentation

Specifications

Other Resources

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/thehiveryiq-com:thehiveryiq-com-smsh-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

thehiveryiq-com-smsh-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HiveMorph v0.1 Smsh API
  description: 'Polymorphic agent runtime — single shape (Merchant), single supermodel (W2 MERCHANT). Three gates: NEED + YIELD + CLEAN-MONEY.'
  version: 0.1.0
tags:
- name: smsh
paths:
  /v1/smsh/compress:
    post:
      tags:
      - smsh
      summary: Smsh Compress
      description: 'Compress a prompt using smsh.


        Modes:

        - smsh-lite: dictionary + whitespace (v1 fast)

        - smsh-std: + structural dedup (v1 default)

        - smsh-pq-std: + PQ signed envelope (ed25519 baseline, ML-DSA-65 target)

        - smsh-pq-sealed: + KEM encrypted + signed (x25519+AES-256-GCM, ML-KEM-768 target)

        - smsh-v2-learned: v1-std then judge-based learned pruning


        Optional: fidelity_target (0.0-1.0) triggers inference + fidelity check.'
      operationId: smsh_compress_v1_smsh_compress_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hivemorph__hive_smsh__routes__CompressRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/smsh/decompress:
    post:
      tags:
      - smsh
      summary: Smsh Decompress
      description: 'Reverse dictionary substitutions and strip the smsh decode header.

        Structural dedup backreferences (D1, D2, ...) are preserved.'
      operationId: smsh_decompress_v1_smsh_decompress_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecompressRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/smsh/compress/demo:
    post:
      tags:
      - smsh
      summary: Smsh Compress Demo
      description: 'Free demo of smsh compression. Caps:

        - input: 4000 chars max

        - modes: smsh-lite, smsh-std, smsh-pq-std, smsh-pq-sealed (no v2-learned)

        - fidelity_target: ignored (no inference run)

        Returns the same compression result shape as /v1/smsh/compress.'
      operationId: smsh_compress_demo_v1_smsh_compress_demo_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/hivemorph__hive_smsh__routes__CompressRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/smsh/health:
    get:
      tags:
      - smsh
      summary: Smsh Health
      description: Health check — returns ok, available modes, dictionary size. Free.
      operationId: smsh_health_v1_smsh_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/smsh/v1_5/warmup:
    get:
      tags:
      - smsh
      summary: Smsh V1 5 Warmup
      description: 'Pre-load LLMLingua-2 + MiniLM into memory. Returns load status.

        Idempotent; subsequent calls return cached status immediately.

        Free — useful after a deploy to amortize the first cold call.'
      operationId: smsh_v1_5_warmup_v1_smsh_v1_5_warmup_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - smsh
      summary: Smsh V1 5 Warmup
      description: 'Pre-load LLMLingua-2 + MiniLM into memory. Returns load status.

        Idempotent; subsequent calls return cached status immediately.

        Free — useful after a deploy to amortize the first cold call.'
      operationId: smsh_v1_5_warmup_v1_smsh_v1_5_warmup_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/smsh/dictionary:
    get:
      tags:
      - smsh
      summary: Smsh Dictionary
      description: Full boilerplate dictionary with sentinel mappings. Free.
      operationId: smsh_dictionary_v1_smsh_dictionary_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/smsh/modes:
    get:
      tags:
      - smsh
      summary: Smsh Modes
      description: List all modes with descriptions, target ratios, and v1/v2 labels. Free.
      operationId: smsh_modes_v1_smsh_modes_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/smsh/bench/summary:
    get:
      tags:
      - smsh
      summary: Smsh Bench Summary
      description: 'Serve the latest bench summary JSON. Updated after each bench run.

        Free — used by website to pull live numbers.'
      operationId: smsh_bench_summary_v1_smsh_bench_summary_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
components:
  schemas:
    DecompressRequest:
      properties:
        compressed:
          type: string
          title: Compressed
          description: Compressed text with smsh sentinels.
      type: object
      required:
      - compressed
      title: DecompressRequest
    hivemorph__hive_smsh__routes__CompressRequest:
      properties:
        text:
          type: string
          title: Text
          description: Prompt text to compress.
        mode:
          type: string
          title: Mode
          description: Compression mode.
          default: smsh-std
        fidelity_target:
          anyOf:
          - type: number
          - type: 'null'
          title: Fidelity Target
          description: If set (0.0-1.0), run inference on both raw and compressed, judge fidelity. If measured fidelity < target, response includes fallback='raw'.
        turn_index:
          anyOf:
          - type: integer
          - type: 'null'
          title: Turn Index
          description: Conversation turn index for smsh-v1 mode (0 = single-turn, >=2 = multi-turn cap 2.5x). Ignored by legacy modes.
          default: 0
      type: object
      required:
      - text
      title: CompressRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
x-provenance:
  method: harvested
  publisher: Hive Civilization
  source: https://receipts.thehiveryiq.com/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)