{"uid":"cap_cM1eS7oCFFgeCh42pk3cx","slug":"forwardlane-embedding-similarity-search-a902fce2","name":"ForwardLane Embedding Similarity Search","description":"Cosine-similarity search over function embeddings.","url":"https://agents.forwardlane.com/api/embeddings/search","method":"GET","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JlwO9blEuz2LnyD8jvcqZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs cosine-similarity vector search over function embeddings to find semantically similar code functions or classes.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Discover similar utility functions","prompt":"Find me the top 15 functions in the codebase that are semantically similar to 'serialize JSON to binary format' — I want to see if there are any existing implementations I can reuse."},{"title":"Cross-repo authentication code discovery","prompt":"Search for functions related to 'OAuth2 token refresh and session management' across the auth domain, return the top 20 most similar results."},{"title":"Locate ML preprocessing routines","prompt":"Can you find code functions similar to 'normalize numerical features and handle missing values for a machine learning pipeline'? Give me the top 5 matches."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-19T12:33:06.571Z","isFirstParty":false}