For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI Reference
GuidesAPI Reference
  • Overview
    • API reference
  • Search
    • POSTSearch
    • GETSearch Run List
    • GETSearch Run Get
    • GETSearch Run Events
    • POSTSearch Run Cancel
  • Extract
    • GETExtract a URL
    • POSTExtract
  • Monitors
    • GETList monitors
    • POSTCreate monitor
    • GETRetrieve monitor
    • DELDelete monitor
    • PATCHUpdate monitor
    • GETList monitor events
    • POSTMonitor Pause
    • POSTMonitor Resume
    • POSTRun monitor
  • Tasks
    • POSTTask
    • POSTCreate task run
    • GETRetrieve task run
    • GETStream task run events
    • GETTask List
    • GETTask Get
    • GETTask Events
    • POSTTask Cancel
  • Chat
    • POSTChat completion
  • Find All
    • POSTFindAll
    • GETFindall Run List
    • POSTCreate FindAll run
    • GETRetrieve FindAll run
    • GETStream FindAll run events
    • POSTCancel FindAll run
    • POSTExtend FindAll run
    • POSTEnrich FindAll run
LogoLogo
Chat

Chat completion

||View as Markdown|
POST
https://core.usescout.sh/v1/chat/completions
POST
/v1/chat/completions
$curl -X POST https://core.usescout.sh/v1/chat/completions \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "messages": [
> {
> "role": "user",
> "content": "What did Anthropic announce this week?"
> }
> ],
> "model": "scout-web"
>}'
1{
2 "id": "chatcmpl-2b8f1d6a4c9e",
3 "object": "chat.completion",
4 "created": 1737382991,
5 "model": "scout-web",
6 "choices": [
7 {
8 "index": 0,
9 "message": {
10 "role": "assistant",
11 "content": "This week Anthropic announced a new Claude model with improved coding and reasoning performance."
12 },
13 "finish_reason": "stop"
14 }
15 ],
16 "usage": {
17 "prompt_tokens": 14,
18 "completion_tokens": 28,
19 "total_tokens": 42
20 }
21}

OpenAI-compatible chat completions, grounded in live web search.

When web_search is false (or tools is false) we skip the SERP fetch entirely and route straight to Claude — sub-1s for simple chat. When stream is true we return Server-Sent Events with OpenAI-style chat.completion.chunk frames terminated by data: [DONE].

Was this page helpful?
Previous

Task Cancel

Next

FindAll

Built with

Authentication

AuthorizationBearer
Your API key, sent as a Bearer token.

Request

This endpoint expects an object.
messageslist of objectsRequired

OpenAI-style messages (system / user / assistant).

modelstring or nullOptional

Echoed back in the response; does not affect routing.

streambooleanOptionalDefaults to false

When true, return Server-Sent Events with OpenAI-style chat.completion.chunk frames terminated by data: [DONE].

response_formatobject or nullOptional

Output format. text (default), json_object, or json_schema. For json_schema, pass {type:‘json_schema’, json_schema:{name, schema}}.

temperaturedouble or nullOptional0-2

OpenAI-range 0-2. Mapped to Anthropic’s 0-1 range (clamped).

top_pdouble or nullOptional0-1
Nucleus sampling cutoff. Forwarded to Anthropic.
nintegerOptional1-4Defaults to 1
Number of chat completions to generate. Capped at 4.
toolsboolean or list of maps from strings to any or nullOptional

false disables Scout’s built-in web search (pure chat). An array is accepted for OpenAI compatibility but client-defined tools are not yet wired up; Scout’s built-in search is always available.

web_searchbooleanOptionalDefaults to true

Explicit toggle for the built-in web grounding. Set to false for pure chat (sub-1s).

seedinteger or nullOptional

Deterministic sampling seed (forwarded when supported).

max_tokensintegerOptional1-8192Defaults to 2048
Max tokens in the response.
stopstring or list of strings or nullOptional

String or list of stop sequences. Forwarded as Anthropic stop_sequences.

Response

Successful Response

Errors

422
Unprocessable Entity Error