Claude messages
curl --request POST \
--url https://api-vip.apigo.ai/v1/messages \
--header 'Content-Type: application/json' \
--header 'anthropic-version: <anthropic-version>' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "请总结这张图片里的关键信息"
}
]
}
]
}
'import requests
url = "https://api-vip.apigo.ai/v1/messages"
payload = {
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "请总结这张图片里的关键信息"
}
]
}
]
}
headers = {
"anthropic-version": "<anthropic-version>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'anthropic-version': '<anthropic-version>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'claude-sonnet-4-5',
max_tokens: 1024,
messages: [{role: 'user', content: [{type: 'text', text: '请总结这张图片里的关键信息'}]}]
})
};
fetch('https://api-vip.apigo.ai/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-vip.apigo.ai/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'claude-sonnet-4-5',
'max_tokens' => 1024,
'messages' => [
[
'role' => 'user',
'content' => [
[
'type' => 'text',
'text' => '请总结这张图片里的关键信息'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"anthropic-version: <anthropic-version>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-vip.apigo.ai/v1/messages"
payload := strings.NewReader("{\n \"model\": \"claude-sonnet-4-5\",\n \"max_tokens\": 1024,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"请总结这张图片里的关键信息\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("anthropic-version", "<anthropic-version>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-vip.apigo.ai/v1/messages")
.header("anthropic-version", "<anthropic-version>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"claude-sonnet-4-5\",\n \"max_tokens\": 1024,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"请总结这张图片里的关键信息\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-vip.apigo.ai/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["anthropic-version"] = '<anthropic-version>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"claude-sonnet-4-5\",\n \"max_tokens\": 1024,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"请总结这张图片里的关键信息\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "msg_01ABCxyz",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "text",
"text": "图片中是一张产品宣传海报。"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 128,
"output_tokens": 48
}
}{
"error": 123,
"message": "<string>"
}Video
/v1/messages
Creates a Claude message response for text, multimodal input, and tool use.
POST
/
v1
/
messages
Claude messages
curl --request POST \
--url https://api-vip.apigo.ai/v1/messages \
--header 'Content-Type: application/json' \
--header 'anthropic-version: <anthropic-version>' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "请总结这张图片里的关键信息"
}
]
}
]
}
'import requests
url = "https://api-vip.apigo.ai/v1/messages"
payload = {
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "请总结这张图片里的关键信息"
}
]
}
]
}
headers = {
"anthropic-version": "<anthropic-version>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'anthropic-version': '<anthropic-version>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'claude-sonnet-4-5',
max_tokens: 1024,
messages: [{role: 'user', content: [{type: 'text', text: '请总结这张图片里的关键信息'}]}]
})
};
fetch('https://api-vip.apigo.ai/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-vip.apigo.ai/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'claude-sonnet-4-5',
'max_tokens' => 1024,
'messages' => [
[
'role' => 'user',
'content' => [
[
'type' => 'text',
'text' => '请总结这张图片里的关键信息'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"anthropic-version: <anthropic-version>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-vip.apigo.ai/v1/messages"
payload := strings.NewReader("{\n \"model\": \"claude-sonnet-4-5\",\n \"max_tokens\": 1024,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"请总结这张图片里的关键信息\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("anthropic-version", "<anthropic-version>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-vip.apigo.ai/v1/messages")
.header("anthropic-version", "<anthropic-version>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"claude-sonnet-4-5\",\n \"max_tokens\": 1024,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"请总结这张图片里的关键信息\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-vip.apigo.ai/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["anthropic-version"] = '<anthropic-version>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"claude-sonnet-4-5\",\n \"max_tokens\": 1024,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"请总结这张图片里的关键信息\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "msg_01ABCxyz",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "text",
"text": "图片中是一张产品宣传海报。"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 128,
"output_tokens": 48
}
}{
"error": 123,
"message": "<string>"
}Based on Anthropic’s current public HTTP docs, Claude does not expose a dedicated video-generation endpoint. Video workflows usually require preprocessing before calling the Messages API.
- Anthropic’s official multimodal docs focus on text, images, documents, and file references
- There is no separate public Claude endpoint today for raw video understanding or video generation
- In practice, Claude video integration is an engineering workflow built from preprocessing plus
/v1/messages - For summaries, scene analysis, or video Q&A, extract frames, subtitles, or transcripts first and then send those derived inputs through Claude’s supported content blocks
- If you need actual video generation, route the request to a provider whose official API supports video creation
Authorizations
Headers
Anthropic API version header.
Example:
"2023-06-01"
Body
application/json
⌘I
