சீனா ஓபன்-சோர்ஸ் AI மாடல்களுக்கு Anthropic Messages API-க்கு பொருந்தும் எண்ட்பয়ிண்ட், AI Gateway வழியாக.
/api/ai/v1/anthropic/messages| அளவுரு | தேவை | விளக்கம் |
|---|---|---|
Authorization | தேவை | Bearer YOUR_API_KEY |
anthropic-version | தேவை | நிலையான மதிப்பு 2023-06-01 |
| அளவுரு | வகை | தேவை | விளக்கம் |
|---|---|---|---|
model | string | தேவை | மாடல் பெயர், எ.கா. deepseek-v4.1-flash, qwen3.8-max |
messages | array | தேவை | பின்வரும் வடிவத்தில் செய்திகள் வரிசை |
max_tokens | integer | தேவை | வெளியீட்டு டோக்கன்களின் அதிகபட்ச எண்ணிக்கை |
stream | boolean | விருப்பமானது | ஸ்ட்ரீமிங் பதிலை இயக்கவும், SSEக்கு true என அமைக்கவும் |
| அளவுரு | வகை | விளக்கம் |
|---|---|---|
id | string | தனித்துவமான பதில் அடையாளங்காட்டி |
model | string | பயன்படுத்தப்பட்ட உண்மையான மாடல் |
content | string | உருவாக்கப்பட்ட உரை உள்ளடக்கம் |
usage | object | டோக்கன் பயன்பாட்டு புள்ளிவிவரங்கள் |
curl --location 'https://your-domain.com/api/ai/v1/anthropic/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'anthropic-version: 2023-06-01' \
--data '{
"model": "deepseek-v4.1-flash",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, who are you?"}
]
}'import requests
response = requests.post(
"https://your-domain.com/api/ai/v1/anthropic/messages",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
"anthropic-version": "2023-06-01"
},
json={
"model": "deepseek-v4.1-flash",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, who are you?"}
]
}
)
print(response.json())curl --location 'https://your-domain.com/api/ai/v1/anthropic/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'anthropic-version: 2023-06-01' \
--data '{
"model": "deepseek-v4.1-flash",
"max_tokens": 1024,
"stream": true,
"messages": [{"role": "user", "content": "Hello"}]
}'