Chat Completions

The chat completions API allows you to get completions from your agent, based on the provided input.


POSThttps://api.scoutos.com/v1/chat/completions

Create a completion

By providing an input to this API route it returns a completion from your Scout agent.

Required attributes

  • Name
    input
    Type
    string
    Description

    The input to get a completion from

  • Name
    id
    Type
    string
    Description

    The agent id

Optional attributes

  • Name
    thread_id
    Type
    string
    Description

    The thread id. This is passed back and forth to maintain the conversation.

Request

POST
https://api.scoutos.com/v1/chat/completions
curl  -X POST \
'https://api.scoutos.com/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SECRET_KEY' \
--data-raw '{
  "id": AGENT_ID,
  "input": "hello"
}'

Response

{
  "id": "abc-123-foo",
  "completion": "My name is Scout Bot.",
  "thread_id": "2686a7e5-63bb-4ec0-a68c-096730222db5",
}