API · Get started
Building with AI agents
Everything the console does is in the API, so an AI agent with a key can do the setup for you: create the agent, pick its face and voice, teach it your business and start sessions.
Give it the docs
Point your AI assistant or coding agent at one of these. Both are generated from the API, so they never fall behind it.
- •https://talk.selviaai.com/v1/llms.txt: the whole API in one text file: what it is, the quick start, sessions, the render-mode protocol and every route on one line.
- •https://talk.selviaai.com/v1/openapi.json: every route with its request and response shapes, for tools that read OpenAPI.
- •https://talk.selviaai.com/v1/docs: the same, browsable, for you.
An example instruction
Prompt
You can use the Selvia AI API with the key in the SELVIA_API_KEY environment variable.
Read https://talk.selviaai.com/v1/llms.txt first: it describes every route.
Send the key as "Authorization: Bearer $SELVIA_API_KEY". Base URL: https://talk.selviaai.com/v1
Task: create an agent for "Bloom Hair Studio" (https://bloomhair.example) that greets visitors
in English and Spanish, uses a friendly woman's face and voice, and stands in a salon backdrop.
Build its knowledge from the website, then start a session and give me the player link.The catalog routes describe every face in words and give stills of it, so an agent that can't see a gallery can still choose: see Faces, voices & backdrops.
Give it a safe key
- •Make a key just for the agent and name it after it, so the console shows which key did what.
- •Leave out
deleteunless the task needs it. Even with it, every delete must carry?confirm=true. - •A key acts for your account and spends from it: sessions are billed per minute. Stop what you start.
- •Revoke the key when the job is done.
Every change made with a key is recorded (which key, what it called, the result, when), so you can check what an agent changed. See Authentication & keys.
Live sessions
An agent can also direct a session while it runs: cut to a close-up when it says something important, or change the backdrop. Your Selvia AI assistant never does this on its own; it happens only when you call the API. See Direct a live session.