curl --request POST \
--url http://co-mind-platform-host/v1/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"temperature": 1,
"max_tokens": 16,
"top_p": 1,
"stream": false
}
'{
"id": "<string>",
"object": "text_completion",
"created": 123,
"model": "<string>",
"choices": [
{
"text": "<string>",
"index": 123,
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}Legacy text completion endpoint
curl --request POST \
--url http://co-mind-platform-host/v1/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"temperature": 1,
"max_tokens": 16,
"top_p": 1,
"stream": false
}
'{
"id": "<string>",
"object": "text_completion",
"created": 123,
"model": "<string>",
"choices": [
{
"text": "<string>",
"index": 123,
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}Bearer token authentication. Supports two token types:
POST /v1/auth/loginPOST /v1/api-tokens, format: cmnd_<tokenId>.<secret>