API Reference
POST /v1/chat
Primary endpoint for conversational AI applications.
Endpoint reference
POST
/v1/chatSend a message history and receive a model-generated assistant response.
Authentication: Authorization: Bearer YOUR_API_KEY
Request examples
curl https://api.deepconrad.com/v1/chat \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"model": "conrad-4.0",
"messages": [
{"role": "user", "content": "Write a concise welcome message for new users."}
]
}'Response example
{
"id": "chat_01JCHAT",
"object": "chat.response",
"model": "conrad-4.0",
"output": [
{
"role": "assistant",
"content": "Welcome to Conrad AI. Here is a concise message you can use..."
}
],
"usage": {
"input_tokens": 24,
"output_tokens": 51,
"total_tokens": 75
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID such as conrad-3.1, conrad-4.0, or conrad-5.0. |
| messages | array | Yes | Ordered chat messages with role and content. |
| stream | boolean | No | Enable partial streaming output. |
| temperature | number | No | Adjust variation and creativity. |
| max_output_tokens | integer | No | Upper output token limit. |
Error handling
| Status | Meaning | Notes |
|---|---|---|
| 400 | Invalid request body | Check JSON formatting and field names. |
| 401 | Unauthorized | Add a valid bearer token. |
| 429 | Rate limited | Retry with backoff. |
| 500 | Internal error | Retry and contact support if persistent. |