API Reference
Retrieve a stored chat completion
Returns a chat completion previously stored for this account.
GET
/
v1
/
chat
/
completions
/
{completion_id}
Retrieve a stored chat completion
curl --request GET \
--url https://api.synapsai.cloud/v1/chat/completions/{completion_id}import requests
url = "https://api.synapsai.cloud/v1/chat/completions/{completion_id}"
response = requests.get(url)
print(response.text){
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "<string>",
"content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"top_logprobs": {}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}Response
Stored chat completion
Response schema for the chat completions endpoint.
⌘I
Retrieve a stored chat completion
curl --request GET \
--url https://api.synapsai.cloud/v1/chat/completions/{completion_id}import requests
url = "https://api.synapsai.cloud/v1/chat/completions/{completion_id}"
response = requests.get(url)
print(response.text){
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "<string>",
"content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"top_logprobs": {}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}