مرجع API
Quote maximum text cost
/v1/cost-quotesVersioned GloopAPI extension for authenticated, read-only text cost quotes. Uses current model permission, routing, conversion and the same immutable pricing engine as execution. Binds exact explicit text input, output limit, input-token bound, identity, model, protocol, pricing version and expiry. All cache and tier branches are bounded conservatively; unsupported request-dependent expressions or unbounded tools are rejected. Does not generate, reserve or charge. Submit the returned quote_token as quote_id with the same native input to POST /v1/text-runs. Price/input changes or expiry reject new execution; existing request recovery remains valid. Excess actual cost is an accounting anomaly that remains unsettled, never silently capped or subsidized. Speech extension: protocol=speech accepts the standard model/input/voice/response_format/speed body, without max_input_tokens. Only immutable input-character pricing is certified; token or duration estimates are rejected. Submit that signed quote_token and exact input to POST /v1/audio-runs.
المصادقة والصلاحيات
استخدم مفتاح GloopAPI الحالي. تعتمد النماذج والإمكانات والصلاحيات المتاحة على دليله ووثائق نقطة النهاية.
Authorization: Bearer $GLOOP_API_KEYآليات المصادقة: BearerAuth
الطلب
جسم الطلب · application/json
- النوع
- object
- خصائص إضافية
- false
- الحقول المطلوبة
protocolinput
جسم الطلب مطلوب
protocolstringمطلوب- القيم المعدودة
["chat_completions","responses","speech"]
inputobjectمطلوبExact native text request or standard AudioSpeechInput for protocol=speech. Speech uses configured voice/format and character pricing; no implicit clone.
max_input_tokensintegerاختياريRequired for text protocols. Omitted for character-priced speech.
- الحد الأدنى
1- الحد الأقصى
10000000
@oneOf:0objectاختياريالحقول الفرعية لـ @oneOf:0 (1)
protocolunknownاختياري- القيم المعدودة
["chat_completions","responses"]
@oneOf:1objectاختياريالحقول الفرعية لـ @oneOf:1 (1)
protocolunknownاختياري- القيم المعدودة
["speech"]
الاستجابات والأخطاء
HTTP 200
Verified maximum text cost, without generation or reservation.
application/json
- النوع
- object
- الحقول المطلوبة
versionidquote_tokenmodelprotocolcurrencymaximum_amountinput_fingerprintpricing_versionexpires_at
versionintegerمطلوب- القيم المعدودة
[1]
idstringمطلوبquote_tokenstringمطلوبOpaque acceptance token bound to the authenticated identity, exact input, model, protocol, frozen pricing and expiry.
modelstringمطلوبprotocolstringمطلوب- القيم المعدودة
["chat_completions","responses"]
currencystringمطلوب- القيم المعدودة
["USD"]
maximum_amountstringمطلوبCertified maximum customer wallet charge in USD, derived from the frozen price over all bounded cache and tier branches.
input_fingerprintstringمطلوبpricing_versionstringمطلوبexpires_atintegerمطلوب
HTTP 400
إدخال غير صالح.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري
HTTP 401
Key مفقود أو غير صالح أو منتهي أو ملغى.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري
HTTP 403
صلاحيات IP أو الحساب أو النموذج أو الأداة غير كافية.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري
HTTP 404
لم يُعثر على تنفيذك؛ هذا لا يثبت أن التوليد غير المؤكد لم تُحتسب تكلفته.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري
HTTP 409
تعارض في محتوى معرّف الطلب أو لا يمكن حذف تنفيذ جارٍ.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري
HTTP 422
No provable current maximum or invalid/changed input. No model execution was dispatched.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري
HTTP 429
حد معدل الطلبات/قائمة الانتظار.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري
HTTP 500
فشل داخلي في المصادقة أو تخزين البيانات.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري
HTTP 503
غير متاح مؤقتًا؛ استعلم عن الطلب الأصلي إذا كانت نتيجة الطلب المرسل غير مؤكدة.
application/json
- النوع
- object
- الحقول المطلوبة
error
errorobjectمطلوبالحقول الفرعية لـ error (4)
codestringاختياريmessagestringاختياريtypestringاختياريrequest_idstringاختياري