Chat API

Conversate with the LLM using a fixture-based prompt.

POSThttps://sec-gw.lsports.eu/chat/api/v2/chat
Header parameters
Body
Promptstring

The prompt or question for the LLM

Example: "Who is likely to score first?"
Fixtureobject
CorrelationIdstring

Correlation ID for tracking the request

Example: "abc123xyz"
ConversationSessionIdstring

Identifier for the conversation session

Example: "session_12345"
Response

Successfully received response from LLM

Body
Messageobject
RelatedQuestionsarray of string

List of related questions suggested by the LLM

Errornullable enum

Error code if an error occurred during the request

Example: 3
01234567891011121314151617
Request
const response = await fetch('https://sec-gw.lsports.eu/chat/api/v2/chat', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer {jwt_token}",
      "Language": "en",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "Message": {
    "Id": "269598d9-9af4-41ba-bc3a-18488e8912ab",
    "Type": "received",
    "Status": "delivered",
    "Timestamp": "2024-10-15T11:21:42",
    "Text": "How can I help you today?",
    "BetId": null,
    "MarketId": null,
    "PlayerId": null,
    "FixtureId": "22231141",
    "LSportsFixtureId": 22231141,
    "LSportsSportId": 6046,
    "LSportsLocationId": 243,
    "LSportsPlayerId": null
  },
  "RelatedQuestions": [
    "What are the odds for Chelsea to win?"
  ],
  "Error": 3
}

Retrieves supported LSports market IDs for conversation.

POSThttps://sec-gw.lsports.eu/chat/api/v2/suggestedquestions
Header parameters
Body
Fixtureobject
Response

Successfully retrieved list of supported LSports market IDs.

Body
itemsstring
Request
const response = await fetch('https://sec-gw.lsports.eu/chat/api/v2/suggestedquestions', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer {jwt_token}",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
[
  "52",
  "1002",
  "950"
]

Retrieve supported fixtures for conversation.

POSThttps://sec-gw.lsports.eu/chat/api/v2/fixtures
Header parameters
Body
Fixturesarray of object
Response

Successfully retrieved supported fixtures for conversation.

Body
Fixturesarray of object
Request
const response = await fetch('https://sec-gw.lsports.eu/chat/api/v2/fixtures', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer {jwt_token}",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "Fixtures": [
    {
      "Id": "22231141",
      "Date": "2024-10-27T14:00:00Z",
      "FixtureId": "22231141",
      "LSportsFixtureId": 22231141,
      "LSportsSportId": 6046,
      "LSportsLocationId": 243
    }
  ]
}

Last updated