Search API

Search on AIMLAPI.

Modalities
Image, TextText
In / Out price
$1.06/$3.17per 1M
Context window
250K tokens
Released
Dec 8, 2025

Search overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 3, 2026.

SVG of a pelican riding a bicycle, written by Search through AI/ML API

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

Search pricing in US dollars
UsagePriceUnit
Input$1.061M tokens
Output$3.171M 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.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Search$1.06$3.17
Apply 3$0.8993$1.32
Seed 2.0 Code$0.529$3.17
Glimpse$0.6348$3.17
Hermes 4 405B$1.06$3.17

How to use the Search API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export 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."
    }
  ]
}'

Related articles

All posts

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.

Start building with Search

Search API

relace/relace-search

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export 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."
    }
  ]
}'