a text model helps you to get started by python. if you want to explore more, please refer to the API Reference.
1
development environment
Python version >=3.7.1
install the OpenAI
Copy
pip install --upgrade openai
2
Enjoy
Sending the first API Request.
Copy
from openai import OpenAIclient = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.horay.ai/v1")response = client.chat.completions.create( 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=True)for chunk in response: print(chunk.choices[0].delta.content)
3
Contact US
If you have any questions, welcome to feedback through the contact support@horay.ai.