Skip to main content
Create a key, send a request, and check its cost. Already have a key? Start at step 2.

1. Create an API key

Sign in to the console. Follow onboarding, or open api keys → new in your workspace. Copy the key when it is shown and check that the workspace has credits. Set it in the terminal where you will run the example:
Keep the key on your server or local machine, never in browser code. An agent can use API registration instead.

2. Send a request

Choose one tab. openai/gpt-4o-mini is a small text model used for this first call; you can replace it with another text model from the catalog.
The answer is in choices[0].message.content.
Text and token counts vary. This response is abbreviated:

3. Find your request

Open logs in the console. Select your request to see its status, tokens, latency, and cost. Make sure you are viewing the workspace that owns the API key.
You can also read the latest request through the API:

If the request fails

Next: stream the answer or connect your preferred SDK.