Google Models
Parameters
-
messages
- Type: array
- Required: true
-
model
- Type: string
- Required: false
- Options: gemini-pro, gemini-pro-vision
- Default: gemini-pro
-
max_tokens
- Type: number
- Required: false
- Default: 512
-
temperature
- Type: number
- Required: false
- Default: 0.9
-
id
- Type: string
- Required: false
- Description: ID of the conversation (used for data saving)
- Default: bfb34ea4-dc9d-4f8e-b07d-e169e113d951
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
-
id
- Type: string
- Description: ID of the conversation (used for data saving)
Examples
Google Models example
import axios from "axios";
(async () => {
let response = await axios({
method: "post",
url: 'https://api.turing.sh/text/google',
headers: {
"Content-Type": "application/json",
Authorization: "Bearer YOUR_API_KEY",
"x-captcha-token": "Captcha key"
},
data: {
"messages": "array",
"model": "gemini-pro",
"max_tokens": 512,
"temperature": 0.9,
"id": "bfb34ea4-dc9d-4f8e-b07d-e169e113d951"
},
})
})();