1

Sign up to get an API key

  1. Create an account here
  2. Create an API key on the dashboard
2

Call the API

Run the following code

from openai import OpenAI

client = OpenAI(
    base_url="https://api.galadriel.com/v1",
    api_key=os.environ.get("GALADRIEL_API_KEY")
)

completion = client.chat.completions.create(
    model="llama3.1",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ]
)

print(completion.choices[0].message)

What’s next?

  • Check out the currently supported models
  • To see more details about the API check out the full API docs