API Documentation

API Usage

To use the Thai Text Summarization API, follow these steps:

  1. Endpoint: https://api.iapp.co.th/thai-summary

  2. Method: POST

  3. Headers:

    • apikey: {YOUR_API_KEY}

    • Content-Type: application/json

  4. Request Body:

    {
        "text": "Your long Thai text here",
        "length": 20
    }
    • text: The Thai text you want to summarize

    • length: The desired length of the summary in words (1-8192)

  5. Example cURL request:

    curl --location 'https://api.iapp.co.th/thai-summary' \
    --header 'apikey: {YOUR_API_KEY}' \
    --header 'Content-Type: application/json' \
    --data '{
        "text": "Your long Thai text here",
        "length": 20
    }'
  6. Response: The API will return a JSON object containing the original text and the generated summary:

    {
        "original_text": "Your original long Thai text",
        "summary": "The generated summary of the text"
    }

This system provides an efficient way to process and summarize Thai language content, making it useful for various applications such as news aggregation, content curation, and information retrieval.

Getting an API Key

To use the Thai Text Summarization API, you'll need an API key. Follow these steps to obtain one:

  1. Click on the "Sign Up" or "Register" button if you don't have an account.

  2. If you already have an account, click on "Log In".

  3. Once logged in, navigate to your account dashboard or profile section.

  4. Look for an option like "API Keys".

  5. Press the right-most button to create a new API key.

  6. Copy your newly generated API key and keep it secure.

Remember to never share your API key publicly or commit it to version control systems. Use environment variables or secure key management systems to store and use your API key in your applications.

Last updated