TextCortex
    TextCortex
    • Generate code
      POST
    • Generate SQL queries
      POST
    • Create ad
      POST
    • Create blog content
      POST
    • Autocomplete
      POST
    • Create email
      POST
    • Expand
      POST
    • Paraphrase
      POST
    • Create product description
      POST
    • Create product title
      POST
    • Rewrite
      POST
    • Simplify
      POST
    • Create social media post
      POST
    • Summarize
      POST
    • Translate
      POST
    • Create video description
      POST

      Summarize

      Develop Env
      https://dev.your-api-server.com
      Develop Env
      https://dev.your-api-server.com
      POST
      /texts/summarizations
      Summarize given text. The text can be provided as a string or as a file ID.
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://dev.your-api-server.com/texts/summarizations' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "file_id": "string",
          "formality": "default",
          "max_tokens": 2048,
          "mode": "default",
          "model": "chat-sophos-1",
          "n": 1,
          "source_lang": "string",
          "target_lang": "string",
          "temperature": null,
          "text": "string"
      }'
      Response Response Example
      {
          "data": {
              "outputs": [
                  {
                      "index": 0,
                      "text": "A beautiful sentence hand crafted by TextCortex."
                  }
              ],
              "remaining_credits": 0
          },
          "status": "success"
      }

      Request

      Body Params application/json
      file_id
      string 
      optional
      ID of the file to summarize.
      formality
      optional
      The formality of the generated text, for languages that support it.
      Allowed values:
      defaultmorelessprefer_moreprefer_less
      max_tokens
      integer 
      optional
      The maximum number of tokens to generate.
      Default:
      2048
      mode
      enum<string> 
      optional
      Allowed values:
      defaultembeddings
      model
      optional
      The language model to use.
      Allowed values:
      sophos-1chat-sophos-1claude-haikuclaude-sonnetclaude-3-haikuclaude-3-sonnetclaude-3-5-sonnetmistral-smallmistral-large
      Default:
      chat-sophos-1
      n
      integer 
      optional
      The number of outputs to generate.
      Default:
      1
      source_lang
      string 
      optional
      The language of the source text. Available options are:
      "en": English (Default)
      "auto": The API will attempt to detect the language of the text and translate it.
      "ar": Arabic
      "bg": Bulgarian
      "cs": Czech
      "da": Danish
      "de": German
      "el": Greek
      "es": Spanish
      "et": Estonian
      "fi": Finnish
      "fr": French
      "hu": Hungarian
      "id": Indonesian
      "it": Italian
      "ja": Japanese
      "ko": Korean
      "lt": Lithuanian
      "lv": Latvian
      "nb": Norwegian
      "nl": Dutch
      "pl": Polish
      "pt": Portuguese (all Portuguese varieties mixed)
      "ro": Romanian
      "ru": Russian
      "sk": Slovak
      "sl": Slovenian
      "sv": Swedish
      "tr": Turkish
      "uk": Ukrainian
      "zh": Chinese
      target_lang
      string 
      optional
      The language which the text should be generated in. Available options are:
      "ar": Arabic
      "bg": Bulgarian
      "cs": Czech
      "da": Danish
      "de": German
      "el": Greek
      "en": Alias for en-us
      "en-gb": English (British)
      "en-us": English (American)
      "es": Spanish
      "et": Estonian
      "fi": Finnish
      "fr": French
      "hu": Hungarian
      "id": Indonesian
      "it": Italian
      "ja": Japanese
      "ko": Korean
      "lt": Lithuanian
      "lv": Latvian
      "nb": Norwegian
      "nl": Dutch
      "pl": Polish
      "pt": Alias for pt-pt
      "pt-br": Portuguese (Brazilian)
      "pt-pt": Portuguese (all Portuguese varieties excluding Brazilian Portuguese)
      "ro": Romanian
      "ru": Russian
      "sk": Slovak
      "sl": Slovenian
      "sv": Swedish
      "tr": Turkish
      "uk": Ukrainian
      "zh": Chinese (simplified)
      temperature
      number  | null 
      optional
      The sampling temperature to be used in text generation. The higher the temperature, the higher the risk of the output to sound "made up".
      Default:
      null
      text
      string 
      optional
      The text to summarize.
      Examples

      Responses

      🟢200Success
      application/json
      Body
      data
      object 
      optional
      The response data.
      outputs
      array[object (OutputItem) {2}] 
      optional
      The list of generated texts.
      remaining_credits
      number 
      optional
      The remaining TextCortex credits.
      status
      string 
      optional
      The status of the response.
      Default:
      success
      Previous
      Create social media post
      Next
      Translate
      Built with