Skip to content

List Models

GET https://www.kkiai.com/v1/models

Given a prompt, the model will return one or more predicted completions, and can also return the probability of alternative tokens at each position.

Create a completion for the provided prompt and parameters

Request Parameters

Authorization

Add the Authorization parameter in the Header, with the value being the Token concatenated after Bearer

Example: Authorization: Bearer ********************

Header Parameters

Parameter NameTypeRequiredDescriptionExample
Content-TypestringRequiredapplication/json
AcceptstringRequiredapplication/json
AuthorizationstringOptionalBearer {{YOUR_API_KEY}}

cURL Example

bash
curl --location --request GET 'https://www.kkiai.com/v1/models' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'

Response

🟢 200 OK

Response Body

Parameter NameTypeRequiredDescription
idstringRequired
objectstringRequired
createdintegerRequired
choicesarray[object]Required
  └ indexintegerOptional
  └ messageobjectOptional
  └ finish_reasonstringOptional
usageobjectRequired
  └ prompt_tokensintegerRequired
  └ completion_tokensintegerRequired
  └ total_tokensintegerRequired

Response Example

json
{
    "id": "chatcmpl-123",
    "object": "chat.completion",
    "created": 1677652288,
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "\n\nHello there, how may I assist you today?"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 9,
        "completion_tokens": 12,
        "total_tokens": 21
    }
}