curl. Every step works the same way
from a mobile client.
Before you start
You need three things:- The base URL. Production is
https://client-api.lala.ist. - A Lala Supabase project. The client signs in against this project.
- A Supabase access token for a signed-in user. Read Authentication for how to get one.
The token is a normal Supabase access token. Lala does not issue its own tokens, and there is no
API key.
1. Check that the service is up
{"ok":true}. This endpoint needs no token.
2. Create the student
onboardingComplete is false, show the onboarding screen. Read
Profile and onboarding.
3. Write the profile
onboardingComplete becomes true when
grade and examType are set, and, for YKS, field too.
4. Stream an answer
-N flag disables buffering, so you see each event when it arrives. The response is a
text/event-stream:
message_start, and append the chunk events to the bubble named by
index. Lala answers in one message most of the time, and in two or three short ones sometimes.
Replace your bubbles with the messages array of the done event. Read
Stream a chat answer for the full contract.
5. Read the history back
nextCursor of the response as before to
read older messages. Call it when the chat screen opens. Read
Conversation history.
Next steps
Errors and limits
Status codes, body shapes, and the hard limits.
Push notifications
Lala writes first. Register the FCM token.