QV Chat for developers

Put the Lao Airlines booking assistant in your own product: call the chat API and draw its cards yourself, or add the ready-made widget with one script tag. Flights, prices, bookings and payment status always come from Sabre and the Lao Airlines Payment Portal; payment happens on the Portal, never in your page or app.

1. Get a client

Lao Airlines registers your client and gives you a client id and an API key (shown once), with the web origins allowed to call the API from a browser and to embed the widget. Keep the key on your server.

2. Chat API

POST https://qvaichat.dev.onlynx.co.th/api/v1/chat with Authorization: Bearer <key>. Send the conversation; append the returned messages to it for the next turn. cards carry structured results (flight_results, booking, payment_link, payment_status, payment_history, seat_map, seat_assignment) to draw in your UI. To reserve seats, send the customer's choice as a seat-request block (docs/API.md §2.6).

curl -s https://qvaichat.dev.onlynx.co.th/api/v1/chat \
  -H "Authorization: Bearer $QVCHAT_KEY" -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Flights from Vientiane to Bangkok on 2026-11-20"}]}'

Add "stream": true for server-sent events: text (deltas), tool, card, done (reply and messages) and error. Full reference: docs/API.md in the qvchat repository.

To choose the assistant model, add "model" with one of the names listed at https://qvaichat.dev.onlynx.co.th/api/models; the answer's model says which one replied.

See it working: /messenger is a messenger-style chat built only on this API, with a log of every call and the events it streams back.

3. Widget

The full chat (flight cards, passenger form, Pay card, My payments) in a floating panel on your site:

<script src="https://qvaichat.dev.onlynx.co.th/widget.js" data-client="YOUR-CLIENT-ID" async></script>

Options: data-position="left", data-open="true", data-label="…"; from script: QVChat.open(), QVChat.close(). The widget only loads on the origins registered for your client.

This page runs the widget for its own client: use the button at the bottom right.