Docs.
Detailed guides for every way to connect to 2KEN. Use the same token, base URL, and model configuration from command lines, OpenAI-compatible SDKs, HTTP APIs, code clients, and switching tools.
Bash
Call 2KEN directly with cURL from Bash on macOS, Linux, or WSL. Use this to verify the token, base URL, and model name.
Endpoint
Replace only the base URL. SDK shape, JSON body, and bearer auth stay familiar.
https://apis.2ken.com/v1export TWOKEN_API_KEY="sk-2ken-your-key"
curl https://apis.2ken.com/v1/chat/completions \
-H "Authorization: Bearer $TWOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1-mini",
"messages": [
{ "role": "user", "content": "Say hello from 2KEN." }
]
}'NotesKeep tokens in environment variables instead of committing them to scripts. Move production secrets to server-side secret storage or CI secrets.
Ready to ship?
Open the console next, copy a token, inspect model policy, and place the real values into the matching client.