View Categories

Chat Completions

Our Agent (chat completions) endpoint is fully compatible with the OpenAI chat completions API specification. This means that our API is a like-for-like swap for any application currently using the popular LLM chat completions API signature, and should be plug and play with any of the many OpenAI SDKs in the language of your choice.

Demo Chatbot App

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: text/plain' \
--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"
    },
    "frequency_penalty": 0.25,
    "presence_penalty": -0.25,
    "max_completion_tokens": 1024,
    "reasoning_effort": "high",
    "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.

API Keys #

API keys are provisioned against a given Agent and cannot be used for another Agent.

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 to true, no past exchange context is provided to the Agent (one-shot); equivalent to setting metadata.max_memories: 0
  • metadata.max_memories: the number of previous exchanges to provide to Agent

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 the stream option is true. 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 the response_format parameter. [default when streaming]
  • text: plain text output; may include markdown
  • html: HTML formatted, converted from markdown where applicable
  • json: structured JSON response; includes completion as well as token usage and timing stats. Only available if the stream option is false. [default when not streaming]

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 to the Agent which Bible translation is preferred to use. The following is the list of supported Bible translations at this time:

  • bsb: Berean Standard Bible [default]
  • webu: World English Bible Updated
  • net: New English Translation
  • oeb: Open English Bible
  • drb: Douay-Rheims Bible
  • esv: English Standard Version
  • niv: New International Version
  • kjv: King James Version
  • nkjv: New King James Version
  • nlt: New Living Translation
  • csb: Christian Standard Bible
  • nasb1995: New American Standard Bible 1995
  • nasb: New American Standard Bible
  • lsb: Legacy Standard Bible
  • tlv: Tree of Life Version
  • cjb: 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: Abkhaz
  • ace: Acehnese
  • ach: Acholi
  • af: Afrikaans
  • sq: Albanian
  • alz: Alur
  • am: Amharic
  • ar: Arabic
  • hy: Armenian
  • as: Assamese
  • awa: Awadhi
  • ay: Aymara
  • az: Azerbaijani
  • ban: Balinese
  • bm: Bambara
  • ba: Bashkir
  • eu: Basque
  • btx: Batak Karo
  • bts: Batak Simalungun
  • bbc: Batak Toba
  • be: Belarusian
  • bem: Bemba
  • bn: Bengali
  • bew: Betawi
  • bho: Bhojpuri
  • bik: Bikol
  • bs: Bosnian
  • br: Breton
  • bg: Bulgarian
  • bua: Buryat
  • yue: Cantonese
  • ca: Catalan
  • ceb: Cebuano
  • ny: Chichewa (Nyanja)
  • zh: Chinese (Simplified)
  • zh-TW: Chinese (Traditional)
  • cv: Chuvash
  • co: Corsican
  • crh: Crimean Tatar
  • hr: Croatian
  • cs: Czech
  • da: Danish
  • din: Dinka
  • dv: Divehi
  • doi: Dogri
  • dov: Dombe
  • nl: Dutch
  • dz: Dzongkha
  • eo: Esperanto
  • et: Estonian
  • ee: Ewe
  • fj: Fijian
  • tl: Filipino (Tagalog)
  • fi: Finnish
  • fr: French
  • fr-CA: French (Canadian)
  • fy: Frisian
  • ff: Fulfulde
  • gaa: Ga
  • gl: Galician
  • lg: Ganda (Luganda)
  • ka: Georgian
  • de: German
  • el: Greek
  • gn: Guarani
  • gu: Gujarati
  • ht: Haitian Creole
  • cnh: Hakha Chin
  • ha: Hausa
  • haw: Hawaiian
  • he: Hebrew
  • hil: Hiligaynon
  • hi: Hindi
  • hmn: Hmong
  • hu: Hungarian
  • hrx: Hunsrik
  • is: Icelandic
  • ig: Igbo
  • ilo: Iloko
  • id: Indonesian
  • ga: Irish
  • it: Italian
  • ja: Japanese
  • jw: Javanese
  • kn: Kannada
  • pam: Kapampangan
  • kk: Kazakh
  • km: Khmer
  • cgg: Kiga
  • rw: Kinyarwanda
  • ktu: Kituba
  • gom: Konkani
  • ko: Korean
  • kri: Krio
  • ku: Kurdish (Kurmanji)
  • ckb: Kurdish (Sorani)
  • ky: Kyrgyz
  • lo: Lao
  • ltg: Latgalian
  • la: Latin
  • lv: Latvian
  • lij: Ligurian
  • li: Limburgan
  • ln: Lingala
  • lt: Lithuanian
  • lmo: Lombard
  • luo: Luo
  • lb: Luxembourgish
  • mk: Macedonian
  • mai: Maithili
  • mak: Makassar
  • mg: Malagasy
  • ms: Malay
  • ms-Arab: Malay (Jawi)
  • ml: Malayalam
  • mt: Maltese
  • mi: Maori
  • mr: Marathi
  • chm: Meadow Mari
  • mni-Mtei: Meiteilon (Manipuri)
  • min: Minang
  • lus: Mizo
  • mn: Mongolian
  • my: Myanmar (Burmese)
  • nr: Ndebele (South)
  • new: Nepalbhasa (Newari)
  • ne: Nepali
  • nso: Northern Sotho (Sepedi)
  • no: Norwegian
  • nus: Nuer
  • oc: Occitan
  • or: Odia (Oriya)
  • om: Oromo
  • pag: Pangasinan
  • pap: Papiamento
  • ps: Pashto
  • fa: Persian (Farsi)
  • pl: Polish
  • pt: Portuguese
  • pt-BR: Portuguese (Brazil)
  • pa: Punjabi
  • pa-Arab: Punjabi (Shahmukhi)
  • qu: Quechua
  • rom: Romani
  • ro: Romanian
  • rn: Rundi
  • ru: Russian
  • sm: Samoan
  • sg: Sango
  • sa: Sanskrit
  • gd: Scots Gaelic
  • sr: Serbian
  • st: Sesotho
  • crs: Seychellois Creole
  • shn: Shan
  • sn: Shona
  • scn: Sicilian
  • szl: Silesian
  • sd: Sindhi
  • si: Sinhala (Sinhalese)
  • sk: Slovak
  • sl: Slovenian
  • so: Somali
  • es: Spanish
  • su: Sundanese
  • sw: Swahili
  • ss: Swati
  • sv: Swedish
  • tg: Tajik
  • ta: Tamil
  • tt: Tatar
  • te: Telugu
  • tet: Tetum
  • th: Thai
  • ti: Tigrinya
  • ts: Tsonga
  • tn: Tswana
  • tr: Turkish
  • tk: Turkmen
  • ak: Twi (Akan)
  • uk: Ukrainian
  • ur: Urdu
  • ug: Uyghur
  • uz: Uzbek
  • vi: Vietnamese
  • cy: Welsh
  • xh: Xhosa
  • yi: Yiddish
  • yo: Yoruba
  • yua: Yucatec Maya
  • zu: 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 Credits
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 1
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 1
Anthropic Claude Haiku 3.5 anthropic/claude/haiku-3.5 ar, de, en, es, fr, hi, it, ja, ko, pt, ru, zh 2
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 2
Meta Llama 4 Scout meta/llama4/scout ar, de, en, es, fr, hi, id, it, ja, nl, pt, ru, th, tr, zh 1
Mistral Medium 3 mistral/medium/3 de, en, es, fr, it, ja, ko, nl, po, pt, zh 1
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 1
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 1
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 1
MiniMax M2.7 FP4 minimaxai/m/2.7 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 1
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 1

