Key. Base URL. First call.
Three steps from zero to a response. If you are wiring up a coding agent, one command does all three — see the fast paths at the bottom.
1 · Get a key
Create a key in the dashboard under /dashboard/api. Keys are prefixed lx1_ and shown once at creation — store yours in an environment variable, not in code.
export LAYERX1_API_KEY=lx1_your_key2 · Set the base URL
Everything is served from one origin. OpenAI-style clients append /v1; Anthropic-style clients use the bare origin (their SDKs add /v1/messages themselves).
# OpenAI SDKs / OpenAI-compatible tools
https://api.layerx1.in/v1
# Anthropic SDKs / Claude Code
https://api.layerx1.in3 · Make the first call
curl https://api.layerx1.in/v1/chat/completions \
-H "authorization: Bearer $LAYERX1_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "lx1-gpt-oss-120b",
"messages": [{ "role": "user", "content": "Say hello." }]
}'Swap lx1-gpt-oss-120b for any model in the catalog — every plan includes all of them. Set stream: true for tokens as they are generated (see Streaming).
The Anthropic dialect works the same way: POST to /v1/messages with your key in x-api-key. Both dialects accept every model in the catalog. See the API reference.
Fast paths for coding agents
The layerx1 CLI configures popular coding agents in one command — no install, safe to re-run:
npx layerx1