LAYSO AI CLI
Connect LAYSO AI CLI to leading AI models through LAYSO AI. This article uses native VitePress Markdown so the on-page outline can index every step.
One key for every platform model
LAYSO AI bills at the selected model's current price. Every successful request has an itemized charge; failed tasks are not charged.
Before you begin
- Category: Quick setup tool
- Recommended protocol: OpenAI / Anthropic / Gemini
- Create an API key in the LAYSO AI dashboard.
- Copy an exact model ID from the dashboard catalog; do not guess aliases.
Configure LAYSO AI
| Field | Value |
|---|---|
| Provider | LAYSO AI |
| Base URL | https://api.layso.ai/v1 |
| API key / environment | LAYSO_API_KEY |
| Request header | Authorization: Bearer $LAYSO_API_KEY |
| Model | <MODEL_ID> |
Save the settings and restart the client so the provider and environment variables are reloaded.
Install and launch
bash
npm install -g laysoai
laysoaiFirst request
Use a minimal request to validate the API key, network path, and model ID before starting a long task.
bash
curl https://api.layso.ai/v1/models \
-H "Authorization: Bearer $LAYSO_API_KEY"After it succeeds, send a short client prompt and confirm the returned model matches the dashboard selection.
Authentication and troubleshooting
Checklist
- Confirm the key has no missing characters, spaces, or line breaks.
- Ensure the Base URL does not repeat
/v1, or/v1beta. - Fully quit and reopen the terminal or client so environment variables reload.
- Refresh the model catalog and copy the exact model ID.
- Never expose a full key in screenshots, logs, examples, or repositories.
Common errors
| Issue | What to check |
|---|---|
401 / 403 | API key, environment variable, and protocol-specific request header. |
404 | Missing or duplicated protocol path in the Base URL. |
| Unknown model | Use the exact ID displayed in the dashboard catalog. |
| No charge record | Confirm the task succeeded; failed tasks are not charged. |
Billing and security
- One LAYSO AI API key can access all platform models.
- Every successful request has an itemized charge in task details.
- Failed tasks are not charged.
- Keep the key in local environment variables or the client's secure storage.
