Trinka Grammar Checker

FREEMIUM
By Crimson AI | Updated hace un mes | Text Analysis
Popularity

8.9 / 10

Latency

1,127ms

Service Level

100%

Health Check

N/A

README

Trinka Grammar Checker API: A Developer’s Guide

Introduction:

This comprehensive guide will walk you through the steps of integrating the Trinka Grammar Checker API into your applications, empowering you to leverage its advanced language correction capabilities to improve the quality of your written content.

With Trinka, you can effortlessly identify and correct grammar errors, enhance sentence structure, and improve the overall readability of your text. Currently, Trinka supports three languages: English, German, and Spanish. Support for other languages will be added in future.

Overview

The Trinka API is organized around RESTFul architectural style. Our API accepts and returns JSON encoded bodies, and uses standard HTTP response codes, authentication and verbs.

All communication is over secure socket layer (SSL) protocol i.e. HTTPS. The Trinka API uses standard HTTP methods. The content-type of both request and response must be application/json. All the data must be UTF-8 encoded.

Notes: Currently, you can process a maximum of 500 words in one request.

Steps to integrate our API quickly

  • To Integrate with Trinka grammar checker, an integration key must be provisioned first. This integration key is a unique identifier that is used to authenticate requests associated with your account for usage and billing purposes.
  • Make sure your API key is set up correctly before making any API requests.
  • Send an HTTP request to the Trinka API to get your text corrected.
  • Parse the API response to extract the corrected text along with the index of the words that need to be changed, and then use this information to show the corrections to your users.
  • Make use of the error_category field to decide which alerts are important for your users.

Trinka REST API Request Structure & Examples

  • HTTP Method: POST,
  • HTTP Endpoint: https://trinka-grammar-checker.p.rapidapi.com/v2/para-check/{langCode}
    • where langCode can be en, es, or de. For English use en, for Spanish, use es, for German, use de.
  • HTTP Headers:
    • X-RapidAPI-Host: trinka-grammar-checker.p.rapidapi.com
    • X-RapidAPI-Key: your-api-key
  • HTTP Body:
    • Required parameters:
      • paragraph: <paragraph to be corrected>
    • Optional parameters:
      • language: US or UK (to select the dialect when correcting English paragraphs, default is US). For languages other than English, this parameter will have no effect.

Example 1 (English US)

curl --location 'https://trinka-grammar-checker.p.rapidapi.com/v2/para-check/en' \
--header 'X-RapidAPI-Host: trinka-grammar-checker.p.rapidapi.com' \
--header 'X-RapidAPI-Key: your-rapidapi-key' \
--data '{
    "paragraph": "Once upon a time in a remote village in India, nestled deep within the lush forests of Kerala, there lived a young boy named Rajan. Rajan was an inquisitive and adventurous child, known for his insatiable curiosity and his love for exploring the dense jungles that surrounded his village. One bright morning, as the sun painted the sky with hues of orange and pink, Rajan decided to venture deeper into the forest than he had ever gone before. His heart pounded with excitement as he followed a narrow, winding trail that led him through a thick canopy of ancient trees.",
    "language": "US"
}'

Example 2 (English UK)

curl --location 'https://trinka-grammar-checker.p.rapidapi.com/v2/para-check/en' \
--header 'X-RapidAPI-Host: trinka-grammar-checker.p.rapidapi.com' \
--header 'X-RapidAPI-Key: your-rapidapi-key' \
--data '{
    "paragraph": "Once upon a time in a remote village in India, nestled deep within the lush forests of Kerala, there lived a young boy named Rajan. Rajan was an inquisitive and adventurous child, known for his insatiable curiosity and his love for exploring the dense jungles that surrounded his village. One bright morning, as the sun painted the sky with hues of orange and pink, Rajan decided to venture deeper into the forest than he had ever gone before. His heart pounded with excitement as he followed a narrow, winding trail that led him through a thick canopy of ancient trees.",
    "language": "UK"
}'

Example 3 (Spanish)

curl --location 'https://trinka-grammar-checker.p.rapidapi.com/v2/para-check/es' \
--header 'X-RapidAPI-Host: trinka-grammar-checker.p.rapidapi.com' \
--header 'X-RapidAPI-Key: your-rapidapi-key' \
--data '{
    "paragraph": "Ayer yo ir a la tienda y comprar muchos manzanas. Mi amigos gusta las manzanas también, así que yo compartir con ellos. Nosotros comer las manzanas y reír mucho. Después, nosotros jugamos juegos y tener diversión. Fue un día muy bueno."
}'

Example 4 (German)

curl --location 'https://trinka-grammar-checker.p.rapidapi.com/v2/para-check/de' \
--header 'X-RapidAPI-Host: trinka-grammar-checker.p.rapidapi.com' \
--header 'X-RapidAPI-Key: your-rapidapi-key' \
--data '{
    "paragraph": "Rajan hrt oller Ehrfurcht zu und klammerte sich an jedes Wort."
}'

Trinka REST API Response Structure & Examples

  • A successful request is responded with 200 OK Status Code and a JSON response which is an array of sentences, along with their indexes and errors/suggestions:
[
  {
    "begin": begin index of sentence in the paragraph,
    "end": end index of sentence in the paragraph,
    "sentence": sentence text,
    "result": [
      {
        "start_index": start index within the sentence,
        "end_index": end index within the sentence,
        "covered_text": text in the source sentence that needs to be replaced,
        "output": [ replacement text ],
        "comment": [ correction comment ],
        "cta_present": [ boolean value indicating whether the change suggested is to be automatically applied (if true) or just raised as a comment (if false) ],
        "error_category": [ grammar error category for the change suggested ]
      }
    ]
  }
]

Trinka API Response Codes

Response Code Note
200 - OK Everything working as expected
400 - Bad Request The request was unacceptable, often due to missing a required parameter or file format not acceptable
401 - Unauthorized No valid API key provided
403 - Forbidden The API key doesn't have permission to perform the request
404 - Not Found The request resourse doesn't exist
413 - Payload Too Large The paragraph word count is greater than 500 words
500 - Server Error Trinka server issue

Solutions to Common Issues

  • If you have trouble using the Trinka Grammar Checker API, try these steps:
  • Make sure your API key is valid and set up correctly.
  • Check that your app has a good internet connection.
  • Confirm that your API request is correctly formatted

For any queries feel free to connect with us at support@trinka.ai.

Followers: 5
Resources:
Product Website
API Creator:
Rapid account: Crimson AI
Crimson AI
trinka-grammar-checker-api
Log In to Rate API
Rating: 4.7 - Votes: 3