Connect to The SmarToken with a few lines of code. Console-issued sk keys are separate from upstream vendor secrets and should never be exposed in browsers.
You can call the API directly over HTTP; the command below is a minimal example.
pip install openai # Same OpenAI SDK pattern: set base_url to the Base URL below (.../v1)
Send Authorization: Bearer sk-..., created in the console.
https://thesmartoken.com/v1/chat/completions
curl -s "https://thesmartoken.com/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_CONSOLE_SK" \
-d '{
"model": "gpt-4o-mini",
"stream": false,
"messages": [
{ "role": "user", "content": "Explain recursion in one sentence" }
]
}'This gateway currently prioritizes complete JSON responses with stream:false. SSE streaming can be enabled in a later iteration with billing alignment.
https://thesmartoken.com/v1
Set baseURL to the address above in OpenAI-compatible clients; the full request URL isPOST https://thesmartoken.com/v1/chat/completions.