Developer quickstart
Create a key, install one client, and print your first eb1 response. The Python path below is copy-run complete and keeps the API key out of source code, shared environment files, and shell history.
On this page 1 of 9
0. Get access#
eb1 is in invite-only beta. Request access at the console request-access page; you will receive an invite email with a console login and a support channel.
1. Create an API key#
Open API Keys in the Keiro console, choose Create API key, and give the key a workload-specific name.
The full secret is shown once. Save it in an approved password manager or secret manager before closing the reveal. Do not paste it into this page, a repository, a ticket, or a screenshot.
2. Install the OpenAI Python SDK#
Use Python 3.11 or newer. A virtual environment keeps the install local to this walkthrough and avoids the externally-managed-environment error on system Pythons:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade openai
3. Create the request script#
Save this as quickstart.py:
from getpass import getpass
from openai import OpenAI
client = OpenAI(
base_url="https://api.keirolabs.ai/v1",
api_key=getpass("Keiro API key: "),
)
response = client.responses.create(
model="eb1-preview",
input="In one sentence, explain why idempotency matters.",
)
print(response.output_text)
getpass() reads the key without echoing it and passes it directly to this client process. The script never stores the secret.
4. Run it#
python3 quickstart.py
At the prompt, paste the key you saved. A successful run prints one generated sentence, for example:
Idempotency lets a safely retried operation return the original result without executing twice.
The wording varies. Success means the process exits normally and response.output_text contains generated text.
Raw HTTP alternative#
Use this path to verify the exact request and response body without an SDK:
printf 'Keiro API key: '
IFS= read -rs KEIRO_BEARER
printf '\n'
curl -sS https://api.keirolabs.ai/v1/responses \
-H "Content-Type: application/json" \
-d '{
"model": "eb1-preview",
"input": "In one sentence, explain why idempotency matters."
}' \
-H @- <<<"Authorization: Bearer $KEIRO_BEARER"
The prompt works in both bash and zsh, and -H @- (curl 7.55 or newer) reads the Authorization header from stdin so the secret never appears in the process argument list.
In raw JSON, generated text appears in the assistant message's output content. SDK output_text is the convenient aggregate of those text parts.
Keiro CLI alternative#
The native CLI stores credential metadata and owner-only secret files through its setup flow:
python3 -m pip install --upgrade keiro
keiro setup
keiro "In one sentence, explain why idempotency matters."
Use this saved-credential path for later Keiro CLI and native-client work.
Troubleshooting#
| Symptom | Check |
|---|---|
401 | The key was copied completely, is still active, and belongs to the selected organization |
403 | The key or organization is not allowed to use the requested capability |
404 or model error | The base URL includes /v1, and eb1-preview appears in GET /v1/models for this key |
429 | Honor Retry-After; check account rate or spend limits before retrying |
| Connection or TLS failure | Check Status and support and confirm the exact public base URL |
Python has no output_text | Upgrade the OpenAI SDK and inspect the raw output items for text content |
Do not solve an authentication failure by putting the key into a URL, command argument, source file, or shared environment file.
Next steps#
- Hand setup to your coding agent with Agent-driven setup.
- Run your coding agent on eb1: Claude Code, Codex, or Omnigent — each is a dedicated key and a few minutes of setup.
- Building an application? Choose an endpoint in API reference and compare public IDs in Models.
- Migrating existing code? See SDKs and CLI and Migration.
- Before load testing: Errors, Idempotency, and Usage and billing.
First request complete
You are ready to build
Choose a model for your workload, add production-safe error handling, or connect tools to your next request.