Claude Chat Completions
curl --request POST \
--url https://api.acedata.cloud/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}
'import requests
url = "https://api.acedata.cloud/v1/chat/completions"
payload = {
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}
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-4-8', messages: [{role: 'user', content: 'Hello!'}]})
};
fetch('https://api.acedata.cloud/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"model": "<string>",
"object": "chat.completion",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"refusal": "<string>",
"audio": {
"id": "<string>",
"expires_at": 123,
"data": "<string>",
"transcript": "<string>"
}
},
"finish_reason": "stop",
"logprobs": {}
}
],
"created": 123,
"system_fingerprint": "<string>",
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"prompt_tokens_details": {
"cached_tokens": 1,
"audio_tokens": 123,
"cache_write_tokens": 1
},
"completion_tokens_details": {
"reasoning_tokens": 1,
"audio_tokens": 1,
"accepted_prediction_tokens": 1,
"rejected_prediction_tokens": 1
},
"cost": {
"amount": 1,
"currency": "<string>",
"list_amount": 1
}
}
}{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}API Reference
Claude Chat Completions
POST
/
v1
/
chat
/
completions
Claude Chat Completions
curl --request POST \
--url https://api.acedata.cloud/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}
'import requests
url = "https://api.acedata.cloud/v1/chat/completions"
payload = {
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}
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-4-8', messages: [{role: 'user', content: 'Hello!'}]})
};
fetch('https://api.acedata.cloud/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"model": "<string>",
"object": "chat.completion",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"refusal": "<string>",
"audio": {
"id": "<string>",
"expires_at": 123,
"data": "<string>",
"transcript": "<string>"
}
},
"finish_reason": "stop",
"logprobs": {}
}
],
"created": 123,
"system_fingerprint": "<string>",
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"prompt_tokens_details": {
"cached_tokens": 1,
"audio_tokens": 123,
"cache_write_tokens": 1
},
"completion_tokens_details": {
"reasoning_tokens": 1,
"audio_tokens": 1,
"accepted_prediction_tokens": 1,
"rejected_prediction_tokens": 1
},
"cost": {
"amount": 1,
"currency": "<string>",
"list_amount": 1
}
}
}{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}Autorizaciones
API token from https://platform.acedata.cloud
Cuerpo
application/json
V1 Chat Completions Model
Opciones disponibles:
gpt-5.6-sol-fast, claude-fable-5-2, claude-fable-5-1, claude-fable-5, claude-opus-5-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 Ejemplo:
"claude-opus-4-8"
Respuesta
V1 Chat Completions Response 200 2
V1 Chat Completions Response 200
¿Esta página le ayudó?

