Skip to main content
POST
/
v1
/
messages
PDF Analysis example:one
curl --request POST \
  --url https://gptproto.com/v1/messages \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'anthropic-version: <anthropic-version>' \
  --data '{
  "model": "<string>",
  "messages": [
    {}
  ],
  "max_tokens": 123,
  "temperature": 123,
  "top_p": 123,
  "top_k": 123,
  "stream": true,
  "stop_sequences": [
    {}
  ]
}'
{
  "error": {
    "type": "authentication_error",
    "message": "Invalid API key"
  }
}

Overview

This endpoint provides pdf analysis example:one functionality using Anthropic native format.

Authentication

This endpoint requires authentication using an API key header.
Authorization
string
required
Your API key for authentication
anthropic-version
string
default:"2023-06-01"
required
The version of the Anthropic API to use

Request Body

model
string
default:"claude-opus-4-20250514"
required
The model to use for the request
messages
array
default:"[{'role': 'user', 'content': 'Who are you?'}]"
required
Array of message objects for the conversation. Each message must have a role (user or assistant) and content.
max_tokens
integer
default:"1024"
required
The maximum number of tokens to generate before stopping
temperature
number
default:"1.0"
Amount of randomness injected into the response. Ranges from 0.0 to 1.0
top_p
number
default:"1.0"
Use nucleus sampling. Ranges from 0.0 to 1.0
top_k
integer
default:"null"
Only sample from the top K options for each subsequent token
stream
boolean
default:"false"
Whether to incrementally stream the response using server-sent events
stop_sequences
array
Custom text sequences that will cause the model to stop generating

Request Example

curl -X POST "https://gptproto.com/v1/messages" \
  -H "Authorization: YOUR_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "claude-opus-4-20250514",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Who are you?"
    }
  ]
}'

Response

Success
200
Successful response with Anthropic format
{
  "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "I'm Claude, an AI assistant created by Anthropic."
    }
  ],
  "model": "claude-opus-4-20250514",
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "usage": {
    "input_tokens": 12,
    "output_tokens": 15
  }
}

Error Responses

{
  "error": {
    "type": "authentication_error",
    "message": "Invalid API key"
  }
}