Skip to main content
POST
/
chat
/
request
Chat request
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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
  • Basic Chat
  • Multimodal Chat
  • Tools Chat
  • Reasoning Chat
  • RAG Chat
  • Agentic RAG Chat
  • In Memory Chat
  • Structured Ouput
model
enum<string>
default:pawa-v1-ember-20240924
required

The name of the model to use.

Available options:
pawa-v1-ember-20240924,
pawa-v1-blaze-20250318
Example:

"pawa-v1-ember-20240924"

messages
object[]
required

Messages to send to the model

Example:
[
{
"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
number
default:0.1

Sampling temperature

Required range: 0 <= x <= 2
top_p
number
default:0.95

Nucleus sampling (top-p)

Required range: 0 <= x <= 1
max_tokens
number
default:4096

Maximum number of tokens in the response

frequency_penalty
number
default:0.3

Penalty for repeated tokens

Required range: -2 <= x <= 2
presence_penalty
number
default:0.3

Penalty for new topic tokens

Required range: -2 <= x <= 2
seed
number
default:2024

Random seed for reproducibility

stream
boolean
default:false

Whether to stream the response

Response

Chat request processed successfully

success
boolean
required
Example:

true

message
string
required
Example:

"Chat request processed successfully"

data
object
required
I