Telegram integration

Generate a Telegram completion

Ask for a completion and stores the prompt in the chat history.

Replica chat supports two response formats: streamed and JSON. To switch between these formats, use the 'Accept' header, specifying either 'text/event-stream' for streaming or 'application/json' for JSON.
The streamed response honours the [Stream Protocol](https://sdk.vercel.ai/docs/ai-sdk-ui/stream-protocol), allowing the use of a number of SDKs, including [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction).

The streamed variant is not specified in the OpenAPI Schema because it is not an OpenAPI endpoint.
post/v1/replicas/{replicaUUID}/chat/completions/telegram

Request

  • Base URL: https://api.sensay.io
  • URL: https://api.sensay.io/v1/replicas/{replicaUUID}/chat/completions/telegram
  • Auth: one of:
    • API key in header X-ORGANIZATION-SECRET and API key in header X-USER-ID and API key in header X-USER-ID-TYPE
    • API key in header X-ORGANIZATION-SECRET

Path parameters

replicaUUIDstring uuid required

The replica unique identifier (UUID)

Example:03db5651-cb61-4bdf-9ef0-89561f7c9c53

Headers

X-API-Versionstring
Example:2025-03-25
Content-Encoding'gzip'

Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.

Request body

contentstring required

The prompt to generate completions for, encoded as a string.

skip_chat_historyboolean

When set to true, historical messages are not used in the context, and the message is not appended to the conversation history, thus it is excluded from all future chat context.

imageURLstring

The URL of the image to be used as context for the completion.

Example request

{
  "content": "How did you handle the immense pressure during the Civil War?",
  "imageURL": "https://images.invalid/photo.jpeg"
}

Response

List of chat messages had with a replica by the current user, including the completion

successboolean required
contentstring required

Example response

{
  "success": true,
  "content": "I handled the immense pressure during the Civil War by..."
}

Changes

No recorded changes to this operation across all 1 revision of this API.