AGI One Realtime
Speech-in, speech-out conversations in real time: it listens while the user talks, knows when they have finished a thought, answers naturally with an expressive voice, and stops the moment the user interrupts. The API is compatible with the OpenAI Realtime API (GA), so the official OpenAI SDKs work by changing the address and key.
实时语音对话:用户说话时一直在听,判断出一句话说完就自然接上,带情感的声音,用户随时插嘴它马上停。接口兼容 OpenAI Realtime(正式版),用 OpenAI 官方 SDK 只换地址和钥匙就能接。
Try it free for 1 minute, no sign-up →不用注册,免费试听 1 分钟 →
| Base address | 地址 | wss://realtime.agioneos.com/v1/realtime | |
|---|---|---|---|
| Models | 型号 | agione-realtime-1 — standard (default): the strongest understanding and reasoning——正常版(默认):理解和推理能力最强agione-realtime-1-fast — fast: starts answering sooner, with lighter reasoning; good for quick back-and-forth——极速版:开口更快,推理轻一些,适合快问快答agione-realtime-1-lite — lite: quick, light replies for everyday conversation——轻量版:日常对话,回得快、轻快 | |
| Audio | 音频 | PCM16, 24 kHz, mono, both directions | PCM16、24 kHz、单声道,进出都是 |
| Region | 机房 | US West (Los Angeles) | 美国西部(洛杉矶) |
Get started开始
- Open the console and sign in with Google, Apple, GitHub or email. Signing up is free, and new accounts get a $1 sign-up gift that is added with the first top-up. Add credit and you can talk to it in the playground right away, with your own key.
- Create an API key (
sk-agione-…). It is shown once; store it on your server, never in an app or web page. - Try it right away in the playground: paste the key and talk to it in your browser.
- Connect with the OpenAI SDK as below, or call the endpoints directly.
- 打开控制台,用谷歌、苹果、GitHub 或邮箱登录。注册免费,新账户送 $1 注册礼,第一次充值时一起到账。充值后,用自己的钥匙就可以马上在在线体验里和它通话。
- 创建 API 钥匙(
sk-agione-…)。只显示一次,存在你自己的服务器上,不要放进 App 或网页。 - 想先试一下,打开在线体验:填上钥匙,在浏览器里直接和它说话。
- 照下面用 OpenAI SDK 连,或直接调接口。
Which way to connect选哪种接入方式
| Your situation | 你的情况 | Use | 用哪种 |
|---|---|---|---|
| A server or phone system handles the audio声音在你的服务器或电话系统里 | Server (WebSocket)服务器接入(WebSocket) | ||
| A web page or app that only needs the conversation网页或 App,只要对话 | Browser / app (WebRTC)浏览器 / App(WebRTC) | ||
| A web page or app, plus tools, records or control on your server网页或 App,还要在你的服务器上执行工具、记录、管控 | WebRTC + server sideband (recommended)WebRTC + 服务器旁路(推荐) |
Server (WebSocket)服务器接入(WebSocket)
For servers, phone systems and anything that can hold a secret. Authenticate with Authorization: Bearer sk-agione-….
适合服务器、电话系统等能保管密钥的地方。用 Authorization: Bearer sk-agione-… 认证。
Python
pip install openai
import asyncio, base64
from openai import AsyncOpenAI
client = AsyncOpenAI(api_key="sk-agione-...", websocket_base_url="wss://realtime.agioneos.com/v1")
async def main():
async with client.realtime.connect(model="agione-realtime-1") as conn:
await conn.session.update(session={
"type": "realtime",
"instructions": "You are a friendly voice assistant. Keep answers short.",
"audio": {"output": {"voice": "ivy"}},
})
# send microphone audio (24 kHz PCM16) as it arrives:
# await conn.input_audio_buffer.append(audio=base64.b64encode(chunk).decode())
async for event in conn:
if event.type == "response.output_audio.delta":
play(base64.b64decode(event.delta)) # 24 kHz PCM16
elif event.type == "input_audio_buffer.speech_started":
stop_playback() # the user interrupted
elif event.type == "response.output_audio_transcript.delta":
print(event.delta, end="", flush=True)
asyncio.run(main())
Node.js
npm install ws
import WebSocket from "ws";
const ws = new WebSocket("wss://realtime.agioneos.com/v1/realtime?model=agione-realtime-1",
{ headers: { Authorization: `Bearer ${process.env.AGIONE_API_KEY}` } });
ws.on("open", () => ws.send(JSON.stringify({ type: "session.update",
session: { type: "realtime", instructions: "Be brief.", audio: { output: { voice: "ivy" } } } })));
ws.on("message", (raw) => {
const e = JSON.parse(raw);
if (e.type === "response.output_audio.delta") play(Buffer.from(e.delta, "base64")); // 24 kHz PCM16
if (e.type === "input_audio_buffer.speech_started") stopPlayback(); // user interrupted
});
// send microphone audio: ws.send(JSON.stringify({ type: "input_audio_buffer.append", audio: base64Chunk }))
Server voice activity detection is on by default: just stream audio; you do not need to commit or create responses.
默认由服务端判断说完:一直送音频就行,不用自己提交、也不用自己发 response.create。
Browser / app (WebRTC)浏览器 / App(WebRTC)
Lowest latency, and playback, echo handling and interruptions are done for you. Your server exchanges the long-lived key for a short-lived one (ek_…, 10 minutes by default) and hands it to the browser or app.
延迟最低,播放、回声、插嘴都由我们处理。你的服务器用长期钥匙换一把短期的(ek_…,默认 10 分钟),交给浏览器或 App。
1. Your server: mint a short-lived key1. 你的服务器:换短期钥匙
curl https://realtime.agioneos.com/v1/realtime/client_secrets \
-H "Authorization: Bearer $AGIONE_API_KEY" -H "Content-Type: application/json" \
-d '{"session": {"type": "realtime", "instructions": "Be brief.", "audio": {"output": {"voice": "ivy"}}},
"safety_identifier": "user-7f3a…",
"expires_after": {"seconds": 600}}'
# → {"value": "ek_…", "expires_at": 1795…, "session": {…}}
2. Browser: connect2. 浏览器:连接
const { value } = await (await fetch("/your-server/voice-token")).json();
const pc = new RTCPeerConnection();
const audio = new Audio(); audio.autoplay = true;
pc.ontrack = (e) => (audio.srcObject = e.streams[0]);
const mic = await navigator.mediaDevices.getUserMedia({ audio: { echoCancellation: true, noiseSuppression: true } });
pc.addTrack(mic.getTracks()[0]);
const dc = pc.createDataChannel("oai-events");
dc.onmessage = (m) => console.log(JSON.parse(m.data).type);
await pc.setLocalDescription(await pc.createOffer());
const r = await fetch("https://realtime.agioneos.com/v1/realtime/calls?model=agione-realtime-1", {
method: "POST", body: pc.localDescription.sdp,
headers: { Authorization: `Bearer ${value}`, "Content-Type": "application/sdp" } });
await pc.setRemoteDescription({ type: "answer", sdp: await r.text() });
Networks that block UDP (optional)封了 UDP 的网络(可选)
Some office and hotel networks block the UDP traffic WebRTC uses. Fetch short-lived relay servers with the same key and pass them in; the call then goes through port 443 when it has to. An empty list means no relay is needed — connect as above.
有些公司、酒店的网络会封掉 WebRTC 用的 UDP。用同一把钥匙领一份临时中继,建连接时填进去;需要时通话会走 443 端口。返回空列表就不用中继,照上面直接连。
const ice = await (await fetch("https://realtime.agioneos.com/v1/realtime/ice_servers", {
headers: { Authorization: `Bearer ${value}` } })).json();
const pc = new RTCPeerConnection({ iceServers: ice.ice_servers });
iOS and Android work the same way with the native WebRTC libraries.
iOS、安卓用原生 WebRTC 库,做法一样。
Server sideband (app talks directly, your server stays in control)服务器旁路(App 直连说话,你的服务器同时在线)
The best of both: the app talks to us directly over WebRTC (lowest latency, playback and interruptions handled), while your server attaches to the same call with its long-lived key. From your server you set the instructions and tools, run the tools against your own database or services, and see everything the user says and every event, without ever handling audio. Recommended for apps with business logic.
两头的好处都要:App 用 WebRTC 直接跟我们说话(延迟最低,播放、插嘴都处理好),你的服务器用长期钥匙连到同一通电话上。在你的服务器上设定说明和工具、用你自己的数据库和服务执行工具、看到用户说的每一句话和每个事件,完全不用碰声音。有业务逻辑的 App 推荐这种。
App ⇄ (WebRTC: voice + events) ⇄ AGI One Realtime ⇄ (WebSocket ?call_id=…: events, tools) ⇄ your server
1. App: connect as above, then send the call ID to your server1. App:照上面连好,把通话 ID 交给你的服务器
// after the POST /v1/realtime/calls above
const callId = r.headers.get("Location").split("/").pop(); // "rtc_…"
await fetch("/your-server/attach", { method: "POST", body: JSON.stringify({ callId }) });
2. Your server: attach to the call (official OpenAI SDK)2. 你的服务器:连到这通电话(用官方 OpenAI SDK)
import json
from openai import AsyncOpenAI
client = AsyncOpenAI(api_key="sk-agione-...", websocket_base_url="wss://realtime.agioneos.com/v1")
async def attach(call_id):
async with client.realtime.connect(call_id=call_id) as conn:
await conn.session.update(session={
"type": "realtime",
"instructions": "You are the Acme support agent.",
"tools": [{"type": "function", "name": "get_order", "description": "Look up an order",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}}}}],
})
async for event in conn:
if event.type == "response.function_call_arguments.done":
result = await run_tool(event.name, json.loads(event.arguments)) # your database, payments…
await conn.conversation.item.create(item={"type": "function_call_output",
"call_id": event.call_id, "output": json.dumps(result)})
await conn.response.create() # it then speaks the result
elif event.type == "conversation.item.input_audio_transcription.completed":
save_transcript(event.transcript)
Without the SDK: open wss://realtime.agioneos.com/v1/realtime?call_id=rtc_… with Authorization: Bearer sk-agione-… and exchange the same JSON events.
不用 SDK 也行:用 Authorization: Bearer sk-agione-… 连 wss://realtime.agioneos.com/v1/realtime?call_id=rtc_…,收发同样的 JSON 事件。
- Use your long-lived key from the same account that created the call. Short-lived keys are refused.
- You receive the same events as the app, except audio. Audio only travels over WebRTC; a server connection cannot send audio.
- Settings, tools and tool results you send apply to the call immediately; the app sees them too.
- Up to 3 server connections per call. If yours drops, the call carries on; reconnect with the same call ID.
- When the call ends, the connection closes with the reason:
call_ended, orinsufficient_quotaif the balance runs out. - Billed once per call by connection time; the server connection is free. End the call from your server with
POST /v1/realtime/calls/{call_id}/hangup.
- 用创建这通电话的同一个账户的长期钥匙。短期钥匙会被拒绝。
- 收到的事件跟 App 一样,只是没有声音。声音只走 WebRTC,服务器这条连接也不能送声音。
- 你发的设置、工具、工具结果立刻对这通电话生效,App 那边也看得到。
- 每通电话最多 3 条服务器连接。你这条断了,电话照常进行,用同一个通话 ID 重新连上就行。
- 电话结束时这条连接会带着原因关掉:
call_ended(挂断),余额用完时是insufficient_quota。 - 每通电话只按通话时长计一次费,服务器这条连接不另收钱。在你的服务器上挂断:
POST /v1/realtime/calls/{call_id}/hangup。
Session options会话设置
| Field | 字段 | Meaning | 含义 |
|---|---|---|---|
instructions | The assistant's persona and rules. If a user asks what it is built on, it can say "built on AGI One Realtime" (never unprompted); describe it your own way here, or set agione.attribution to false to leave it out. | 助手的身份和规矩。用户问「基于什么」时,它可以说「基于 AGI One 实时语音模型」(不主动说);想换说法就在这里写,想完全不提就把 agione.attribution 设成 false。 | |
audio.output.voice | A voice name from the voice table, e.g. ivy (default), mei, lucia. | 音色表里的名字,比如 ivy(默认)、mei、lucia。 | |
audio.input.turn_detection | {"type":"semantic_vad","eagerness":"auto|low|medium|high"} (default; decides from meaning when the user has finished), {"type":"server_vad","silence_duration_ms":…}, or null to commit manually. | {"type":"semantic_vad","eagerness":"auto|low|medium|high"}(默认,按意思判断说完),{"type":"server_vad","silence_duration_ms":…},或 null 自己提交。 | |
audio.input.transcription | Set to any object (e.g. {"model":"agione-transcribe"}) to receive the user's words as text events. Add "language": "en" (an ISO-639-1 code such as zh, es, ja) when you know which language your users speak: short phrases are then never mistaken for another language. Leave it out to detect the language automatically. | 填一个对象(如 {"model":"agione-transcribe"})就会收到用户说的话的文字事件。知道用户说哪种语言时,加上 "language": "zh"(ISO-639-1 代码,如 en、es、ja),短句就不会被听成别的语言;不填则自动判断。 | |
tools, tool_choice | Function calling, see below. | 工具调用,见下。 | |
max_output_tokens | Upper bound for one answer. | 一次回答的上限。 | |
agione.barge | Extension. What happens when the user talks over the assistant. "smart" (default): it keeps talking (quieter over WebRTC) until it is clear what the user said. A short acknowledgement such as "mm-hmm" or "go on" does not stop it, and over WebSocket you do not even receive speech_started for it. A real interruption is announced and the answer stops. "instant": stop the moment the user makes a sound, like OpenAI. | 扩展。用户在它说话时开口怎么处理。"smart"(默认):先接着说(WebRTC 下声音变小),听清再定。“嗯嗯”“你继续”这类附和不会打断它,WebSocket 下连 speech_started 都不会发;真插话才通知并停下。"instant":一出声就停,和 OpenAI 一样。 | |
agione.attribution | Extension, default true. When your instructions give the assistant its own persona, it may answer "built on AGI One Realtime" if a user asks. false = never mention it. | 扩展,默认 true。你给了自己的人设时,用户问起它可以说「基于 AGI One 实时语音模型」。false = 完全不提。 | |
agione.barge | Extension. How talking over the reply is handled over WebSocket: default instant (stop as soon as the user speaks); smart = wait to tell a real interruption from a short acknowledgement first. | 扩展。WebSocket 下用户插话怎么处理:默认 instant(一开口就停);smart = 先分清是真打断还是一声附和再定。 |
Voices音色
30 hand-picked voices. Put the voice name in audio.output.voice and every reply is spoken in that voice. Every voice speaks every language: the reply follows the language the user speaks, and the voice keeps its own accent, listed below. Emotion follows the meaning of each sentence. OpenAI voice names (alloy, marin, cedar…) also work and map to a similar voice.
精选 30 个人物音色。把音色名字写进 audio.output.voice,回答就用这个人的声音说。每个音色都能说各种语言:回答的语言跟着用户,口音是这个音色自己的(下表)。语气会跟着每句话的意思走。OpenAI 的声音名(alloy、marin、cedar…)也能用,会换成相近的音色。
| Voice name (use in code) | 音色名字(写进代码) | Accent | 口音 | Gender | 性别 | Style | 特点 | Listen | 试听 |
|---|---|---|---|---|---|---|---|---|---|
mei | Taiwanese accent台湾口音 | Female女 | bright明亮 | ||||||
wei | Taiwanese accent台湾口音 | Male男 | natural自然 | ||||||
jing | Beijing accent北京口音 | Female女 | sweet and lively甜美活力 | ||||||
atlas | Beijing accent北京口音 | Male男 | steady沉稳 | ||||||
ivy | American accent美国口音 | Female女 | natural and clear (default)自然清晰(默认) | ||||||
nora | American accent美国口音 | Female女 | warm and conversational温暖健谈 | ||||||
leo | American accent美国口音 | Male男 | natural and easygoing自然随和 | ||||||
jack | American accent美国口音 | Male男 | warm and grounded温暖沉稳 | ||||||
ellie | British accent英国口音 | Female女 | fresh and casual清新随和 | ||||||
oliver | British accent英国口音 | Male男 | conversational亲切健谈 | ||||||
lucia | Spanish (Spain) accent西班牙口音 | Female女 | bright and cheerful明快 | ||||||
mateo | Spanish (Spain) accent西班牙口音 | Male男 | confident and balanced沉稳 | ||||||
sofia | Latin American Spanish accent拉美口音 | Female女 | friendly and soft亲切 | ||||||
diego | Latin American Spanish accent拉美口音 | Male男 | gentle and clear温和清晰 | ||||||
clara | Brazilian Portuguese accent巴西口音 | Female女 | smooth and confident顺滑 | ||||||
tiago | Brazilian Portuguese accent巴西口音 | Male男 | deep and warm低沉温和 | ||||||
camille | French accent法国口音 | Female女 | friendly亲切 | ||||||
louis | Parisian French accent巴黎口音 | Male男 | professional专业 | ||||||
lena | German accent德国口音 | Female女 | effortless and confident自然自信 | ||||||
felix | German accent德国口音 | Male男 | easygoing随和 | ||||||
yuki | Japanese accent日本口音 | Female女 | warm and natural温暖自然 | ||||||
haru | Japanese accent日本口音 | Male男 | clear and inviting清晰亲切 | ||||||
minji | Seoul Korean accent首尔口音 | Female女 | tender and clear温柔清晰 | ||||||
jun | Seoul Korean accent首尔口音 | Male男 | warm and clear温暖清晰 | ||||||
priya | Indian (Hindi) accent印度口音 | Female女 | friendly and reassuring亲切可靠 | ||||||
arjun | Indian (Hindi) accent印度口音 | Male男 | clear and warm清晰温暖 | ||||||
layla | Arabic accent阿拉伯口音 | Female女 | soft and warm柔和 | ||||||
omar | Arabic accent阿拉伯口音 | Male男 | deep and professional低沉专业 | ||||||
giulia | Italian accent意大利口音 | Female女 | bright and joyful明亮愉快 | ||||||
luca | Italian accent意大利口音 | Male男 | expressive and warm温暖有表现力 |
The same table as JSON, filterable by gender, accent or language (the voice's native language):
同样的表也可以用接口取,能按 gender(性别)、accent(口音)、language(音色的母语)筛:
GET /v1/voices?gender=female&accent=american
Authorization: Bearer sk-agione-…
# → {"object": "list", "data": [{"id": "ivy", "accent": "american", "accent_label": "American accent", "gender": "female",
# "style": "natural and clear (default)", "preview_url": "/v1/voices/ivy/preview"}, …]}
Tools (function calling)工具调用
session.tools = [{"type": "function", "name": "get_weather", "description": "Weather for a city",
"parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}]
# you receive: response.function_call_arguments.done {call_id, name, arguments}
# you send: conversation.item.create {"item": {"type": "function_call_output", "call_id": …, "output": "{…}"}}
# response.create ← the assistant then speaks the result
Text & image input文字和图片输入
Besides speaking, users can type and send pictures in the same conversation, for example a photo, a screenshot or a document page. Text and pictures go straight to the assistant, so typed questions are answered faster and word for word. The reply is spoken as usual (with its text); set output_modalities to ["text"] for text only. The format is the same as OpenAI Realtime.
除了说话,用户也可以在同一通对话里打字、发图片,比如照片、截图、文件页面。文字和图片直接交给助手,打字提问回答得更快,一字不差。回答照常说出来(同时有文字);只要文字就把 output_modalities 设成 ["text"]。写法同 OpenAI Realtime。
# Typed text打字 {"type": "conversation.item.create", "item": {"type": "message", "role": "user", "content": [{"type": "input_text", "text": "Summarize what we just said"}]}} {"type": "response.create"} # A picture, optionally with a question图片,可以同时带一句话 {"type": "conversation.item.create", "item": {"type": "message", "role": "user", "content": [{"type": "input_image", "image_url": "data:image/jpeg;base64,/9j/4AAQ…"}, {"type": "input_text", "text": "What is in this picture?"}]}} {"type": "response.create"}
# Python (official OpenAI SDK, only the address and key changed)
conn.conversation.item.create(item={"type": "message", "role": "user", "content": [
{"type": "input_image", "image_url": "data:image/png;base64," + base64.b64encode(png).decode()},
{"type": "input_text", "text": "What does this screen say?"}]})
conn.response.create()
| Rule | 规则 | Detail | 说明 |
|---|---|---|---|
| Format格式 | Embedded pictures only: data:image/jpeg|png|webp|gif;base64,…. Web links (https://…) are not fetched. | 只收内嵌图片:data:image/jpeg|png|webp|gif;base64,…。网址(https://…)不会去取。 | |
| Size大小 | Up to about 3 MB per picture over WebSocket or the server sideband. Over a WebRTC data channel one message is at most 256 KB: shrink first (long side 1280 px, JPEG quality 0.6 is usually 100–200 KB), or send the picture from your server through the sideband. | 走 WebSocket 或服务器旁路,一张最多约 3 MB。走 WebRTC 数据通道,一条消息最多 256 KB:先缩小(长边 1280 像素、JPEG 质量 0.6,一般 100–200 KB),或者从你的服务器经旁路发。 | |
| Who谁能发 | Only role: "user" messages can carry pictures. | 只有 role: "user" 的消息能带图片。 | |
| Echo回声 | conversation.item.added shows "(image omitted)" in place of the picture, so large data is not sent back to you. | conversation.item.added 里图片换成 "(image omitted)",大数据不会回传给你。 | |
| Long conversations长对话 | Nothing to trim on your side. We keep the context bounded automatically: older turns are condensed, and the two newest pictures are kept in full; for earlier ones the assistant remembers what it saw and said about them, so replies do not slow down as the conversation grows. | 你这边不用裁剪任何东西。我们自动控制上下文长度:较早的对话会被压缩,最近 2 张图片保留原图;更早的图片,助手记得当时看到了什么、说了什么。对话越来越长,回答也不会越来越慢。 | |
| Price价格 | Included in the per-minute price, nothing extra. | 包含在每分钟价格里,不另收费。 |
Events事件
Same names and shapes as the OpenAI Realtime API (GA).
名字和格式同 OpenAI Realtime(正式版)。
| You send | 你发 | session.update input_audio_buffer.append input_audio_buffer.commit input_audio_buffer.clear conversation.item.create conversation.item.delete conversation.item.truncate conversation.item.retrieve response.create response.cancel output_audio_buffer.clear |
|---|---|---|
| You receive | 你收 | session.created session.updated input_audio_buffer.speech_started input_audio_buffer.speech_stopped input_audio_buffer.committed input_audio_buffer.cleared conversation.item.added conversation.item.done conversation.item.deleted conversation.item.truncated conversation.item.retrieved conversation.item.input_audio_transcription.completed conversation.item.input_audio_transcription.failed response.created response.output_item.added response.content_part.added response.output_audio.delta response.output_audio_transcript.delta response.output_text.delta response.function_call_arguments.delta response.function_call_arguments.done …done response.done output_audio_buffer.started output_audio_buffer.stopped output_audio_buffer.cleared (WebRTC) error |
Endpoints接口一览
WSS /v1/realtime?model=agione-realtime-1 | Realtime session over WebSocket | WebSocket 实时会话 |
POST /v1/realtime/client_secrets | Mint a short-lived key | 换短期钥匙 |
POST /v1/realtime/calls | WebRTC: SDP offer in, SDP answer out (201) | WebRTC:送 SDP offer,回 SDP answer(201) |
POST /v1/realtime/calls/{id}/hangup | End a WebRTC call | 挂断 WebRTC 通话 |
WSS /v1/realtime?call_id=rtc_… | Server sideband: attach your server to a WebRTC call | 服务器旁路:你的服务器连到一通 WebRTC 通话 |
GET /v1/voices, GET /v1/voices/{id}/preview | Voice table and audio preview | 音色表和试听 |
GET /v1/usage | Your balance, price and last 30 days of calls | 余额、价格、近 30 天通话 |
Errors & limits错误和限制
401 invalid_api_key | Missing, wrong or revoked key. | 没带钥匙、钥匙不对或已作废。 |
402 insufficient_quota | No credit left. A call in progress ends when credit runs out. | 余额用完。通话中用完会结束这通电话。 |
403 user_banned | This end user broke the usage policy repeatedly (see below). | 这个终端用户多次违规(见下)。 |
400 safety_identifier_required | You turned on "Require an end-user id" and this call has none. | 你打开了“必须带用户编号”,这通电话没带。 |
403 account_suspended | Too many of your end users were blocked within 24 hours; the account is paused until reviewed. | 24 小时内被暂停的终端用户太多,账户暂停,核查后恢复。 |
429 rate_limit_exceeded | Too many simultaneous sessions for your account (10 by default; ask us for more). | 你的账号同时通话数超过上限(默认 10,需要更多联系我们)。 |
invalid_value (error eventerror 事件) | A picture is not an embedded data URL, is larger than about 3 MB, or is not in a user message; the message says which. | 图片不是内嵌格式、超过约 3 MB,或者不在用户消息里;错误信息会写明是哪一条。 |
503 server_busy | Capacity reached for a moment; retry shortly. | 一时满载,稍后重试。 |
End-user safety终端用户安全
Give each of your end users a stable, hashed id, and send it with every call. We combine it with your account before anything leaves our service, so if one person breaks the usage policy, only that person is blocked. Your other users and your account keep working. Never put names, emails or phone numbers in the id.
给你的每个终端用户一个固定的、哈希过的编号,每通电话都带上。我们会把它和你的账户合在一起再往外送,万一有人违规,只封这一个人,你的其他用户和账户照常。编号里不要放姓名、邮箱、电话。
| How you connect | 接入方式 | Where the id goes | 编号放哪里 |
|---|---|---|---|
| Server (WebSocket)服务器接入(WebSocket) | Header请求头 OpenAI-Safety-Identifier: user-7f3a… | ||
| Browser / app (WebRTC)浏览器 / App(WebRTC) | "safety_identifier" when your server mints the short-lived key; it is locked into that key在你的服务器换短期钥匙时填,编号锁在这把钥匙里,手机改不了 | ||
| Server sideband服务器旁路 | Nothing to add: it inherits the call's id不用另外带:沿用这通电话的编号 |
- Harmful requests are refused. An end user with 3 violations within 24 hours is blocked for 24 hours, then unblocked automatically, and we email you.
- Calls without an id are allowed, but they all count as one anonymous user of yours: if any of them breaks the policy, all calls without an id are blocked together.
- In the console under User safety you can see how many calls came without an id and who is blocked, and turn on Require an end-user id so calls without one are refused (
safety_identifier_required). - If 10 of your end users are blocked within 24 hours, your whole account is paused (
account_suspended) until we review it.
- 有害的请求会被拒答。同一个终端用户 24 小时内违规 3 次,暂停 24 小时,到时自动解封,并发邮件告诉你。
- 不带编号的电话也能打,但它们都算你的同一个“匿名用户”:其中任何一个违规,所有没带编号的电话会一起被暂停。
- 在控制台的“用户安全”里能看到多少通电话没带编号、谁被暂停了,还可以打开“每通电话必须带用户编号”,不带的直接拒绝(
safety_identifier_required)。 - 24 小时内你被暂停的终端用户达到 10 个,整个账户会暂停(
account_suspended),我们核查后恢复。
Pricing价格
$0.04 per minute of connected session time, billed per second. One all-in price: no per-token charges. That is the price of agione-realtime-1 and agione-realtime-1-fast; agione-realtime-1-lite is $0.03 per minute. Applicable taxes are shown at checkout. Prepaid credit; see your balance and every call in the console.
按通话时长 每分钟 0.04 美元,按秒计费;一个价格就是全部费用,不按 token 收费,这是正常版和极速版的价格,轻量版 agione-realtime-1-lite 每分钟 0.03 美元;如有税费,将在付款页显示。预充值,余额和每通电话在控制台里看。
Volume credit bonus: $100–499: +5%; $500–999: +10%; $1,000–5,000: +15%. The bonus is added to API credit, not paid in cash. Taxes do not earn a bonus. Refunds proportionally reverse the original credits and bonus. Review your exact credit total in the console before checkout.
大额充值赠送:$100–499 赠 5%;$500–999 赠 10%;$1,000–5,000 赠 15%。赠送为 API 使用额度,不可提现;税费不参与赠送。退款时按比例收回原本金及赠送。付款前请在控制台核对到账明细。