Skip to content
WayJet AI

Make your first request.

This guide shows you how to connect the OpenAI SDK to WayJet, set up an API key and send your first model request.

01 / ACCOUNT

Create your account#

Create a WayJet account with email or Google. If you want to explore before writing code, start in the Playground.

02 / API KEY

Set up your API key#

Create an API key in your WayJet account. Store it as an environment variable on your own machine or server.

Open API keys
Terminal · macOS / Linux
export WAYJET_API_KEY="YOUR_WAYJET_API_KEY"
03 / FIRST REQUEST

Make your first request#

Use https://api.wayjet.ai/v1 as your base URL. The example reads your key from WAYJET_API_KEY.

BASE URL
https://api.wayjet.ai/v1
SETUPpython -m pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.wayjet.ai/v1",
    api_key=os.environ["WAYJET_API_KEY"],
)
response = client.chat.completions.create(
    model="claude-fable-5",
    messages=[{"role": "user", "content": "Hello, WayJet."}],
)
print(response.choices[0].message.content)
main.pyOpenAI-compatible
04 / MODELS

Choose your model#

Change the model value for your next request. Choose an example below to update the code above.

FAQ

The sample prints the model’s reply as text. The exact wording varies. If the request fails, check the key, model ID and account access before retrying.

NEXT STEPS

Keep building#

Explore WayJet