Insight API
HomeContact Us
HomeContact Us
LinkedIn
Github
  1. Pulse AI
  • Getting Started with Insight
  • Example Requests
  • Recognition & Branding Requirements
  • Discovery
    • Generate New Discovery
      POST
    • Get a Specific Discovery
      GET
    • Get All Discoveries
      GET
  • Genres
    • Get Genres
      GET
  • Artists
    • Search Artists
      GET
    • Get a Specific Artist
      GET
  • Venues
    • Search Venues
      GET
    • Get a Specific Venue
      GET
  • Pulse AI
    • Chat Completions API
    • Get Models
      GET
    • Chat Completions Endpoint
      POST
    • Healthcheck
      GET
  1. Pulse AI

Chat Completions Endpoint

Developing
POST
/v1/pulse/chat/completions
InsightDiscoveryArtist IntelligenceAIChatbot
OpenAI-compatible chat completions endpoint with streaming support.
This endpoint allows applications to send messages to Pulse AI Research Agent and receive streaming responses in OpenAI-compatible format. It processes user messages through the appropriate agent based on the requested model and maintains conversation history between requests.

Stream Format#

Each event starts with "data: " followed by a JSON string and two newlines
First content chunk: {"choices": [{"delta": {"role": "assistant", "content": "chunk"}, "index": 0, "finish_reason": null}]}
Subsequent chunks: {"choices": [{"delta": {"content": "chunk"}, "index": 0, "finish_reason": null}]}
End markers: {"choices":[{"delta":{},"finish_reason":"stop","index":0}]} followed by [DONE]

Request

Header Params
x-user-email
string 
optional
Example:
corey@lineupiq.io
x-app-id
string <password>
required
Default:
{{x-app-id}}
x-api-key
string <password>
required
Default:
{{x-api-key}}
Content-Type
string 
optional
Default:
application/json
Body Params application/json
model
string 
required
ID of the model to use (e.g., 'control-4v1', 'discovery-pulse-4v1')
Example:
control-4v1
messages
array [object {2}] 
required
A list of messages comprising the conversation so far
role
enum<string> 
required
The role of the message author
Allowed values:
systemuserassistant
Example:
user
content
string 
required
The content of the message
Example:
Tell me about LAIRA Core
stream
boolean 
optional
Whether to stream the response (recommended for this endpoint)
Default:
true
Example:
true
Example
{
  "model": "discovery-pulse-4v1",
  "messages": [
    {
      "role": "user",
      "content": "I'm looking for venues in Edmonton that can host a rock concert with about 2000 attendees in August."
    }
  ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/pulse/chat/completions' \
--header 'x-user-email: corey@lineupiq.io' \
--header 'x-app-id;' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "discovery-pulse-4v1",
    "messages": [
        {
            "role": "user",
            "content": "I'\''m looking for venues in Edmonton that can host a rock concert with about 2000 attendees in August."
        }
    ]
}'

Responses

🟢200OK
text/event-stream
Streaming response
Body
string <binary>
optional
Examples
data: {"choices": [{"delta": {"role": "assistant", "content": "Hello"}, "index": 0, "finish_reason": null}]}\n\n
🟠401Unauthorized
🔴500Server Error
Previous
Get Models
Next
Healthcheck
Built with