Skip to main content
POST
/
v1
/
chat
/
completions
PDF Analysis example:one
curl --request POST \
  --url https://gptproto.com/v1/chat/completions \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "messages": [
    {}
  ],
  "max_tokens": 123,
  "stream": true
}'
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}

Overview

This endpoint provides pdf analysis example:one 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:"claude-opus-4-20250514-thinking"
required
The model to use for the request
messages
array
required
Array of message objects for the conversation
max_tokens
integer
default:"1000"
Maximum number of tokens to generate
stream
boolean
default:"false"
Whether to stream the response

Request Example

curl -X POST "https://gptproto.com/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "claude-opus-4-20250514-thinking",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Summarize the contents of this document"
        },
        {
          "type": "file",
          "file": {
            "filename": "api-doc.pdf",
            "file_data": "https://www.bt.cn/data/api-doc.pdf"
          }
        }
      ]
    }
  ],
  "max_tokens": 1000,
  "stream": false
}'

Response

Success
200
Successful response
{
  "status": "success"
}

Error Responses

{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}