Référence API

Quote maximum text cost

POST/v1/cost-quotes

Versioned 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.

Authentification et autorisations

Utilisez votre clé GloopAPI actuelle. Les modèles, capacités et autorisations disponibles dépendent de son catalogue et de la documentation du point de terminaison.

Authorization: Bearer $GLOOP_API_KEY

Schémas d'authentification : BearerAuth

Requête

Corps de requête · application/json

Type
object
Propriétés supplémentaires
false
Champs obligatoires
protocolinput

Corps de requête obligatoire

  • protocolstringObligatoire
    Énumération
    ["chat_completions","responses","speech"]
  • inputobjectObligatoire

    Exact native text request or standard AudioSpeechInput for protocol=speech. Speech uses configured voice/format and character pricing; no implicit clone.

  • max_input_tokensintegerFacultatif

    Required for text protocols. Omitted for character-priced speech.

    Minimum
    1
    Maximum
    10000000
  • @oneOf:0objectFacultatif
    Sous-champs de @oneOf:0 (1)
    • protocolunknownFacultatif
      Énumération
      ["chat_completions","responses"]
  • @oneOf:1objectFacultatif
    Sous-champs de @oneOf:1 (1)
    • protocolunknownFacultatif
      Énumération
      ["speech"]

Réponses et erreurs

HTTP 200

Verified maximum text cost, without generation or reservation.

application/json

Type
object
Champs obligatoires
versionidquote_tokenmodelprotocolcurrencymaximum_amountinput_fingerprintpricing_versionexpires_at
  • versionintegerObligatoire
    Énumération
    [1]
  • idstringObligatoire
  • quote_tokenstringObligatoire

    Opaque acceptance token bound to the authenticated identity, exact input, model, protocol, frozen pricing and expiry.

  • modelstringObligatoire
  • protocolstringObligatoire
    Énumération
    ["chat_completions","responses"]
  • currencystringObligatoire
    Énumération
    ["USD"]
  • maximum_amountstringObligatoire

    Certified maximum customer wallet charge in USD, derived from the frozen price over all bounded cache and tier branches.

  • input_fingerprintstringObligatoire
  • pricing_versionstringObligatoire
  • expires_atintegerObligatoire

HTTP 400

Entrée invalide.

application/json

Type
object
Champs obligatoires
error

HTTP 401

Key absente, invalide, expirée ou révoquée.

application/json

Type
object
Champs obligatoires
error

HTTP 403

Autorisations IP, compte, modèle ou outil insuffisantes.

application/json

Type
object
Champs obligatoires
error

HTTP 404

Votre exécution est introuvable ; cela ne prouve pas qu’une génération incertaine n’a pas été facturée.

application/json

Type
object
Champs obligatoires
error

HTTP 409

Conflit de contenu pour cet identifiant, ou suppression impossible pendant l’exécution.

application/json

Type
object
Champs obligatoires
error

HTTP 422

No provable current maximum or invalid/changed input. No model execution was dispatched.

application/json

Type
object
Champs obligatoires
error

HTTP 429

Limitation de débit des requêtes/de la file.

application/json

Type
object
Champs obligatoires
error

HTTP 500

Défaillance interne d'authentification ou de stockage des données.

application/json

Type
object
Champs obligatoires
error

HTTP 503

Temporairement indisponible ; consultez la requête initiale si le résultat soumis est incertain.

application/json

Type
object
Champs obligatoires
error