Set QA Context
DevelopingPOST
/api/v1/streaming-avatar/set-qa-contextBy default, we use a prompt to set the avatar’s knowledge base. The length of the QA context is limited to 5,000 characters. Once you use this API to set the QA context, you can use the Ask /api/v1/streaming-avatar/ask
functionality to ask questions, and the avatar will respond based on the context you have provided.
For more advanced QA capabilities, such as Retrieval-Augmented Generation (RAG), you will need to implement the QA logic yourself. In this case, you can use the Speak /api/v1/streaming-avatar/speak
API to directly control what the avatar says.
Request
Body Params application/json
channel
string
required
channel
text
string
required
QA context
Example
{
"channel": "f84fd",
"text": "Here's the text reformatted with proper line breaks: A2E stands for \"Avatars to Everyone\". Our mission is to democratize AI avatars. We are committed to providing the most economical, accessible, and flexible AI avatar solutions for developers. Join our discord community Affordable Our per-minute costs are the lowest in the industry. As developers ourselves, we understand that your application might not attract many users on day one. That's why you can start experimenting with our APIs for free. When you're ready to release, you can freely choose between pay-by-usage (minutes) or server-based billing. Start small, and scale as your application becomes a success! Accessible We've developed video.a2e.ai as a sandbox for you to experience our APIs firsthand. Without writing a single line of code, you can explore how to select an avatar, hear the voice quality, and observe the smoothness of lip motion. Every feature available on video.a2e.ai is backed by our APIs, allowing you to gauge the effort required to build your own apps on top of A2E.ai. Flexible With A2E, you can create your own avatars and even integrate voices from other TTS vendors. We don't charge for your creativity. Whether you're building mobile apps, web apps, AI companions, AI education tools, video editing software, or interactive kiosks, we're here to support your vision. To help you get started, we offer a range of copyright-free public avatars that you can use to bootstrap your development. FAQ What kind of support structure do you have in place for API developers? The recent SLA is ~99.6%. Our tech team monitors outages 24/7. In case you experience an unusual failure / timeout, you can always reach us by email (usually replied within 1 business day). If your average monthly bill qualifies, e.g. you get a Dedicated Line, you can also reach us by whatsapp (usually replied within 2 hours during business hours). Would you be able to give us a limited API access key so we can evaluate the platform? At A2E, we offer free coins for every new developers. Feel free to register your new account at https://video.a2e.ai/. Your account will automatically gain access to the API. Please read our API doc to know how to obtain the API token by using your account id."
}
Request samples
Responses
Success(200)
Bad Request(400)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
code
integer
required
0 is OK
data
object
required
trace_id
string
required
Example
{
"code": 0,
"data": {},
"trace_id": "1cda1428-7a55-4901-a3b2-a2c6498d20dc"
}
Last modified: a month ago