Overview
This endpoint provides image to text functionality.
Authentication
This endpoint requires authentication using a Bearer token.
Authorization
string
default:"sk-***********"
required
Your API key in the format: Bearer YOUR_API_KEY
Request Body
model
string
default:"doubao-seed-1-6-250615"
required
The model to use for the request
Array of message objects for the conversation
Maximum number of tokens to generate
Request Example
curl -X POST "https://gptproto.com/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-1-6-250615",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Doubao,What is in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
],
"max_tokens": 5000
}'
Response
Error Responses
{
"error": {
"message": "Invalid signature",
"type": "401"
}
}