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. Get a key and credits
Section titled “1. Get a key and credits”- Sign in at console.aiand.com — Google, GitHub, or magic link.
- Create an API key. Keys start with
sk-and are shown once — store it in your secret manager. - Add credits on the billing page. Minimum top-up is $1.
2. Make your first call
Section titled “2. Make your first call”pip install openaifrom 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)npm install openaiimport OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.aiand.com/v1", apiKey: "sk-your-api-key",});
const response = await client.chat.completions.create({ model: "openai/gpt-oss-120b", messages: [{ role: "user", content: "Hello!" }],});console.log(response.choices[0].message.content);curl https://api.aiand.com/v1/chat/completions \ -H "Authorization: Bearer sk-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-oss-120b", "messages": [{"role": "user", "content": "Hello!"}] }'3. Stream the response
Section titled “3. Stream the response”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.
4. Pick your next step
Section titled “4. Pick your next step”| You want to… | Go here |
|---|---|
| Let the model call your functions | Tool Calling |
| Get JSON output that matches a schema | Structured Outputs |
| Send an image to the model | Vision |
| Build something end-to-end (RAG, agent, extraction…) | Cookbook |
| Wire ai& into LangChain / LlamaIndex / Vercel AI SDK | Integrations |
| Migrate an existing OpenAI / Anthropic project | Migrating from OpenAI · Migrating from Anthropic |
Authentication beyond API keys
Section titled “Authentication beyond API keys”For browser apps and the console, ai& also supports JWT auth with an X-Org-ID header. See Authentication and Switching Orgs.