completion mode: each call submits its own input values and returns one response, with no conversation state carried between calls.
Authentication, the base URL, and the
user field that scopes end-user data are covered in Get Started and End User Identity.Generate Text
- Send Completion Message: send
inputsto fill the app’s prompt template and generate a response. Blocking mode returns the full response once it finishes; streaming mode deliversmessageevents ending inmessage_end, plustts_messageevents when the app has text-to-speech auto-play enabled. - Stop Completion Message Generation: interrupt a streaming response before it finishes.
Handle Files
- Upload File: upload an image, document, audio, or video file for Send Completion Message to reference. Files are scoped to the uploading end user.
- Download File: preview or download an uploaded file, as long as it belongs to a message in your app.
- Get End User Info: look up an end user’s details from an end-user ID, such as the
created_byin the Upload File response.
Transcribe and Synthesize Speech
- Convert Audio to Text: transcribe an uploaded audio file (MP3, M4A, WAV, AMR, or MPGA, up to 30 MB) so end users can speak their input instead of typing it.
- Convert Text to Audio: synthesize the generated response back into speech.
Retrieve App Info and Settings
- Get App Info: the app’s name, description, tags, and mode.
- Get App Parameters: the fields your calls send in
inputs(names, types, defaults) plus the app’s feature switches—the basis for building requests or a client UI. - Get App Meta: tool icons and other configuration metadata.
- Get App WebApp Settings: the WebApp’s site configuration, theme, and customization options.
Collect Feedback
- Submit Message Feedback: end users rate a response as
likeordislike, with an optional text comment. - List App Feedbacks: every feedback submitted across the app, from both end users and admins.