Skip to content

Quick Start

This page walks you through getting an API key and making your first call. By the end you’ll have streamed a response, and know where to go for tool calling, vision, and structured outputs.

  1. Sign in at console.aiand.com — Google, GitHub, or magic link.
  2. Create an API key. Keys start with sk- and are shown once — store it in your secret manager.
  3. Add credits on the billing page. Minimum top-up is $1.
Terminal window
pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://api.aiand.com/v1",
api_key="sk-your-api-key",
)
response = client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Add stream=True and iterate. You get tokens as they’re produced, plus a final cost and request-id trailer event.

stream = client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[{"role": "user", "content": "Tell me a haiku about Tokyo."}],
stream=True,
stream_options={"include_usage": True},
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)

Streaming details, including the aiand.metadata trailer, are documented at Streaming.

You want to…Go here
Let the model call your functionsTool Calling
Get JSON output that matches a schemaStructured Outputs
Send an image to the modelVision
Build something end-to-end (RAG, agent, extraction…)Cookbook
Wire ai& into LangChain / LlamaIndex / Vercel AI SDKIntegrations
Migrate an existing OpenAI / Anthropic projectMigrating from OpenAI · Migrating from Anthropic

For browser apps and the console, ai& also supports JWT auth with an X-Org-ID header. See Authentication and Switching Orgs.