# ForwardLane Embedding Similarity Search

> ForwardLane Embedding Similarity Search is a paid API for AI agents from agents.forwardlane.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-19).

Performs cosine-similarity vector search over function embeddings to find semantically similar code functions or classes.

## Facts

- Endpoint: GET https://agents.forwardlane.com/api/embeddings/search
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forwardlane-embedding-similarity-search-a902fce2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cM1eS7oCFFgeCh42pk3cx

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 forwardlane-embedding-similarity-search-a902fce2
```

Example prompt: Search the ForwardLane code index for functions semantically similar to 'parse JWT token and validate expiry' — give me the top 10 results using the text-embedding-3-small model.

## When to prefer this

Choose this endpoint when you need to find semantically similar code functions or classes using natural language queries and vector similarity, rather than keyword or BM25 matching. Prefer it over the BM25+vector hybrid search sibling when you want pure cosine similarity over function embeddings specifically. Best when the user's query is conceptual or descriptive rather than exact-name based.

## Known failure modes

- Missing required 'q' query parameter returns a 400 validation error
- Invalid model name may cause embedding failure or fallback
- top_k values outside 1-200 range are rejected
- Domain filter that matches no indexed repositories returns empty results
- Payment not provided or insufficient USDC triggers 402 Payment Required

## How this service works

Cosine-similarity search over function embeddings.

## Output

Returns a ranked list of up to top_k function or class nodes with cosine similarity scores, function names, repository references, and relevant metadata, ordered by semantic similarity to the query.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string"
      },
      "model": {
       "type": "string",
       "default": "text-embedding-3-small"
      },
      "top_k": {
       "type": "integer",
       "default": 20,
       "maximum": 200,
       "minimum": 1
      },
      "domain": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forwardlane-embedding-similarity-search-a902fce2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.forwardlane.com](https://www.zero.xyz/host/agents.forwardlane.com/llms.txt)