Standard Models #

Economic models that balance lower cost with better responses.

Model Model ID Supported Languages Credits
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 1
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 1
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 2
Anthropic Claude Haiku 4.5 anthropic/claude/haiku-4.5 ar, de, en, es, fr, hi, it, ja, ko, pt, ru, zh 3
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 1
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 1
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 2
Meta Llama 4 Maverick meta/llama4/maverick ar, de, en, es, fr, hi, id, it, ja, nl, pt, ru, th, tr, zh 2
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 3
GLM 5.1 FP4 zai/glm/5.1 en, es, fr, ja, ko, ru, zh 3
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 2
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 3
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 3

Premium Models #

Higher quality output at a premium price point.

Model Model ID Supported Languages Credits
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 4
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 7
Anthropic Claude 4.6 Sonnet anthropic/claude/sonnet-4.6 ar, bn, de, en, es, fr, hi, id, it, ja, ko, pt, ru, sw, yo, zh 7
xAI Grok 4 xai/grok/4 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 7
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 5
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 6
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 6
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 4
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 4

Reasoning Models #

High-latency but extremely high quality output.

Model Model ID Supported Languages Credits
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 4
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 11
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 13
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 11
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 3
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 4

Standard LLM Parameters #

The chat completion endpoint supports standard LLM parameters that modify the behavior of the model:

  • frequency_penalty
  • presence_penalty
  • max_completion_tokens
  • reasoning_effort (for reasoning models only)
  • temperature
  • top_p

