Skip to main content
POST
/
api
/
v1
/
context
/
search
/
steer
curl --request POST \
  --url https://platform-backend.getalchemystai.com/api/v1/context/search/steer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "What did the customer ask about pricing for the Scale plan?",
  "similarity_threshold": 0.8,
  "minimum_similarity_threshold": 0.5,
  "scope": "internal"
}
'
{
  "answer": "<string>",
  "model": "poolside/laguna-m.1",
  "usage": {
    "inputTokens": 123,
    "outputTokens": 123,
    "totalTokens": 123
  },
  "context": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

mode
enum<string>
default:standard

Controls the search mode:

  • mode=fast -> prioritizes speed over completeness.
  • mode=standard -> performs a comprehensive search (default if omitted).
Available options:
fast,
standard
context
boolean
default:false

When set to true, the response includes the joined context string used to ground the answer. Defaults to false (only answer, model, and usage are returned).

Body

application/json
query
string
required

The search query and question to be answered using retrieved context

Example:

"What did the customer ask about pricing for the Scale plan?"

similarity_threshold
number
required

Maximum similarity threshold (must be >= minimum_similarity_threshold)

Required range: 0 <= x <= 1
Example:

0.8

minimum_similarity_threshold
number
required

Minimum similarity threshold

Required range: 0 <= x <= 1
Example:

0.5

user_id
string
deprecated

The ID of the user making the request

Example:

"user123"

steeringPrompt
string

The steering prompt for the query - basically the way in which you want to get your answer as.

Example:

"Return only the basic details of the person in a structured JSON schema with the fields \"name\", \"status\", \"location\""

scope
enum<string>
default:internal

Search scope

Available options:
internal,
external
body_metadata
object

Additional metadata for the search

Response

Successfully retrieved context and generated an answer.

answer
string
required

The LLM-generated answer based on the retrieved context

model
string
required

The model used to generate the answer (currently poolside/laguna-m.1)

Example:

"poolside/laguna-m.1"

usage
object
required

Token usage information from the LLM

context
string

The joined context retrieved from the context processor. Only present when the request was made with ?context=true.