{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
Relace Models
Search Code
Run the Fast Agentic Search model (relace-search) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.
POST
/
v1
/
search
/
chat
/
completions
cURL
curl --request POST \ --url https://models.relace.ai/v1/search/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "relace-search", "messages": [ { "role": "system", "content": "You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ..." }, { "role": "user", "content": "I have uploaded a code repository in the /repo directory.\n\nNow consider the following user query:\n\n<user_query>\nHow is user authentication handled in this codebase?\n</user_query>\n\n..." } ], "tools": [ { "type": "function", "function": { "name": "view_file", "description": "Tool for viewing/exploring the contents of existing files", "parameters": { "type": "object", "required": [ "path", "view_range" ], "properties": { "path": { "type": "string" }, "view_range": { "type": "array", "items": { "type": "integer" } } } } } }, { "type": "function", "function": { "name": "report_back", "description": "Report the relevant files once the codebase is understood", "parameters": { "type": "object", "required": [ "explanation", "files" ], "properties": { "explanation": { "type": "string" }, "files": { "type": "object" } } } } } ], "tool_choice": "auto", "stream": false}'
import requests
url = "https://models.relace.ai/v1/search/chat/completions"
payload = {
"model": "relace-search",
"messages": [
{
"role": "system",
"content": "You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ..."
},
{
"role": "user",
"content": "I have uploaded a code repository in the /repo directory.
Now consider the following user query:
<user_query>
How is user authentication handled in this codebase?
</user_query>
..."
}
],
"tools": [
{
"type": "function",
"function": {
"name": "view_file",
"description": "Tool for viewing/exploring the contents of existing files",
"parameters": {
"type": "object",
"required": ["path", "view_range"],
"properties": {
"path": { "type": "string" },
"view_range": {
"type": "array",
"items": { "type": "integer" }
}
}
}
}
},
{
"type": "function",
"function": {
"name": "report_back",
"description": "Report the relevant files once the codebase is understood",
"parameters": {
"type": "object",
"required": ["explanation", "files"],
"properties": {
"explanation": { "type": "string" },
"files": { "type": "object" }
}
}
}
}
],
"tool_choice": "auto",
"stream": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'relace-search',
messages: [
{
role: 'system',
content: 'You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ...'
},
{
role: 'user',
content: 'I have uploaded a code repository in the /repo directory.\n\nNow consider the following user query:\n\n<user_query>\nHow is user authentication handled in this codebase?\n</user_query>\n\n...'
}
],
tools: [
{
type: 'function',
function: {
name: 'view_file',
description: 'Tool for viewing/exploring the contents of existing files',
parameters: {
type: 'object',
required: ['path', 'view_range'],
properties: {path: {type: 'string'}, view_range: {type: 'array', items: {type: 'integer'}}}
}
}
},
{
type: 'function',
function: {
name: 'report_back',
description: 'Report the relevant files once the codebase is understood',
parameters: {
type: 'object',
required: ['explanation', 'files'],
properties: {explanation: {type: 'string'}, files: {type: 'object'}}
}
}
}
],
tool_choice: 'auto',
stream: false
})
};
fetch('https://models.relace.ai/v1/search/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://models.relace.ai/v1/search/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'relace-search',
'messages' => [
[
'role' => 'system',
'content' => 'You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ...'
],
[
'role' => 'user',
'content' => 'I have uploaded a code repository in the /repo directory.
Now consider the following user query:
<user_query>
How is user authentication handled in this codebase?
</user_query>
...'
]
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => 'view_file',
'description' => 'Tool for viewing/exploring the contents of existing files',
'parameters' => [
'type' => 'object',
'required' => [
'path',
'view_range'
],
'properties' => [
'path' => [
'type' => 'string'
],
'view_range' => [
'type' => 'array',
'items' => [
'type' => 'integer'
]
]
]
]
]
],
[
'type' => 'function',
'function' => [
'name' => 'report_back',
'description' => 'Report the relevant files once the codebase is understood',
'parameters' => [
'type' => 'object',
'required' => [
'explanation',
'files'
],
'properties' => [
'explanation' => [
'type' => 'string'
],
'files' => [
'type' => 'object'
]
]
]
]
]
],
'tool_choice' => 'auto',
'stream' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://models.relace.ai/v1/search/chat/completions"
payload := strings.NewReader("{\n \"model\": \"relace-search\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ...\"\n },\n {\n \"role\": \"user\",\n \"content\": \"I have uploaded a code repository in the /repo directory.\\n\\nNow consider the following user query:\\n\\n<user_query>\\nHow is user authentication handled in this codebase?\\n</user_query>\\n\\n...\"\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"view_file\",\n \"description\": \"Tool for viewing/exploring the contents of existing files\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"path\",\n \"view_range\"\n ],\n \"properties\": {\n \"path\": {\n \"type\": \"string\"\n },\n \"view_range\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"report_back\",\n \"description\": \"Report the relevant files once the codebase is understood\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"explanation\",\n \"files\"\n ],\n \"properties\": {\n \"explanation\": {\n \"type\": \"string\"\n },\n \"files\": {\n \"type\": \"object\"\n }\n }\n }\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"stream\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://models.relace.ai/v1/search/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"relace-search\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ...\"\n },\n {\n \"role\": \"user\",\n \"content\": \"I have uploaded a code repository in the /repo directory.\\n\\nNow consider the following user query:\\n\\n<user_query>\\nHow is user authentication handled in this codebase?\\n</user_query>\\n\\n...\"\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"view_file\",\n \"description\": \"Tool for viewing/exploring the contents of existing files\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"path\",\n \"view_range\"\n ],\n \"properties\": {\n \"path\": {\n \"type\": \"string\"\n },\n \"view_range\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"report_back\",\n \"description\": \"Report the relevant files once the codebase is understood\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"explanation\",\n \"files\"\n ],\n \"properties\": {\n \"explanation\": {\n \"type\": \"string\"\n },\n \"files\": {\n \"type\": \"object\"\n }\n }\n }\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"stream\": false\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://models.relace.ai/v1/search/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"relace-search\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ...\"\n },\n {\n \"role\": \"user\",\n \"content\": \"I have uploaded a code repository in the /repo directory.\\n\\nNow consider the following user query:\\n\\n<user_query>\\nHow is user authentication handled in this codebase?\\n</user_query>\\n\\n...\"\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"view_file\",\n \"description\": \"Tool for viewing/exploring the contents of existing files\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"path\",\n \"view_range\"\n ],\n \"properties\": {\n \"path\": {\n \"type\": \"string\"\n },\n \"view_range\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n }\n },\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"report_back\",\n \"description\": \"Report the relevant files once the codebase is understood\",\n \"parameters\": {\n \"type\": \"object\",\n \"required\": [\n \"explanation\",\n \"files\"\n ],\n \"properties\": {\n \"explanation\": {\n \"type\": \"string\"\n },\n \"files\": {\n \"type\": \"object\"\n }\n }\n }\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
{
"error": {
"message": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.",
"type": "rate_limit_error",
"param": null,
"code": null
}
}
Relace Search is the model behind Fast Agentic Search. It explores a codebase in 4-5 turns of parallel tool calls and reports back the relevant files with line ranges.This endpoint runs the model one turn at a time. You own the agent loop: send the conversation so far, execute the tool calls it returns against your codebase, append the results, and call again until it calls report_back.
The model is trained against the exact system prompt, user prompt template, and tool schemas in the agent harness guide. Deviating from them degrades search quality.
Authorizations
Authorization
string
header
required
Relace API key Authorization header using the Bearer scheme.
Body
application/json
OpenAI-compatible chat completions request with the Fast Agentic Search tool definitions
OpenAI-compatible request for one turn of the search agent. Fields outside this list are ignored.
model
string
required
Must be relace-search. This route serves only the Fast Agentic Search model.
messages
object[]
required
The agent conversation so far, as OpenAI-format message objects: the system prompt, the user prompt, and any previous assistant tool calls with their tool results.
tools
object[]
OpenAI-format function tool definitions. Use the exact view_file, view_directory, grep_search, bash, and report_back schemas from the agent harness guide; the model is trained against them.
tool_choice
any
Controls tool use: none, auto, required, or a specific tool. Use auto.
stream
boolean
If true, tokens are sent as server-sent events as they are generated. Token usage is always reported in the final chunk of the stream.
max_tokens
integer
Maximum number of tokens to generate for this turn.
stop
string[]
Sequences at which generation stops.
seed
integer
Seed for deterministic sampling where supported.
Response
Chat completion generated
id
string
Unique identifier for the completion
object
string
Always chat.completion
created
integer
Unix timestamp of when the completion was created
model
string
The model that served the request
choices
object[]
The generated completions
Show child attributes
usage
object
Token usage information for the request
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Relace","colors":{"primary":"#0066FF","light":"#4D94FF","dark":"#0047B3"},"logo":{"light":"https://mintcdn.com/relace/db9WpuNCcZDHVmZO/logo/light.svg?fit=max\u0026auto=format\u0026n=db9WpuNCcZDHVmZO\u0026q=85\u0026s=8fb6212c3f7e36d063d878a98d7cff90","dark":"https://mintcdn.com/relace/db9WpuNCcZDHVmZO/logo/dark.svg?fit=max\u0026auto=format\u0026n=db9WpuNCcZDHVmZO\u0026q=85\u0026s=978d07312f6ac13f58c22aaa151579ea","href":"https://relace.ai"},"favicon":"https://mintcdn.com/relace/s7F5Z9LGe0g03FCB/favicon.svg?fit=max\u0026auto=format\u0026n=s7F5Z9LGe0g03FCB\u0026q=85\u0026s=b1aef1a2a6e6df815b78fc4d767560ef","navbar":{"links":[{"href":"mailto:info@relace.ai","label":"Support"}],"primary":{"type":"button","label":"Playground","href":"https://app.relace.ai"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/relace-ai"}},"integrations":{"posthog":{"apiKey":"phc_guqCHgvq8r5z5YETZZ5q6394qFrzl7M7W516jUCklUq","sessionRecording":true}},"contextual":{"options":["copy"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"relace","hasAudioNarration":false,"actualSubdomain":"relace","customDomains":["docs.relace.ai"],"gitSource":{"type":"github","owner":"squack-io","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af36054be16eed08391ff47","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"API Reference","count":8},{"language":"default","tag":"Documentation","count":8},{"language":"default","tag":"Model Guides","count":5},{"language":"default","tag":"Open Models","count":4},{"language":"default","tag":"Relace Models","count":3},{"language":"default","tag":"Instant Apply","count":3},{"language":"default","tag":"General","count":2},{"language":"default","tag":"Agents","count":2},{"language":"default","tag":"Fast Agentic Search","count":2},{"language":"default","tag":"Guides","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/fast-agentic-search/search","slug":"/api-reference/fast-agentic-search/search","pageMetadata":{"title":"Search Code","openapi":"POST /v1/search/chat/completions","description":"Run the Fast Agentic Search model (`relace-search`) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.","href":"/api-reference/fast-agentic-search/search"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Run the Fast Agentic Search model (\", _jsx(_components.code, {\n children: \"relace-search\"\n }), \") one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Relace Search is the model behind `,_jsx(_components.a,{href:`/docs/fast-agentic-search/agent`,children:`Fast Agentic Search`}),`. It explores a codebase in 4-5 turns of parallel tool calls and reports back the relevant files with line ranges.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint runs the model one turn at a time. You own the agent loop: send the conversation so far, execute the tool calls it returns against your codebase, append the results, and call again until it calls `,_jsx(_components.code,{children:`report_back`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`models`,children:`Models`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Model`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Tools`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`relace-search`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`view_file`}),`, `,_jsx(_components.code,{children:`view_directory`}),`, `,_jsx(_components.code,{children:`grep_search`}),`, `,_jsx(_components.code,{children:`bash`}),`, `,_jsx(_components.code,{children:`report_back`})]})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`openai-sdk`,children:`OpenAI SDK`}),`\n`,_jsxs(_components.p,{children:[`Point an OpenAI client at the `,_jsx(_components.code,{children:`/v1/search`}),` base URL. The model is also reachable as `,_jsx(_components.code,{children:`relace-search`}),` on the shared `,_jsx(_components.a,{href:`/api-reference/open-models/chat-completions`,children:_jsx(_components.code,{children:`/v1/chat/completions`})}),` route.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'openai'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` baseURL:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://models.relace.ai/v1/search'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chat`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'relace-search'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` messages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'system'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` systemPrompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` userPrompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tools:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` searchTools`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tool_choice:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'auto'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The model is trained against the exact system prompt, user prompt template, and tool schemas in the `,_jsx(_components.a,{href:`/docs/fast-agentic-search/agent`,children:`agent harness guide`}),`. Deviating from them degrades search quality.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Search Code","openapi":"POST /v1/search/chat/completions","description":"Run the Fast Agentic Search model (`relace-search`) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.","href":"/api-reference/fast-agentic-search/search"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Models","slug":"models","depth":2,"children":[]},{"title":"OpenAI SDK","slug":"openai-sdk","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Run the Fast Agentic Search model (`relace-search`) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.","servers":["70585b14-53e3-4d0b-8cdb-c380f3e937b2"],"requestBody":"8133d7df-aea9-41ce-bf2b-280d600468f2","responses":{"200":"9ed395c5-71b7-4c2c-9f1b-dd72e2f97a5d","400":"020ab1d3-c46e-4b9a-b53c-3571e035b8a7","401":"f2de0958-d403-4a58-9500-5a5f79a1b064","402":"3308e26a-da03-4e88-b44c-71b557b2f9d8","404":"75e9cd4c-fd55-4fd0-8069-103b14e6f401","429":"e1d1bf57-45f2-43a9-bab1-7e0af92938bd","500":"6ff8fb08-0cad-4e70-8161-1b0b70359058","502":"f24d81cd-ffd8-4009-bbdd-dad65162e91e","503":"f901ec80-9ebf-437b-b12c-e15d95e6f19c","504":"e47ce721-7893-4f0d-ae48-75d81baf2348"},"method":"post","type":"path","security":["48042cb2-e5de-4606-be75-11f4f8c4ac25"],"path":"/v1/search/chat/completions","baseUrlOptions":["https://models.relace.ai"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"description":"OpenAI-compatible chat completions request with the Fast Agentic Search tool definitions","required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Must be `relace-search`. This route serves only the Fast Agentic Search model.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"type":"array","items":{"type":"object","uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"description":"The agent conversation so far, as OpenAI-format message objects: the system prompt, the user prompt, and any previous `assistant` tool calls with their `tool` results.","isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"tools":{"type":"array","items":{"type":"object","uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"description":"OpenAI-format function tool definitions. Use the exact `view_file`, `view_directory`, `grep_search`, `bash`, and `report_back` schemas from the [agent harness guide](/docs/fast-agentic-search/agent#tool-schema-definition); the model is trained against them.","uniqueKey":"tools","typeLabel":"object[]"},"tool_choice":{"description":"Controls tool use: `none`, `auto`, `required`, or a specific tool. Use `auto`.","uniqueKey":"tool_choice","typeLabel":"any"},"stream":{"type":"boolean","description":"If true, tokens are sent as server-sent events as they are generated. Token usage is always reported in the final chunk of the stream.","uniqueKey":"stream","typeLabel":"boolean"},"max_tokens":{"type":"integer","description":"Maximum number of tokens to generate for this turn.","uniqueKey":"max_tokens","typeLabel":"integer"},"stop":{"type":"array","items":{"type":"string","uniqueKey":"stop.items.[INDEX]","typeLabel":"string"},"description":"Sequences at which generation stops.","uniqueKey":"stop","typeLabel":"string[]"},"seed":{"type":"integer","description":"Seed for deterministic sampling where supported.","uniqueKey":"seed","typeLabel":"integer"}},"description":"OpenAI-compatible request for one turn of the search agent. Fields outside this list are ignored.","uniqueKey":"","typeLabel":"object"},"example":{"model":"relace-search","messages":[{"role":"system","content":"You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ..."},{"role":"user","content":"I have uploaded a code repository in the /repo directory.\n\nNow consider the following user query:\n\n\u003cuser_query>\nHow is user authentication handled in this codebase?\n\u003c/user_query>\n\n..."}],"tools":[{"type":"function","function":{"name":"view_file","description":"Tool for viewing/exploring the contents of existing files","parameters":{"type":"object","required":["path","view_range"],"properties":{"path":{"type":"string"},"view_range":{"type":"array","items":{"type":"integer"}}}}}},{"type":"function","function":{"name":"report_back","description":"Report the relevant files once the codebase is understood","parameters":{"type":"object","required":["explanation","files"],"properties":{"explanation":{"type":"string"},"files":{"type":"object"}}}}}],"tool_choice":"auto","stream":false},"examples":{"Example":{"title":"Example","value":{"model":"relace-search","messages":[{"role":"system","content":"You are an AI agent whose job is to explore a code base with the provided tools and thoroughly understand the problem. ..."},{"role":"user","content":"I have uploaded a code repository in the /repo directory.\n\nNow consider the following user query:\n\n\u003cuser_query>\nHow is user authentication handled in this codebase?\n\u003c/user_query>\n\n..."}],"tools":[{"type":"function","function":{"name":"view_file","description":"Tool for viewing/exploring the contents of existing files","parameters":{"type":"object","required":["path","view_range"],"properties":{"path":{"type":"string"},"view_range":{"type":"array","items":{"type":"integer"}}}}}},{"type":"function","function":{"name":"report_back","description":"Report the relevant files once the codebase is understood","parameters":{"type":"object","required":["explanation","files"],"properties":{"explanation":{"type":"string"},"files":{"type":"object"}}}}}],"tool_choice":"auto","stream":false}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"9ed395c5-71b7-4c2c-9f1b-dd72e2f97a5d":{"description":"Chat completion generated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the completion","uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","description":"Always `chat.completion`","uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","description":"Unix timestamp of when the completion was created","uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","description":"The model that served the request","uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"message":{"type":"object","description":"The generated message, with `role` and `content` (and `tool_calls` when the model called tools)","uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"},"finish_reason":{"type":"string","description":"Why generation stopped, e.g. `stop`, `length`, or `tool_calls`","uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"description":"The generated completions","uniqueKey":"choices","typeLabel":"object[]"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"Number of tokens in the prompt","uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","description":"Number of tokens in the completion","uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total number of tokens used","uniqueKey":"usage.total_tokens","typeLabel":"integer"}},"description":"Token usage information for the request","uniqueKey":"usage","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"\u003cstring>","created":123,"model":"\u003cstring>","choices":[{"index":123,"message":{},"finish_reason":"\u003cstring>"}],"usage":{"prompt_tokens":123,"completion_tokens":123,"total_tokens":123}}}},"exampleType":"generated"},"text/event-stream":{"schema":{"type":"string","description":"Stream of chat completion chunks in the OpenAI streaming format. Token usage is reported in the final chunk.","uniqueKey":"","typeLabel":"string"},"examples":{"Example":{"title":"Example","value":"\u003cstring>"}},"exampleType":"generated"}},"exampleType":"generated"},"020ab1d3-c46e-4b9a-b53c-3571e035b8a7":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"},"f2de0958-d403-4a58-9500-5a5f79a1b064":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"},"3308e26a-da03-4e88-b44c-71b557b2f9d8":{"description":"Out of credits, or no payment method on the account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"},"75e9cd4c-fd55-4fd0-8069-103b14e6f401":{"description":"Route not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"},"e1d1bf57-45f2-43a9-bab1-7e0af92938bd":{"description":"Rate limit exceeded, or the model is at capacity","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"},"6ff8fb08-0cad-4e70-8161-1b0b70359058":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"},"f24d81cd-ffd8-4009-bbdd-dad65162e91e":{"description":"Model server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"},"f901ec80-9ebf-437b-b12c-e15d95e6f19c":{"description":"Model temporarily unavailable","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"},"e47ce721-7893-4f0d-ae48-75d81baf2348":{"description":"Request to the model timed out","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","description":"OpenAI error type","enum":["invalid_request_error","authentication_error","insufficient_quota","rate_limit_error","api_error"],"example":"rate_limit_error","uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request parameter, when known","example":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Always null on Relace-authored errors","example":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","type":"rate_limit_error","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"48042cb2-e5de-4606-be75-11f4f8c4ac25":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Relace API key Authorization header using the Bearer scheme.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"70585b14-53e3-4d0b-8cdb-c380f3e937b2":{"url":"https://models.relace.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Relace API key Authorization header using the Bearer scheme.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Relace API key Authorization header using the Bearer scheme.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"relace","siteName":"Relace","title":"Search Code - Relace","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-10T18:20:17.417Z","originalFileLocation":"api-reference/fast-agentic-search/search.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run the Fast Agentic Search model (relace-search) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Relace\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Search Code - Relace\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run the Fast Agentic Search model (relace-search) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Relace\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.relace.ai/api-reference/fast-agentic-search/search\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://relace.mintlify.site/_mintlify/api/og/v2?division=Relace+Models\u0026amp;title=Search+Code\u0026amp;description=Run+the+Fast+Agentic+Search+model+%28%60relace-search%60%29+one+turn+at+a+time+through+an+OpenAI-compatible+chat+completions+request.+You+supply+the+agent+harness%3A+the+\u0026amp;theme=57c4eb56dcaa832310d126ad\u0026amp;signature=930073a57aacf4e3e1d907d432b95a354947b394cd37f8b71769145aabd91452\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Search Code - Relace\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run the Fast Agentic Search model (relace-search) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://relace.mintlify.site/_mintlify/api/og/v2?division=Relace+Models\u0026amp;title=Search+Code\u0026amp;description=Run+the+Fast+Agentic+Search+model+%28%60relace-search%60%29+one+turn+at+a+time+through+an+OpenAI-compatible+chat+completions+request.+You+supply+the+agent+harness%3A+the+\u0026amp;theme=57c4eb56dcaa832310d126ad\u0026amp;signature=930073a57aacf4e3e1d907d432b95a354947b394cd37f8b71769145aabd91452\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Relace\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0066FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.relace.ai/api-reference/fast-agentic-search/search\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/fast-agentic-search/search.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.relace.ai/#organization\",\"name\":\"Relace\",\"url\":\"https://docs.relace.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/relace/db9WpuNCcZDHVmZO/logo/light.svg?fit=max\u0026auto=format\u0026n=db9WpuNCcZDHVmZO\u0026q=85\u0026s=8fb6212c3f7e36d063d878a98d7cff90\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.relace.ai#website\",\"name\":\"Relace\",\"url\":\"https://docs.relace.ai\",\"publisher\":{\"@id\":\"https://docs.relace.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.relace.ai/api-reference/fast-agentic-search/search#webpage\",\"url\":\"https://docs.relace.ai/api-reference/fast-agentic-search/search\",\"name\":\"Search Code\",\"description\":\"Run the Fast Agentic Search model (relace-search) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.\",\"dateModified\":\"2026-11-10T18:20:17.417Z\",\"isPartOf\":{\"@id\":\"https://docs.relace.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.relace.ai/api-reference/fast-agentic-search/search#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.relace.ai/api-reference/fast-agentic-search/search#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Relace Models\",\"item\":\"https://docs.relace.ai/api-reference/compact/compact\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Search Code\",\"item\":\"https://docs.relace.ai/api-reference/fast-agentic-search/search\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.relace.ai/api-reference/fast-agentic-search/search#apireference\",\"headline\":\"Search Code\",\"name\":\"Search Code\",\"description\":\"Run the Fast Agentic Search model (relace-search) one turn at a time through an OpenAI-compatible chat completions request. You supply the agent harness: the search tools and the code that executes them.\",\"url\":\"https://docs.relace.ai/api-reference/fast-agentic-search/search\",\"mainEntityOfPage\":{\"@id\":\"https://docs.relace.ai/api-reference/fast-agentic-search/search#webpage\"},\"dateModified\":\"2026-11-10T18:20:17.417Z\",\"publisher\":{\"@id\":\"https://docs.relace.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.relace.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Relace\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Relace\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/fast-agentic-search/search.md","siteName":"Relace","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/docs/introduction"}]},{"anchor":"API Reference","icon":"square-terminal","groups":[{"group":"General","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","href":"/api-reference/errors"}]},{"group":"Relace Models","pages":[{"title":"Compact Trace","openapi":"POST /v1/code/compact","href":"/api-reference/compact/compact"},{"title":"Apply Code","openapi":"POST /v1/code/apply","description":"Merge code snippets from an LLM into your existing codebase.","href":"/api-reference/instant-apply/apply"},{"title":"Search Code","openapi":"POST /v1/search/chat/completions","href":"/api-reference/fast-agentic-search/search"}]},{"group":"Open Models","pages":[{"title":"Chat Completions","openapi":"POST /v1/chat/completions","description":"Send an OpenAI-compatible chat completions request to a Relace-hosted model.","href":"/api-reference/open-models/chat-completions"},{"title":"Messages","openapi":"POST /v1/messages","href":"/api-reference/open-models/messages"},{"title":"List Models","openapi":"GET /v1/models","href":"/api-reference/open-models/list-models"}]}]}]},"basePath":"","title":"Search Code - Relace","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C6Z1vAfX.js","snippetPresets-Bjd6OXRM.js","utils-QL6OhUyF.js","style-to-object-BY3JEAdk.js","utils-Dsq-HLeF.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CEYfmkoV.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CHgPjMM8.js","_Uint8Array-IXRJ_ueo.js","isObject-FP1Yky1u.js","ApiExamples-pq4ns9YA.js","usePlaygroundInputsStore-D-gnigmo.js","shallow-DIfWGPrf.js","isEqual-DDFuixlH.js","CodeSnippets-8g5rilZj.js","CodeSnippet-C_J7pouP.js","use-playground-group-access-bkOyfPao.js","Page-B_smDgrp.js","api-description-markdown-DtcP2u3s.js","DynamicMarkdown-DOefW1_8.js","SectionHeading-Cg4lfWZw.js","MethodPill-BnqygvYm.js","getPastedJson-BGXYEZ3P.js","Check2Icon-BBeO3TOS.js","axios-CsQoIw0U.js","Markdown-D5IqLG6A.js","AssistantPageLink-_S2h4i6W.js","dist-DzZqOeCq.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}