Quick Start
Authentication
Usage with the OpenAI Python SDK
Installation
pip install openaiUsage
Sample Code
import openai
# Set the endpoint and API key for enfer.ai
openai.api_base = "https://api.enfer.ai/v1"
openai.api_key = "<YOUR_ENFER_API_KEY>"
# Example: Chat Completion
response = openai.ChatCompletion.create(
model="mistralai/mistral-nemo", # Example model name
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Why are we still here?"}
]
)
# Print the AI's reply
print(response.choices[0].message.content)
Supported Features
Last updated