- Open the developer dashboard with your Kiuron account (it's free, and we give you credit to try it).
- Click Website widget: give it a name, your domains, colour, greeting and instructions (who your business is, what it answers and what it doesn't).
- Copy the code and paste it before
</body> on your site.
<script src="https://kiuron.com/widget.js"
data-clave="kiu_pub_…"
data-color="#8fdc5a" async></script>
Optional: data-texto="Need help?" shows a label next to the button and data-posicion="izquierda" moves it to the left. On phones the chat opens full screen.
The API
Create an API key in the dashboard. It's secret: only use it from your server, never in the code of a website or app the public can see.
Request
curl https://kiuron.com/nube/v1/chat \
-H "Authorization: Bearer kiu_sk_…" \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Write a slogan for a bakery"}],
"system": "Answer in one line."
}'
Response
{
"texto": "Real bread, freshly baked every morning.",
"modelo": "nube",
"cortada": false,
"uso": {"entrada": 412, "salida": 12, "coste": 0.000514, "moneda": "EUR"}
}
Parameters
| Field | What it is |
messages | Required. A list of {"role": "user" | "assistant", "content": "…"} ending with a user message. Up to 50 messages. |
system | Optional. Instructions for this request (added to the key's own). |
model | Optional. nube (fast, default) or nube-pro (smarter and more expensive). |
max_tokens | Optional. Maximum answer length (up to 2,048). |
stream | Optional. With true, the answer arrives in pieces: one JSON line per piece ({"texto": "…"}) and finally {"fin": true, "uso": {…}}. |
JavaScript (Node.js)
const r = await fetch("https://kiuron.com/nube/v1/chat", {
method: "POST",
headers: {"Authorization": "Bearer " + process.env.KIURON_KEY, "Content-Type": "application/json"},
body: JSON.stringify({messages: [{role: "user", content: "Summarize this text: …"}]})
});
const {texto, uso} = await r.json();
Python
import os, requests
r = requests.post("https://kiuron.com/nube/v1/chat",
headers={"Authorization": f"Bearer {os.environ['KIURON_KEY']}"},
json={"messages": [{"role": "user", "content": "Translate into Spanish: good morning"}]})
print(r.json()["texto"])
Errors
| Code | Meaning |
400 | Invalid request (check messages). |
401 | Key invalid, deleted or paused. |
402 | No credit left: top up in the dashboard. |
429 | You've reached the daily limit you set for the key. |
502 / 503 | The service couldn't answer: try again in a few seconds. |
All error responses are JSON: {"error": "…"}.
Pricing
No monthly fees or commitments: you top up credit (from €10, VAT included, with an invoice) and each answer deducts its cost based on the tokens it uses. With the regular model, a short question and its answer costs a fraction of a cent. Exact prices per million tokens are in the dashboard. Credit never expires, and we give you free credit when you start.
Security and privacy
- The widget only works on the domains you list; it won't load on other sites.
- Secret keys are stored hashed (you only see them once) and you can pause or delete them any time.
- Messages are never used to train AI models or for advertising.
- You can set a daily message limit per key so you never overspend.
Frequently asked questions
How much does it cost?
You only pay for what you use, with prepaid credit from €10. A short question with the regular model costs a fraction of a cent. We give you free credit to get started.
Do I need to code to use the widget?
No. You copy one line of code and paste it into your site. It works on WordPress, Shopify, Wix and any website.
Can I decide what it answers?
Yes. You write the instructions: who your business is, what it should know and what it shouldn't talk about.
What happens when my credit runs out?
The widget stops answering and the API returns error 402 until you top up. Nothing is ever charged without credit.
Create my keys