Parameters

  • messages

    • Type: array
    • Required: true
  • model

    • Type: string
    • Required: true
    • Options: gpt-3.5-turbo, gpt-4, gpt-3.5-turbo-16k
  • max_tokens

    • Type: number
    • Required: false
    • Default: 512
  • temperature

    • Type: number
    • Required: false
    • Default: 0.9
  • plugins

    • Type: array
    • Required: false
    • Options: google, youtube-search, weather, wikipedia, tenor, alphavantage-stocks, alphavantage-crypto, alphavantage-forex, free-games, tasty, world-news, calculator, github, code-interpreter, diagrams, render-diagrams, planfit, wolfram, image, music
    • Default:
  • id

    • Type: string
    • Required: false
    • Description: ID of the conversation (used for data saving)
    • Default: b62f4cc5-0a7b-4044-9267-065c63c24469

Response

  • result

    • Type: string
  • done

    • Type: boolean
  • cost

    • Type: number
  • tool

    • Type: object
  • finishReason

    • Type: string
  • id

    • Type: string
    • Description: ID of the conversation (used for data saving)

Examples

OpenAI models example
import axios from "axios";
(async () => {
  let response = await axios({
    method: "post",
    url: 'https://api.turing.sh/text/gpt-new',
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer YOUR_API_KEY",
      "x-captcha-token": "Captcha key"
    },
    data: {
"messages": "array",
"model": "gpt-3.5-turbo",
"max_tokens": 512,
"temperature": 0.9,
"plugins": [],
"id": "b62f4cc5-0a7b-4044-9267-065c63c24469"
},
  })
})();