API Reference
POST /v1/completions
Single-shot completions for prompt-driven workflows.
Endpoint reference
POST
/v1/completionsSend a prompt and receive a single completion response.
Authentication: Authorization: Bearer YOUR_API_KEY
Request examples
curl https://api.deepconrad.com/v1/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"model": "conrad-4.0",
"prompt": "Write a concise release note for a dashboard refresh.",
"max_output_tokens": 180
}'Response example
{
"id": "cmpl_01JCOMP",
"object": "completion.response",
"model": "conrad-4.0",
"text": "We refreshed the dashboard to improve clarity and speed.",
"usage": {
"input_tokens": 14,
"output_tokens": 26,
"total_tokens": 40
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | The Conrad model to use. |
| prompt | string | Yes | The input prompt. |
| max_output_tokens | integer | No | Maximum length of generated output. |
| temperature | number | No | Controls variability and creativity. |
Error handling
| Status | Meaning | Notes |
|---|---|---|
| 400 | Invalid payload | Check required fields and types. |
| 401 | Unauthorized | Use a valid bearer token. |
| 429 | Rate limited | Retry gradually. |
| 500 | Internal error | Retry and monitor logs if it persists. |