Huggingface based models

POST https://api.turing.sh/text/huggingface

Parameters

  • messages

    • Type: array
    • Required: false
  • prompt

    • Type: string
    • Required: false
  • chat

    • Type: boolean
    • Required: false
  • model

    • Type: string
    • Required: true
    • Options: OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5
  • stop

    • Type: string
    • Required: false

Response

  • cost

    • Type: number
    • Description: Cost of the request in USD
  • result

    • Type: string
    • Description: Result of the request
  • done

    • Type: boolean
    • Description: Whether the request is done or not

Examples

Huggingface based models example
import axios from "axios";
(async () => {
  let response = await axios({
    method: "post",
    url: 'https://api.turing.sh/text/huggingface',
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer YOUR_API_KEY",
      "x-captcha-token": "Captcha key"
    },
    data: {
"model": "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5"
},
  })
})();