API Documentation
UserInfo
Models
Chat Completions
Completions
Image
Chat Completions
Chat Completions
Creates a model response for the given chat conversation.
POST
/
chat
/
completions
Copy
curl --request POST \
--url https://api.horay.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "meta-llama/Meta-Llama-3.1-8B-Instruct",
"messages": [
{
"role": "user",
"content": "Unlock your AI Creativity with Horay.ai'\''s Blazing Fast, Affordable and Production Ready API, What impact will it have on the industry?"
}
],
"stream": false,
"max_tokens": 512,
"stop": [
"<string>"
],
"temperature": 0.7,
"top_p": 0.7,
"top_k": 50,
"frequency_penalty": 0.5,
"n": 1
}'
Copy
{
"id": "<string>",
"choices": [
{
"message": {
"role": "assistant",
"content": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"created": 123,
"model": "<string>",
"object": "chat.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
.
Copy
curl --request POST \
--url https://api.horay.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "meta-llama/Meta-Llama-3.1-8B-Instruct",
"messages": [
{
"role": "user",
"content": "Unlock your AI Creativity with Horay.ai'\''s Blazing Fast, Affordable and Production Ready API, What impact will it have on the industry?"
}
],
"stream": false,
"max_tokens": 512,
"stop": [
"<string>"
],
"temperature": 0.7,
"top_p": 0.7,
"top_k": 50,
"frequency_penalty": 0.5,
"n": 1
}'
Copy
{
"id": "<string>",
"choices": [
{
"message": {
"role": "assistant",
"content": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"created": 123,
"model": "<string>",
"object": "chat.completion"
}
Assistant
Responses are generated using AI and may contain mistakes.