curl --request POST \
--url https://api.pawa-ai.com/v1/chat/request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "pawa-v1-ember-20240924",
"messages": [
{
"role": "system",
"content": [
{
"type": "text",
"text": "You are a helpful assistant that answers questions asked "
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is the current president of Tanzania?"
}
]
}
],
"temperature": 0.1,
"top_p": 0.95,
"max_tokens": 4096,
"frequency_penalty": 0.3,
"presence_penalty": 0.3,
"seed": 2024,
"stream": false
}
'{
"success": true,
"message": "Chat request processed successfully",
"data": {
"request": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "Mimi ni pawa..."
},
"matched_stop": 106
}
],
"created": 1753304351,
"model": "pawa-v1-blaze-20250318",
"object": "chat.request"
}
}This endpoint is used to receive chat request from user through API and return the answer.
curl --request POST \
--url https://api.pawa-ai.com/v1/chat/request \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "pawa-v1-ember-20240924",
"messages": [
{
"role": "system",
"content": [
{
"type": "text",
"text": "You are a helpful assistant that answers questions asked "
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is the current president of Tanzania?"
}
]
}
],
"temperature": 0.1,
"top_p": 0.95,
"max_tokens": 4096,
"frequency_penalty": 0.3,
"presence_penalty": 0.3,
"seed": 2024,
"stream": false
}
'{
"success": true,
"message": "Chat request processed successfully",
"data": {
"request": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "Mimi ni pawa..."
},
"matched_stop": 106
}
],
"created": 1753304351,
"model": "pawa-v1-blaze-20250318",
"object": "chat.request"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The name of the model to use.
pawa-v1-ember-20240924, pawa-v1-blaze-20250318 "pawa-v1-ember-20240924"
Messages to send to the model
Show child attributes
The role of the message sender
user, system, assistant, tool, function "user"
[
{
"role": "system",
"content": [
{
"type": "text",
"text": "You are a helpful assistant that answers questions asked "
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is the current president of Tanzania?"
}
]
}
]Sampling temperature
0 <= x <= 2Nucleus sampling (top-p)
0 <= x <= 1Maximum number of tokens in the response
Penalty for repeated tokens
-2 <= x <= 2Penalty for new topic tokens
-2 <= x <= 2Random seed for reproducibility
Whether to stream the response
Chat request processed successfully
true
"Chat request processed successfully"
Show child attributes
Show child attributes
1753304351
"pawa-v1-blaze-20250318"
"chat.request"