See OpenAI’s docs for more information about these parameters.

Ineffectual Passthrough Parameters #

There are some parameters that do not directly affect Agent’s response, but we pass them along to the target LLM for your convenience in order to be fully compatible with OpenAI’s chat completions endpoint:

  • audio
  • logit_bias
  • logprobs
  • modalities
  • n
  • parallel_tool_calls
  • prediction
  • seed
  • service_tier
  • stop
  • store
  • stream_options
  • tools
  • tool_choice

Agent does not currently support multi-modal input or output. Agent supports returning only a single response at a time. Agent does not currently support the use of external tools.

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, and Bible translation must all match. 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]
}

List Chat Completions #

Use the GET /api/v1/chat/completions endpoint to get a paginated list of chat completion records belonging to the authenticated team, ordered by prompted_at descending.

Pagination #

ParameterTypeDefaultMaxDescription
pageinteger1Page number
per_pageinteger50100Records per page

Filter Parameters #

All filters are optional and combinable. Omitting a filter returns all records.

ParameterTypeDescription
languagestringLanguage code (e.g. en)
min_timestampstringMinimum prompted_at (ISO 8601 timestamp)
max_timestampstringMaximum prompted_at (ISO 8601 timestamp)
config_idintegerAgent configuration ID
flaggedbooleantrue or false
likedbooleantrue or false
favoritedbooleantrue or false
cachedbooleantrue or false
conversation_idstringConversation identifier
session_idstringSession identifier
device_idstringDevice identifier
user_idstringUser identifier
bible_idintegerBible ID
clientstringClient type (e.g. standalone, embedded, api, integration)
agent_idintegerSpecific agent within the team
agent_integration_idintegerAgent integration ID

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 #

All fields from the prompts table are returned. The id field contains the record’s UUID — the raw uuid column is not included separately.

FieldTypeDescription
idstring (UUID)Unique identifier
languagestringLanguage code
promptstringThe user’s prompt text
responsestring | nullThe generated response text
prompted_atstringUTC timestamp when the prompt was submitted
response_started_atstring | nullUTC timestamp when streaming began
response_completed_atstring | nullUTC timestamp when the response finished
flaggedbooleanWhether the completion has been flagged
likedbooleanWhether the completion has been liked
favoritedbooleanWhether the completion has been favorited
cachedbooleanWhether the response was served from cache
feedbackstring | nullFree-text feedback submitted by the user
scoreinteger | nullNumeric score
config_idinteger | nullAgent configuration used
agent_idinteger | nullAgent that handled the completion
agent_token_idinteger | nullAPI token used to submit the request
agent_integration_idinteger | nullIntegration that submitted the request
bible_idinteger | nullBible context used
clientstring | nullClient type (standalone, embedded, api, integration)
conversation_idstring | nullConversation grouping identifier
session_idstring | nullSession identifier
device_idstring | nullDevice identifier
user_idstring | nullUser identifier
prompt_tokensinteger | nullToken count for the prompt
response_tokensinteger | nullToken count for the response
chat_tokensinteger | nullToken count for the conversation history
reasoning_tokensinteger | nullToken count for reasoning (where applicable)
translated_promptstring | nullReal-time translated prompt text
translated_responsestring | nullReal-time translated response text
reasoningstring | nullModel reasoning output
has_persisted_sourcesbooleanWhether source documents were stored
response_metadataobject | nullAdditional metadata from the model response
notesstring | nullInternal notes
archived_atstring | nullUTC timestamp when the record was archived

Error Responses #

StatusMeaning
403Missing or invalid API key
404Record not found or not accessible by this team
500Internal server error
503Agent not found or inactive for the request’s host