Inference API Overview
The Hindsight Inference API serves the models behind Hindsight's own retrieval to your applications directly:
| Endpoint | What it does | Compatible with |
|---|---|---|
POST /v1/rerank | Orders documents by relevance to a query | Cohere Rerank |
POST /v1/embeddings | Turns text into vectors for semantic search | OpenAI Embeddings |
Both endpoints speak an existing, widely supported format, so in most cases you switch by changing the base URL and API key in a client you already use.
Base URL
https://inference.hindsight.vectorize.io/v1
Authentication
The Inference API uses the same organization API keys as the rest of Hindsight Cloud. Send the key as a bearer token:
Authorization: Bearer hs_your_api_key
Create and manage keys from API Keys in the Inference console, or from the main Hindsight Cloud console. See API Keys.
Pricing and Credits
Both endpoints bill on input tokens only. Neither produces output tokens.
| Endpoint | Price |
|---|---|
| Reranking | $0.05 per 1M input tokens |
| Embeddings | $0.01 per 1M input tokens |
Charges come out of your organization's single credit balance, the same balance that pays for memory operations. There is no separate wallet to top up. See Billing.
Before each request, the API checks your balance against the most the request could cost. If the balance is too low it returns 402 without charging anything.
The Inference Console
Signing in to the Inference console with your Hindsight Cloud account gives you:
- Overview: the endpoint, model IDs, prices, and copy-paste quick-starts
- Playground: run a query against your own documents with reranking or embeddings, side by side
- Usage: input tokens, requests and cost over time, per product
- API Keys: create and revoke keys for your organization
- Billing: your shared credit balance and the per-product rates
Errors
Errors return a JSON body with a detail message.
| Status | Meaning | What to do |
|---|---|---|
400 | Invalid request (missing field, too many items, bad option) | Fix the request; detail names the field |
401 | Missing or invalid API key | Check the Authorization header |
402 | Not enough credits for this request | Top up from Billing |
404 | Unknown model | Use the model ID shown in the console |
429 | Capacity is busy | Retry after the Retry-After header (seconds) |
502 | The model backend failed | Retry; contact support if it persists |