KrosAI Docs
DashboardGet Started
  • Getting Started
    • Introduction
    • Quickstart Guide
    • Authentication
  • OpenAI SDK Compatability
  • Endpoints
    • Completions API
      • Create Chat Completion
    • Translation API
    • Text Summarization API
    • Audio Transcription API
    • Sentiment Analysis API
  • AGENT
    • Agents API
      • Create Agent
      • List Agents
      • Get Agent
      • Update Agent
      • Delete Agent
      • Start Voice Session
    • Conversations API
      • Create Conversation
      • List Conversations
      • Get Conversation
      • Get Conversation Messages
    • Knowledge Base API
      • Create Knowledge Base
      • List Knowledge Base
      • Upload Document
      • List Document
  • Resources
    • AI Voice Agents
    • In-App Voice Assistants
    • Virtual Health Assistants
    • EdTech Language Tutors
  • SDKS
    • Node.JS SDK
    • React Native SDK
    • Flutter
Powered by GitBook
On this page
  1. Endpoints

Text Summarization API

Generate concise summaries of text content in multiple languages.

Summary Endpoint

POST /api/v1/summary

Create a concise summary of text content with support for various target languages.

Request Body

  • text string (required): The text content to be summarized.

  • target_language string (default: "en"): The language code for the output summary. Defaults to English ("en").

  • max_length integer (default: 130): Maximum length of the summary in words.

  • min_length integer (default: 30): Minimum length of the summary in words.

Response

  • choices array:

    • text string: The generated summary text.

    • index integer: Index of the choice in the array.

    • finish_reason string: Reason why the completion finished.

  • model string: The model used for generating the summary.

  • object string: Type of the response object.

Example Request

curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -d '{"text": "This is a test summary."}' https://api.krosai.com/api/v1/summary

Example Response

{
  "choices": [{"text": "This is a test summary."}]
}
PreviousTranslation APINextAudio Transcription API

Last updated 2 months ago