API-Referenz

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.

Authentifizierung und Berechtigungen

Verwenden Sie Ihren aktuellen GloopAPI-Schlüssel. Verfügbare Modelle, Funktionen und Berechtigungen hängen von seinem Katalog und der Endpunktdokumentation ab.

Authorization: Bearer $GLOOP_API_KEY

Authentifizierungsschemata: BearerAuth

Anfrage

Anfragekörper · application/json

Typ
object
Zusätzliche Eigenschaften
false
Pflichtfelder
protocolinput

Anfragekörper erforderlich

  • protocolstringErforderlich
    Aufzählung
    ["chat_completions","responses","speech"]
  • inputobjectErforderlich

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

  • max_input_tokensintegerOptional

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

    Minimum
    1
    Maximum
    10000000
  • @oneOf:0objectOptional
    Unterfelder von @oneOf:0 (1)
    • protocolunknownOptional
      Aufzählung
      ["chat_completions","responses"]
  • @oneOf:1objectOptional
    Unterfelder von @oneOf:1 (1)
    • protocolunknownOptional
      Aufzählung
      ["speech"]

Antworten und Fehler

HTTP 200

Verified maximum text cost, without generation or reservation.

application/json

Typ
object
Pflichtfelder
versionidquote_tokenmodelprotocolcurrencymaximum_amountinput_fingerprintpricing_versionexpires_at
  • versionintegerErforderlich
    Aufzählung
    [1]
  • idstringErforderlich
  • quote_tokenstringErforderlich

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

  • modelstringErforderlich
  • protocolstringErforderlich
    Aufzählung
    ["chat_completions","responses"]
  • currencystringErforderlich
    Aufzählung
    ["USD"]
  • maximum_amountstringErforderlich

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

  • input_fingerprintstringErforderlich
  • pricing_versionstringErforderlich
  • expires_atintegerErforderlich

HTTP 400

Ungültige Eingabe.

application/json

Typ
object
Pflichtfelder
error

HTTP 401

Key fehlt, ist ungültig, abgelaufen oder widerrufen.

application/json

Typ
object
Pflichtfelder
error

HTTP 403

Unzureichende IP-, Konto-, Modell- oder Tool-Berechtigungen.

application/json

Typ
object
Pflichtfelder
error

HTTP 404

Ihre Ausführung wurde nicht gefunden; das beweist nicht, dass eine unklare Generierung nicht berechnet wurde.

application/json

Typ
object
Pflichtfelder
error

HTTP 409

Inhaltskonflikt bei dieser Anfrage-ID oder eine laufende Ausführung kann nicht gelöscht werden.

application/json

Typ
object
Pflichtfelder
error

HTTP 422

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

application/json

Typ
object
Pflichtfelder
error

HTTP 429

Anfrage-/Warteschlangenlimit.

application/json

Typ
object
Pflichtfelder
error

HTTP 500

Interner Authentifizierungs- oder Datenspeicherungsfehler.

application/json

Typ
object
Pflichtfelder
error

HTTP 503

Vorübergehend nicht verfügbar; fragen Sie bei unklarem Ergebnis die ursprüngliche Anfrage ab.

application/json

Typ
object
Pflichtfelder
error
Bereit zum Entwickeln? Öffnen Sie Konsole um einen API-Schlüssel zu erstellen, oder durchsuchen Sie Funktionen.