Claude Messages
curl --request POST \
--url https://api.acedata.cloud/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "claude-opus-5",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 1024
}
'import requests
url = "https://api.acedata.cloud/v1/messages"
payload = {
"model": "claude-opus-5",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 1024
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'claude-opus-5',
messages: [{role: 'user', content: 'Hello!'}],
max_tokens: 1024
})
};
fetch('https://api.acedata.cloud/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "<string>",
"citations": [
{}
]
}
],
"model": "<string>",
"stop_reason": "end_turn",
"stop_sequence": "<string>",
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"cache_creation": {
"ephemeral_1h_input_tokens": 123,
"ephemeral_5m_input_tokens": 123
},
"service_tier": "standard",
"cost": 123
},
"stop_details": {
"type": "refusal",
"category": "cyber",
"explanation": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}API Reference
Claude Messages
POST
/
v1
/
messages
Claude Messages
curl --request POST \
--url https://api.acedata.cloud/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "claude-opus-5",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 1024
}
'import requests
url = "https://api.acedata.cloud/v1/messages"
payload = {
"model": "claude-opus-5",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 1024
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'claude-opus-5',
messages: [{role: 'user', content: 'Hello!'}],
max_tokens: 1024
})
};
fetch('https://api.acedata.cloud/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "<string>",
"citations": [
{}
]
}
],
"model": "<string>",
"stop_reason": "end_turn",
"stop_sequence": "<string>",
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"cache_creation": {
"ephemeral_1h_input_tokens": 123,
"ephemeral_5m_input_tokens": 123
},
"service_tier": "standard",
"cost": 123
},
"stop_details": {
"type": "refusal",
"category": "cyber",
"explanation": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"trace_id": "<string>"
}التفويضات
API token from https://platform.acedata.cloud
الجسم
application/json
V1 Messages Model
الخيارات المتاحة:
claude-fable-5-1, claude-fable-5, claude-opus-5, claude-opus-4-8, claude-sonnet-5, claude-sonnet-4-6, claude-opus-4-7, claude-opus-4-6, claude-opus-4-5-20251101, claude-haiku-4-5-20251001, claude-sonnet-4-5-20250929, claude-opus-4-1-20250805, claude-sonnet-4-20250514, claude-opus-4-20250514, claude-3-7-sonnet-20250219, claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022, claude-3-5-sonnet-20240620, claude-3-haiku-20240307, claude-3-sonnet-20240229 مثال:
"claude-opus-4-8"
Required array length:
1 - 100000 elementsShow child attributes
Show child attributes
V1 Messages Max Tokens
النطاق المطلوب:
x >= 1مثال:
1024
Show child attributes
Show child attributes
V1 Messages Stop Sequences
V1 Messages Stream
V1 Messages Temperature
النطاق المطلوب:
0 <= x <= 1مثال:
1
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
V1 Messages Tools
Show child attributes
Show child attributes
V1 Messages Top K
V1 Messages Top P
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
V1 Messages Output Config
Show child attributes
Show child attributes
Show child attributes
Show child attributes
الاستجابة
V1 Messages Response 200
V1 Messages Response 200 Id
الخيارات المتاحة:
message الخيارات المتاحة:
assistant - Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
V1 Messages Response 200 Model
الخيارات المتاحة:
end_turn, max_tokens, stop_sequence, tool_use, pause_turn, refusal, model_context_window_exceeded Show child attributes
Show child attributes
Show child attributes
Show child attributes
هل كانت هذه الصفحة مفيدة؟

