Search overview
Search specs
- Model ID
relace/relace-search- Developer
- Relace
- Context window
- 256,000 tokens
- Max output
- 128,000 tokens
- Input
- Image, Text
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.
Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.
Complex reasoning
Extended reasoning improves reliability on multi-step math, logic, and technical analysis.
Long-document analysis
Summarize and extract from contracts, papers, and reports without aggressive chunking.
Use cases
Relace Search is documented as suited to codebase file retrieval, helping locate relevant files across large repositories. It is also used for agentic code search, where it performs multi-step search over codebases and returns highly relevant files for a query.
It is documented for refactor impact scoping, where it helps identify which parts of a codebase may be affected by a change. It is also used for bug context gathering, helping assemble relevant code context for debugging and issue investigation.
Capabilities
- Function calling
- Reasoning
- Streaming
- Structured outputs
- Web search
Search API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $1.06 | 1M tokens |
| Output | $3.17 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Search vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| Search | $1.06 | $3.17 |
| Apply 3 | $0.8993 | $1.32 |
| $0.529 | $3.17 | |
| $0.6348 | $3.17 | |
| $1.06 | $3.17 |
How to use the Search API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "relace/relace-search",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "relace/relace-search",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "relace/relace-search",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Search FAQ
What is the context window of Search?
Search has a 256,000 tokens context window and can return up to 128,000 tokens.
What inputs and outputs does Search support?
Search takes image, text as input and returns text.
What is the model ID for Search?
Use relace/relace-search as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
How much does Search cost?
Search costs $1.06 input and $3.17 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Does Search support streaming?
Yes, Search can stream responses as they are generated.
Can Search read images?
Yes, Search accepts image input alongside text.
What tasks is Relace Search designed for?
It supports reasoning, tool calls, structured outputs and web search, making it suited for multi-step tasks that need external information or tool use.

