Quickstart
This guide will help you get started using the Avian API with Python.
Step 1: Create an API Key
Send your first request
from openai import OpenAI
client = OpenAI(
api_key="avian-your-api-key-here",
base_url="https://api.avian.io/v1"
)
completion = client.chat.completions.create(
model="Meta-Llama-3.1-405B-Instruct",
messages=[
{"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."},
{"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."}
]
)
print(completion.choices[0].message)Last updated


