API templates
Copy-paste starting points. Replace YOUR_API_KEY and base URL as needed.
Chatbot
curl https://gen-cms.com/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hello"}]}'
Image generation
curl https://gen-cms.com/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","prompt":"A red balloon","n":1,"size":"1024x1024"}'
Translation-style chat
curl https://gen-cms.com/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"system","content":"You are a translator."},{"role":"user","content":"Translate to French: Hello"}]}'
Show you are building on GenCMS:
<a href="https://gen-cms.com?ref=YOUR_USER_ID"><img src="https://gen-cms.com/badge.svg" alt="Powered by GenCMS" width="120" height="32" /></a>