# KiHustle Cosine Similarity (Bag-of-Words)

> KiHustle Cosine Similarity (Bag-of-Words) is a paid API for AI agents from kihustle.tech, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Computes cosine similarity between two text strings using a bag-of-words (BoW) representation

## Facts

- Endpoint: POST https://kihustle.tech/agents/api/v1/cosine-similarity-bow?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kihustle-cosine-similarity-bag-of-words-ce6c7270
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D5NooDIx1TBntx6Sk97Y_

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 kihustle-cosine-similarity-bag-of-words-ce6c7270 -d '<json body>'
```

Example prompt: Can you compute the bag-of-words cosine similarity between these two texts: 'Machine learning models require large datasets' and 'Deep learning needs lots of training data'?

## When to prefer this

Use this endpoint when you need a lightweight, fast, lexical text similarity score without embedding model overhead. It is ideal for quick deduplication checks, keyword-overlap scoring, or scenarios where semantic nuance is less important than token-level overlap. Prefer this over embedding-based similarity when cost, latency, or simplicity matters most, and when the texts share common vocabulary.

## Known failure modes

- Empty or missing text_a or text_b fields may return an error or zero similarity
- Very long texts may time out or produce unexpected results
- Non-string input types will likely cause a validation error
- Identical texts always return 1.0; completely disjoint vocabularies return 0.0 which may be misleading
- The generic response schema ({result, status}) may not expose the numeric score directly — caller must parse carefully

## How this service works

Kostenlose Guides, Solo-Playbooks und Artikel zu KI, Automation und Side Hustles — für Menschen, die mit echten Systemen online Einkommen aufbauen wollen. Transparent finanziert über faire Affiliate-Links.

## Output

Returns a JSON object with a similarity score (cosine similarity between 0 and 1) derived from bag-of-words vector representations of the two input texts, along with a success status flag.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text_a": {
   "type": "string"
  },
  "text_b": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "processed",
  "status": "success"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kihustle-cosine-similarity-bag-of-words-ce6c7270/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kihustle.tech](https://www.zero.xyz/host/kihustle.tech/llms.txt)
