- Minimal Request Example
- Full Request Example
- Authentication
- Prompt and Messages
- Streaming vs Non-Streaming
- Response Format
- Bible Translation
- Language
- Model
- Standard LLM Parameters
- Tools and LLM Passthrough Parameters
- Starter Chatbot App in NextJS
- Caching
- Feedback
- Share
- List Chat Completions
- Get Chat Completion
- Prompt Object
- Error Responses
Our Agent (chat completions) endpoint is designed to be compatible with the OpenAI chat completions API specification, so most OpenAI SDKs and tools work with minimal changes. Agent also extends the surface with custom response_format values, conversation metadata, Bible/language controls, and declaration-only tools. It does not currently support multi-modal input or output, and returns a single completion at a time. See the OpenAI SDK libraries for client options.
Minimal Request Example #
Since your Agent is configured on the platform, API calls to get completions can be extremely minimal. All that’s required is the prompt for which you want a response:
curl \
--header 'x-api-key: apg_xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "How can a good God allow so much evil in the world?"
}' \
--url https://my.gospel.bot/api/v1/chat/completions
Please note: you must replace the x-api-key value with your API key and my.gospel.bot with your Agent’s domain.
Full Request Example #
However, the API supports overriding the default Agent configuration options, as well as several other runtime options. Here’s an example of all supported parameters that have an effect on the output:
curl \
--header 'Authorization: Bearer apg_xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "openai/gpt/4o",
"stream": false,
"messages": [
{
"role": "system",
"content": "This a system prompt override."
},
{
"role": "user",
"content": "This is a previous prompt."
},
{
"role": "assistant",
"content": "This is a previous completion."
},
{
"role": "user",
"content": "This is the current prompt."
}
],
"response_format": {
"type": "json"
},
"metadata": {
"anonymous": true,
"conversation": null,
"language": "en",
"session": null,
"device": null,
"bible": "esv",
"variables": {
"name": "Jake"
}
},
"frequency_penalty": 0.25,
"presence_penalty": -0.25,
"max_completion_tokens": 1024,
"reasoning_effort": "high",
"verbosity": "medium",
"temperature": 0.5,
"top_p": 0.9,
"user": null
}' \
--url https://my.gospel.bot/api/v1/chat/completions
Please note: you must replace the Authorization bearer token value with your API key and my.gospel.bot with your Agent’s domain.
Authentication #
See Authentication on the Overview page for how to authenticate Fusion API requests.
Same-origin browser requests to the Agent host may omit an API key when creating a completion (POST). The list and get endpoints (GET /api/v1/chat/completions and GET /api/v1/chat/completions/{id}) always require a valid API key.
Prompt and Messages #
You must either supply the prompt string or a messages array.
The messages parameter is an array of message objects, each with a role and a content property. By default, an Agent will have a system prompt that is automatically applied. Also by default, previous exchanges between an Agent and user as defined by the metadata.device, metadata.session, metadata.conversation, and user parameters are prepended to the array of messages which are eventually sent to the LLM. You may control how many past exchanges you wish Agent to use by passing an integer for the metadata.max_memories parameter. You only need supply a messages array if you wish to override this default behavior.
If you want to use the aforementioned defaults, or the response doesn’t require context from previous exchanges with Agent, you may simply provide a prompt string.
If you wish to prevent any context of previous exchanges altogether, regardless of the value of metadata.device, metadata.session, metadata.conversation, and user — you may pass metadata.anonymous as true.
user: any string identifier for the user (100 characters max)metadata.conversation: any string identifier for the conversation within a single session (100 characters max)metadata.session: any string identifier for the user’s session (100 characters max)metadata.device: any string identifier for the user’s device (100 characters max)metadata.anonymous: if set totrue, no past exchange context is provided to the Agent (one-shot); equivalent to settingmetadata.max_memories: 0metadata.max_memories: the number of previous exchanges to provide to Agentmetadata.variables: object of string key/value pairs substituted into{key}placeholders in the assembled system prompt (max 50 keys, 500 characters per value; not persisted). Reserved keys cannot be overridden:language,bible,translation,passages,year,month,day,date,time,country,region,city,timezone
Streaming vs Non-Streaming #
The stream parameter controls whether the response should be streamed or delivered all at once. Typically, chat interfaces benefit from streaming output as the user gets more instantaneous feedback. However, there are use cases that lend themselves to non-streaming output as well.
Response Format #
The response format may be specified using the response_format.type parameter. Valid values are as follows:
raw: raw OpenAI compatible chunked chat completion JSON. Only available if thestreamoption istrue. Setting this format will allow any OpenAI compatible library / SDK to be used against this endpoint, as long as it has a way to set theresponse_formatparameter. [default when streaming]text: plain text output; may include markdownhtml: HTML formatted, converted from markdown where applicablejson: structured JSON response; includes completion as well as token usage and timing stats. Only available if thestreamoption isfalse. [default when not streaming]json_schema: structured output constrained to a supplied JSON Schema underresponse_format.json_schema.schema(optionalname,description,strict). API-only and non-streaming (stream: trueis ignored). Missingschemareturns422. Bypasses the prose completion cache.
When streaming with raw, the initial chunk may include a top-level metadata object (sources, conversation/share fields, and when present guardrail / cta). The final chunk reports token usage, and may include url_citation annotations on the delta.
Structured Outputs (json_schema) #
Example request:
{
"messages": [{"role": "user", "content": "Give me a person."}],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "person",
"schema": {
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"}
},
"required": ["name", "age"]
}
}
}
}
Your Agent can be configured via Apologist Ignite to use any of the above response formats above by default for the chat completions endpoint. This is especially useful in situations where a 3rd party integration doesn’t allow sending custom parameters. Note that if text is specified, you may also toggle an option in your Agent configuration in Apologist Ignite to automatically strip all markdown to ensure only plain text is returned.
Bible Translation #
The metadata.bible parameter indicates which Bible translation the Agent should prefer. Pass a translation id or external_id string (up to 50 characters). Available translations are configured per Agent and provider (and may vary by language); they are not a fixed global enum. Common English examples include:
bsb: Berean Standard Bible [default]webu: World English Bible Updatednet: New English Translationoeb: Open English Bibledrb:Douay-Rheims Bibleesv: English Standard Versionniv: New International Versionkjv: King James Version
nkjv: New King James Versionnlt: New Living Translationcsb: Christian Standard Biblenasb1995:New American Standard Bible 1995nasb: New American Standard Biblelsb:Legacy Standard Bibletlv: Tree of Life Versioncjb: Complete Jewish Bible
Language #
Use the metadata.language parameter to control the output language. Language support varies by model and is specific to a given Agent. However, any Agent can be upgraded to utilize real-time translation, expanding its language support to 192 languages. Here is the full list of supported languages:
en: English [default]ab: Abkhazace: Acehneseach: Acholiaf: Afrikaanssq: Albanianalz: Aluram: Amharicar: Arabichy: Armenianas: Assameseawa: Awadhiay: Aymaraaz: Azerbaijaniban: Balinesebm: Bambaraba: Bashkireu: Basquebtx: Batak Karobts: Batak Simalungunbbc: Batak Tobabe: Belarusianbem: Bembabn: Bengalibew: Betawibho: Bhojpuribik: Bikolbs: Bosnianbr: Bretonbg: Bulgarianbua: Buryatyue: Cantoneseca: Catalanceb: Cebuanony: Chichewa (Nyanja)zh: Chinese (Simplified)zh-TW: Chinese (Traditional)cv: Chuvashco: Corsicancrh: Crimean Tatarhr: Croatiancs: Czechda: Danishdin: Dinkadv: Divehidoi: Dogridov: Dombenl: Dutchdz: Dzongkhaeo: Esperantoet: Estonianee: Ewefj: Fijiantl: Filipino (Tagalog)fi: Finnishfr: Frenchfr-CA: French (Canadian)fy: Frisianff: Fulfuldegaa: Gagl: Galicianlg: Ganda (Luganda)ka: Georgiande: German
el: Greekgn: Guaranigu: Gujaratiht: Haitian Creolecnh: Hakha Chinha: Hausahaw: Hawaiianhe: Hebrewhil: Hiligaynonhi: Hindihmn: Hmonghu: Hungarianhrx: Hunsrikis: Icelandicig: Igboilo: Ilokoid: Indonesianga: Irishit: Italianja: Japanesejw: Javanesekn: Kannadapam: Kapampangankk: Kazakhkm: Khmercgg: Kigarw: Kinyarwandaktu: Kitubagom: Konkaniko: Koreankri: Krioku: Kurdish (Kurmanji)ckb: Kurdish (Sorani)ky: Kyrgyzlo: Laoltg: Latgalianla: Latinlv: Latvianlij: Ligurianli: Limburganln: Lingalalt: Lithuanianlmo: Lombardluo: Luolb: Luxembourgishmk: Macedonianmai: Maithilimak: Makassarmg: Malagasyms: Malayms-Arab: Malay (Jawi)ml: Malayalammt: Maltesemi: Maorimr: Marathichm: Meadow Marimni-Mtei: Meiteilon (Manipuri)min: Minanglus: Mizomn: Mongolianmy: Myanmar (Burmese)nr: Ndebele (South)new: Nepalbhasa (Newari)ne: Nepali
nso: Northern Sotho (Sepedi)no: Norwegiannus: Nueroc: Occitanor: Odia (Oriya)om: Oromopag: Pangasinanpap: Papiamentops: Pashtofa: Persian (Farsi)pl: Polishpt: Portuguesept-BR: Portuguese (Brazil)pa: Punjabipa-Arab: Punjabi (Shahmukhi)qu: Quechuarom: Romaniro: Romanianrn: Rundiru: Russiansm: Samoansg: Sangosa: Sanskritgd: Scots Gaelicsr: Serbianst: Sesothocrs: Seychellois Creoleshn: Shansn: Shonascn: Sicilianszl: Silesiansd: Sindhisi: Sinhala (Sinhalese)sk: Slovaksl: Slovenianso: Somalies: Spanishsu: Sundanesesw: Swahiliss: Swatisv: Swedishtg: Tajikta: Tamiltt: Tatarte: Telugutet: Tetumth: Thaiti: Tigrinyats: Tsongatn: Tswanatr: Turkishtk: Turkmenak: Twi (Akan)uk: Ukrainianur: Urduug: Uyghuruz: Uzbekvi: Vietnamesecy: Welshxh: Xhosayi: Yiddishyo: Yorubayua: Yucatec Mayazu: Zulu
Model #
Agent supports dozens of models across many providers using a standardized naming scheme: creator/family/variant. Pass the model name via the model parameter.
Limited Models #
Low-latency, inexpensive models with very limited reasoning abilities.
| Model | Model ID | Supported Languages | |
|---|---|---|---|
| OpenAI GPT-5.4 nano | openai/gpt/5.4-nano | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| xAI Grok 4 Fast | xai/grok/4-fast | ar, bn, cs, de, en, es, fa, fr, he, hi, id, it, ja, km, ko, lo, ms, my, nl, pl, pt, ru, th, tl, tr, ur, vi, zh | |
| DeepSeek v3.1 Terminus | deepseek/deepseek/v3.1 | af, am, ar, az, bg, bn, ca, cs, cy, da, de, el, en, eo, es, eu, fi, fr, fr-CA, ga, gd, gl, gu, ha, he, hi, hr, hu, hy, id, ig, is, it, ja, ka, kk, km, kn, ko, lo, ml, mn, mr, ms, mt, my, ne, nl, no, pa, pl, ps, pt, pt-BR, ro, ru, si, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, uz, vi, yo, zh, zh-TW, zu | |
| OpenAI GPT-5.4 mini | openai/gpt/5.4-mini | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| Google Gemini 3 Flash | google/gemini/3-flash | ar, bg, bn, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, lt, lv, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, sw, th, tr, uk, vi, zh, zh-TW | |
| OpenAI GPT-5.6 Luna | openai/gpt/5.6-luna | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| OpenAI GPT OSS 120b | openai/gpt/oss-120b | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| Meta Llama 4 Scout | meta/llama4/scout | ar, de, en, es, fr, hi, id, it, ja, nl, pt, ru, th, tr, zh | |
| Mistral Medium 3 | mistral/medium/3 | de, en, es, fr, it, ja, ko, nl, po, pt, zh | |
| MiniMax M3 | minimaxai/m3 | af, ar, bg, ca, cs, da, de, el, en, es, fa, fi, fr, fr-CA, he, hi, hr, hu, id, it, ja, ko, ms, nl, nno, no, pl, pt, pt-BR, ro, ru, sk, sl, sv, ta, th, tl, tr, uk, vi, yue, zh, zh-TW | |
| NVIDIA Nemotron 3 Ultra | nvidia/nemotron3/ultra | af, ar, as, awa, az, ba, ban, be, bg, bho, bn, bs, ca, ceb, cs, cy, da, de, el, en, es, et, eu, fa, fi, fr, fr-CA, ga, gl, gu, he, hi, hr, ht, hu, hy, id, ilo, is, it, ja, jw, ka, kk, km, kn, ko, lb, li, lij, lmo, lo, lt, lv, mai, min, mk, ml, mr, ms, mt, my, ne, nl, no, oc, or, pa, pag, pap, pl, pt, pt-BR, ro, ru, scn, sd, si, sk, sl, sq, sr, su, sv, sw, szl, ta, te, tg, th, tl, tr, tt, uk, ur, uz, vi, yi, yue, zh, zh-TW | |
| Alibaba Qwen 3.7 Plus | alibaba/qwen3.7/plus | af, ar, as, awa, az, ba, ban, be, bg, bho, bn, bs, ca, ceb, cs, cy, da, de, el, en, es, et, eu, fa, fi, fr, fr-CA, ga, gl, gu, he, hi, hr, ht, hu, hy, id, ilo, is, it, ja, jw, ka, kk, km, kn, ko, lb, li, lij, lmo, lo, lt, lv, mai, min, mk, ml, mr, ms, mt, my, ne, nl, no, oc, or, pa, pag, pap, pl, pt, pt-BR, ro, ru, scn, sd, si, sk, sl, sq, sr, su, sv, sw, szl, ta, te, tg, th, tl, tr, tt, uk, ur, uz, vi, yi, yue, zh, zh-TW | |
| Google Gemma 4 31B | google/gemma/gemma-4-31b | ar, bg, bn, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, lt, lv, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, sw, th, tr, uk, vi, zh, zh-TW | |
| Sarvam 30B | sarvam/sarvam/30b | as, bn, brx, doi, en, gu, hi, kn, kok, ks, mai, ml, mni, mr, ne, or, pa, sa, sat, sd, ta, te, ur | |
| Alibaba Qwen 3.7 Max | alibaba/qwen3.7/max | af, ar, as, awa, az, ba, ban, be, bg, bho, bn, bs, ca, ceb, cs, cy, da, de, el, en, es, et, eu, fa, fi, fr, fr-CA, ga, gl, gu, he, hi, hr, ht, hu, hy, id, ilo, is, it, ja, jw, ka, kk, km, kn, ko, lb, li, lij, lmo, lo, lt, lv, mai, min, mk, ml, mr, ms, mt, my, ne, nl, no, oc, or, pa, pag, pap, pl, pt, pt-BR, ro, ru, scn, sd, si, sk, sl, sq, sr, su, sv, sw, szl, ta, te, tg, th, tl, tr, tt, uk, ur, uz, vi, yi, yue, zh, zh-TW | |
| Meta Llama 4 Maverick | meta/llama4/maverick | ar, de, en, es, fr, hi, id, it, ja, nl, pt, ru, th, tr, zh | |
| OpenAI GPT-4o mini | openai/gpt/4o-mini | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| OpenAI GPT-5 mini | openai/gpt/5-mini | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| Alibaba Qwen 3 Next 80B Instruct | alibaba/qwen3/next-80b-instruct | af, ar, as, awa, az, ba, ban, be, bg, bho, bn, bs, ca, ceb, cs, cy, da, de, el, en, es, et, eu, fa, fi, fr, fr-CA, ga, gl, gu, he, hi, hr, ht, hu, hy, id, ilo, is, it, ja, jw, ka, kk, km, kn, ko, lb, li, lij, lmo, lo, lt, lv, mai, min, mk, ml, mr, ms, mt, my, ne, nl, no, oc, or, pa, pag, pap, pl, pt, pt-BR, ro, ru, scn, sd, si, sk, sl, sq, sr, su, sv, sw, szl, ta, te, tg, th, tl, tr, tt, uk, ur, uz, vi, yi, yue, zh, zh-TW | |
| Alibaba Qwen 3 235B | alibaba/qwen3/235b | af, ar, as, awa, az, ba, ban, be, bg, bho, bn, bs, ca, ceb, cs, cy, da, de, el, en, es, et, eu, fa, fi, fr, fr-CA, ga, gl, gu, he, hi, hr, ht, hu, hy, id, ilo, is, it, ja, jw, ka, kk, km, kn, ko, lb, li, lij, lmo, lo, lt, lv, mai, min, mk, ml, mr, ms, mt, my, ne, nl, no, oc, or, pa, pag, pap, pl, pt, pt-BR, ro, ru, scn, sd, si, sk, sl, sq, sr, su, sv, sw, szl, ta, te, tg, th, tl, tr, tt, uk, ur, uz, vi, yi, yue, zh, zh-TW | |
| DeepSeek v3 | deepseek/deepseek/v3 | af, am, ar, az, bg, bn, ca, cs, cy, da, de, el, en, eo, es, eu, fi, fr, fr-CA, ga, gd, gl, gu, ha, he, hi, hr, hu, hy, id, ig, is, it, ja, ka, kk, km, kn, ko, lo, ml, mn, mr, ms, mt, my, ne, nl, no, pa, pl, ps, pt, pt-BR, ro, ru, si, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, uz, vi, yo, zh, zh-TW, zu | |
| Alibaba Qwen3.5 397B A17b | alibaba/qwen3.5/397b-a17b | af, ar, as, awa, az, ba, ban, be, bg, bho, bn, bs, ca, ceb, cs, cy, da, de, el, en, es, et, eu, fa, fi, fr, fr-CA, ga, gl, gu, he, hi, hr, ht, hu, hy, id, ilo, is, it, ja, jw, ka, kk, km, kn, ko, lb, li, lij, lmo, lo, lt, lv, mai, min, mk, ml, mr, ms, mt, my, ne, nl, no, oc, or, pa, pag, pap, pl, pt, pt-BR, ro, ru, scn, sd, si, sk, sl, sq, sr, su, sv, sw, szl, ta, te, tg, th, tl, tr, tt, uk, ur, uz, vi, yi, yue, zh, zh-TW |
Standard Models #
Economic models that balance lower cost with better responses.
| Model | Model ID | Supported Languages | |
|---|---|---|---|
| Anthropic Claude Haiku 4.5 | anthropic/claude/haiku-4.5 | ar, de, en, es, fr, hi, it, ja, ko, pt, ru, zh | |
| xAI Grok 4.5 | xai/grok/4.5 | ar, bn, cs, de, en, es, fa, fr, he, hi, id, it, ja, km, ko, lo, ms, my, nl, pl, pt, ru, th, tl, tr, ur, vi, zh | |
| DeepSeek V4 Pro | deepseek/deepseek/v4-pro | af, am, ar, az, bg, bn, ca, cs, cy, da, de, el, en, eo, es, eu, fi, fr, fr-CA, ga, gd, gl, gu, ha, he, hi, hr, hu, hy, id, ig, is, it, ja, ka, kk, km, kn, ko, lo, ml, mn, mr, ms, mt, my, ne, nl, no, pa, pl, ps, pt, pt-BR, ro, ru, si, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, uz, vi, yo, zh, zh-TW, zu | |
| Google Gemini 3.5 Flash | google/gemini/3.5-flash | ar, bg, bn, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, lt, lv, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, sw, th, tr, uk, vi, zh, zh-TW | |
| Anthropic Claude Sonnet 5 | anthropic/claude/sonnet-5 | ar, bn, de, en, es, fr, hi, id, it, ja, ko, pt, ru, sw, yo, zh | |
| OpenAI GPT-5.6 Terra | openai/gpt/5.6-terra | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| OpenAI o4 mini | openai/gpt/o4-mini | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| GLM 5.2 | zai/glm/5.2 | en, es, fr, ja, ko, ru, zh | |
| Kimi K2.6 FP4 | moonshotai/kimi/k2.6 | af, am, ar, bg, bn, ceb, cs, da, de, el, en, es, et, fa, fi, fr, ga, gu, ha, he, hi, hr, hu, id, ig, is, it, ja, kk, km, kn, ko, lo, lt, lv, ml, mr, ms, mt, my, nb, ne, nl, pa, pa-Arab, pl, ps, pt, ro, ru, si, sk, so, sr, sv, sw, ta, te, th, tl, tr, uk, ur, uz, vi, xh, yo, zh, zh-TW, zu | |
| Sarvam 105B | sarvam/sarvam/105b | as, bn, brx, doi, en, gu, hi, kn, kok, ks, mai, ml, mni, mr, ne, or, pa, sa, sat, sd, ta, te, ur | |
| OpenAI GPT-5.1 Chat | openai/gpt/5.1 | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| DeepSeek R1 | deepseek/deepseek/r1 | af, am, ar, az, bg, bn, ca, cs, cy, da, de, el, en, eo, es, eu, fi, fr, fr-CA, ga, gd, gl, gu, ha, he, hi, hr, hu, hy, id, ig, is, it, ja, ka, kk, km, kn, ko, lo, ml, mn, mr, ms, mt, my, ne, nl, no, pa, pl, ps, pt, pt-BR, ro, ru, si, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, uz, vi, yo, zh, zh-TW, zu | |
| Google Gemini 3.5 Pro | google/gemini/3.5-pro | ar, bg, bn, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, lt, lv, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, sw, th, tr, uk, vi, zh, zh-TW | |
| OpenAI GPT-4.1 | openai/gpt/4.1 | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| OpenAI GPT-5 Chat | openai/gpt/5-chat | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| OpenAI o3 | openai/gpt/o3 | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| Google Gemini 3 Pro | google/gemini/3-pro | ar, bg, bn, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, lt, lv, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, sw, th, tr, uk, vi, zh, zh-TW |
Premium Models #
Higher quality output at a premium price point.
| Model | Model ID | Supported Languages | |
|---|---|---|---|
| OpenAI GPT-5.4 | openai/gpt/5.4 | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| Anthropic Claude Opus 5 | anthropic/claude/opus-5 | ar, bn, de, en, es, fr, hi, id, it, ja, ko, pt, ru, sw, yo, zh | |
| OpenAI GPT-5.6 Sol | openai/gpt/5.6-sol | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| OpenAI GPT-5.3 Chat | openai/gpt/5.3 | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| OpenAI GPT-5.5 Instant | openai/gpt/chat | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| OpenAI GPT-5.2 Chat | openai/gpt/5.2 | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW | |
| Anthropic Claude Sonnet 4.6 | anthropic/claude/sonnet-4.6 | ar, bn, de, en, es, fr, hi, id, it, ja, ko, pt, ru, sw, yo, zh | |
| Anthropic Claude Opus 4.6 | anthropic/claude/opus-4.6 | ar, bn, de, en, es, fr, hi, id, it, ja, ko, pt, ru, sw, yo, zh | |
| Anthropic Claude Opus 4.7 | anthropic/claude/opus-4.7 | ar, bn, de, en, es, fr, hi, id, it, ja, ko, pt, ru, sw, yo, zh | |
| Anthropic Claude Opus 4.8 | anthropic/claude/opus-4.8 | ar, bn, de, en, es, fr, hi, id, it, ja, ko, pt, ru, sw, yo, zh | |
| OpenAI GPT-5.5 | openai/gpt/5.5 | am, ar, bg, bn, bs, ca, cs, da, de, el, en, es, et, fa, fi, fr, fr-CA, gu, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, kn, ko, lt, lv, mk, ml, mn, mr, ms, my, nl, no, pa, pl, pt, pt-BR, ro, ru, sk, sl, so, sq, sr, sv, sw, ta, te, tg, th, tl, tr, uk, ur, vi, zh, zh-TW |
Reasoning Models #
High-latency but extremely high quality output.
| Model | Model ID | Supported Languages |
|---|
Standard LLM Parameters #
The chat completion endpoint supports standard LLM parameters that modify the behavior of the model:
frequency_penaltypresence_penaltymax_completion_tokens(legacy alias:max_tokens)reasoning_effort(for reasoning models only:low,medium,high)verbosity(minimal,low,medium,high)temperaturetop_plogprobs/top_logprobs
See OpenAI’s docs for more information about these parameters.
Tools and LLM Passthrough Parameters #
The following parameters are forwarded to the target LLM and can affect model behavior. Using them bypasses the prose completion cache:
tools: OpenAI-compatible function tool definitions. Passed through as declaration-only tools — the client executes them and returnsrole: toolmessages. Reserved Agent tool names that cannot be overridden:webSearch,webExtract.tool_choice:none,auto,required, or a specific tool objectlogprobs/top_logprobsseed,logit_bias,parallel_tool_calls,stop
Compatibility-Only Passthrough Parameters #
These are accepted for OpenAI client compatibility but do not meaningfully change Agent behavior today:
audiomodalitiesn(Agent returns a single response)predictionservice_tierstorestream_options
Agent does not currently support multi-modal input or output. Tool definitions are declaration-only — Agent does not execute arbitrary client-supplied tools server-side.
Starter Chatbot App in NextJS #
Check out our bare bones chatbot starter kit which demonstrates how to quickly get up and running with this endpoint using Vercel’s AI SDK. Here is where the magic happens in the endpoint that streams responses from our Agent (chat completions) API:
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { streamText } from "ai";
export async function POST(req: Request) {
const { messages } = await req.json();
const apologist = createOpenAICompatible({
name: 'apologist',
apiKey: process.env.APOLOGIST_API_KEY,
baseURL: `${process.env.APOLOGIST_API_URL}`,
});
const result = streamText({
model: apologist('openai/gpt/4o'),
messages: messages,
});
return result.toDataStreamResponse();
}
Yes, it’s really that simple.
Caching #
The completion endpoint supports caching. Under the hood, each version of an Agent’s configuration is stored. In order to have a cached value match, the Agent configuration version, messages (including the current prompt), language, Bible translation, and related request context must all match. The cache is bypassed for json_schema responses and when LLM passthrough parameters such as tools, tool_choice, logprobs, or seed are present. Optional cache TTL may be set via Agent configuration, the x-cache-ttl header, or the cache_ttl query parameter. The cache is very unlikely to be utilized in a chat context, except for pre-defined preliminary prompts. A more common use case would be caching responses for pre-defined text (e.g., a Bible verse).
Learn more about how caching works in our system.
Feedback #
There are 3 additional feedback fields that can set on a given chat completion once it’s been created. These can be used to identify positive, negative, and qualitative feedback on the prompt itself for later viewing / retrieval.
Likes #
Use the POST /api/v1/chat/completions/[prompt_id]/like with a payload as follows to set the liked field:
{
"liked": [true|false]
}
Flags #
Use the POST /api/v1/chat/completions/[prompt_id]/flag with a payload as follows to set the flagged field:
{
"flagged": [true|false]
}
Feedback #
Use the POST /api/v1/chat/completions/[prompt_id]/feedback with a payload as follows to set the feedback field:
{
"feedback": [string|null]
}
Share #
Use POST /api/v1/chat/completions/{prompt_id}/share to create a share record for a completion. All fields are optional:
{
"conversation_id": "conv-123",
"session_id": "sess-456",
"user_id": "user-789"
}
Public shared conversation messages can be retrieved with GET /api/v1/shares/{token} (unauthenticated). List and get completion responses may also include metadata.share_token and metadata.share_url when a conversation is present.
List Chat Completions #
Use the GET /api/v1/chat/completions endpoint to get a paginated list of chat completion records belonging to the authenticated Agent, ordered by prompted_at descending.
Pagination #
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
page | integer | 1 | — | Page number |
per_page | integer | 50 | 100 | Records per page |
Filter Parameters #
All filters are optional and combinable. Omitting a filter returns all records.
| Parameter | Type | Description |
|---|---|---|
language | string | Language code (e.g. en) |
min_timestamp | string | Minimum prompted_at (ISO 8601 timestamp) |
max_timestamp | string | Maximum prompted_at (ISO 8601 timestamp) |
config_id | integer | Agent configuration ID |
flagged | boolean | true or false |
liked | boolean | true or false |
favorited | boolean | true or false |
cached | boolean | true or false |
conversation_id | string | Conversation identifier |
session_id | string | Session identifier |
device_id | string | Device identifier |
user_id | string | User identifier |
bible_id | integer | Bible ID |
client | string | Client type (e.g. standalone, embedded, api, channel, benchmark) |
channel_id | integer | Channel that submitted the request |
Boolean filter parameters accept true/false as strings or native booleans.
Response #
{
"data": [ /* array of prompt objects */ ],
"total": 142,
"page": 1,
"per_page": 50
}
total reflects the full count matching the applied filters (not just the current page), and can be used to calculate page counts.
Get Chat Completion #
Use the GET /api/v1/chat/completions/{prompt_id} endpoint to get a single chat completion record by ID. The endpoint accepts both UUID and legacy numeric integer IDs:
- UUID (current format)
- Numeric integer (legacy)
If the record does not exist or does not belong to the authenticated Agent, a 404 is returned.
Response #
{
"data": { /* prompt object */ }
}
Prompt Object #
Completion records are returned with the public fields below. The id field is the completion UUID. List/get responses are also enriched with applied tags, top-level guardrail and cta (from response metadata), and share metadata. Get-by-id additionally includes automations.
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier |
language | string | Language code |
prompt | string | The user’s prompt text |
response | string | null | The generated response text |
prompted_at | string | UTC timestamp when the prompt was submitted |
response_started_at | string | null | UTC timestamp when streaming began |
response_completed_at | string | null | UTC timestamp when the response finished |
flagged | boolean | Whether the completion has been flagged |
liked | boolean | Whether the completion has been liked |
favorited | boolean | Whether the completion has been favorited |
cached | boolean | Whether the response was served from cache |
feedback | string | null | Free-text feedback submitted by the user |
score | integer | null | Numeric score |
config_id | integer | null | Agent configuration used |
agent_id | integer | null | Agent that handled the completion |
agent_token_id | integer | null | API token used to submit the request |
channel_id | integer | null | Channel that submitted the request |
responder_id | integer | null | Responder used for the completion |
performed_web_search | boolean | Whether a web search was performed |
tags | array | Applied tags as { id, name } objects |
guardrail | object | null | Guardrail metadata when a guardrail fired |
cta | object | null | CTA metadata when a CTA was triggered |
metadata | object | Share fields such as share_token and share_url |
automations | array | null | Automation evaluation results (get-by-id only) |
bible_id | integer | null | Bible context used |
client | string | null | Client type (standalone, embedded, api, integration) |
conversation_id | string | null | Conversation grouping identifier |
session_id | string | null | Session identifier |
device_id | string | null | Device identifier |
user_id | string | null | User identifier |
prompt_tokens | integer | null | Token count for the prompt |
response_tokens | integer | null | Token count for the response |
chat_tokens | integer | null | Token count for the conversation history |
reasoning_tokens | integer | null | Token count for reasoning (where applicable) |
translated_prompt | string | null | Real-time translated prompt text |
translated_response | string | null | Real-time translated response text |
reasoning | string | null | Model reasoning output |
has_persisted_sources | boolean | Whether source documents were stored |
response_metadata | object | null | Additional metadata from the model response |
notes | string | null | Internal notes |
archived_at | string | null | UTC timestamp when the record was archived |
Error Responses #
| Status | Meaning |
|---|---|
400 | Invalid JSON in request body |
403 | Missing or invalid API key |
404 | Record not found or not accessible by this Agent |
422 | Validation error (e.g. missing json_schema.schema) |
500 | Internal server error |
503 | Agent not found or inactive for the request’s host |