API Documentation
UserInfo
Models
Chat Completions
Completions
Image
Completions
Create completion
Query a language, code, or image model.
POST
/
completions
curl --request POST \
--url https://api.horay.ai/v1/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "<s>[INST] What is the capital of Germany? [/INST]",
"model": "meta-llama/Meta-Llama-3.1-8B-Instruct",
"max_tokens": 123,
"stop": [
"<string>"
],
"temperature": 123,
"top_p": 123,
"top_k": 123,
"repetition_penalty": 123,
"stream": true,
"n": 64,
"presence_penalty": 123,
"frequency_penalty": 123,
"logit_bias": {
"105": 21.4,
"1024": -10.5
},
"seed": 42
}'
{
"id": "<string>",
"choices": [
{
"text": "<string>",
"finish_reason": "stop",
"logprobs": {
"tokens": [
"<string>"
],
"token_logprobs": [
123
]
}
}
],
"prompt": [
{
"text": "<s>[INST] What is the capital of France? [/INST]",
"logprobs": {
"tokens": [
"<string>"
],
"token_logprobs": [
123
]
}
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"created": 123,
"model": "<string>",
"object": "text_completion"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
200
The response is of type object
.
curl --request POST \
--url https://api.horay.ai/v1/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "<s>[INST] What is the capital of Germany? [/INST]",
"model": "meta-llama/Meta-Llama-3.1-8B-Instruct",
"max_tokens": 123,
"stop": [
"<string>"
],
"temperature": 123,
"top_p": 123,
"top_k": 123,
"repetition_penalty": 123,
"stream": true,
"n": 64,
"presence_penalty": 123,
"frequency_penalty": 123,
"logit_bias": {
"105": 21.4,
"1024": -10.5
},
"seed": 42
}'
{
"id": "<string>",
"choices": [
{
"text": "<string>",
"finish_reason": "stop",
"logprobs": {
"tokens": [
"<string>"
],
"token_logprobs": [
123
]
}
}
],
"prompt": [
{
"text": "<s>[INST] What is the capital of France? [/INST]",
"logprobs": {
"tokens": [
"<string>"
],
"token_logprobs": [
123
]
}
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"created": 123,
"model": "<string>",
"object": "text_completion"
}
Assistant
Responses are generated using AI and may contain mistakes.