API reference
Developer documentation
TKNMart exposes OpenAI-compatible routes while metering usage against customer wallets and your configured supplier account.
List models
curl https://tknmart.com/v1/models \ -H "Authorization: Bearer tm_live_..."
Chat completions
curl https://tknmart.com/v1/chat/completions \
-H "Authorization: Bearer tm_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "tm/openai/gpt-5.4-mini",
"messages": [{"role": "user", "content": "Hello"}]
}'Image generation
curl https://tknmart.com/v1/images/generations \
-H "Authorization: Bearer tm_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "tm/openai/gpt-image-2",
"prompt": "A clean product mockup of a TKNMart API dashboard",
"size": "1024x1024",
"quality": "low"
}'Production setup requires Postgres, Stripe webhooks, and a supplier API key.
Customer API keys are hashed before storage and never reveal the supplier API key.
Chat, streaming, and image generation are billed against the active admin price row.