Skip to main content

endpoints_v11.go (package eai)

Source: sdks/go/endpoints_v11.go. Back to the Go SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class MetaService​

MetaService groups the endpoints of: System endpoints: health, readiness, platform metadata and the current principal.

MetaService.Metrics​

Metrics(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

Metrics calls GET /metrics and returns the Prometheus text format.

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). The Prometheus text of /metrics encoded as one JSON string. The error is a typed error of the SDK, nil on success.

Raises: error.

Class RiskService​

Risk and compliance. Risk management of the AI systems of the tenant: EU AI Act assessments, controls mapped to ISO/IEC 42001, NIST AI RMF, GDPR and the EU AI Act, evidence and time limited exceptions.

RiskService.ListExceptions​

ListExceptions(ctx context.Context, opts ...CallOption) (*Page, error)

List the exceptions. Lists the exceptions of the tenant ordered by expiry, each with its computed status: active, expired or revoked. Open to any member of the tenant. next_cursor is always null.

Route: /v1/risk/exceptions (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

Class ModelsService​

LLM and Model Gateway. Model providers, the model registry, routing rules and the Model Gateway: the only path agents and applications use to call models.

ModelsService.ApproveVersion​

ApproveVersion(ctx context.Context, modelID string, version string, body any, opts ...CallOption) (json.RawMessage, error)

Request the approval of a version. Opens an approval request (action model_version_activation) for a draft version and answers 202 with its id; the version becomes pending_approval. The approvers are tenant_admin and security_officer, and the requester cannot approve its own request (separation of duties). A version that is not a draft answers 409 model_version_state. Audited. Requires a tenant principal with tenant_admin or platform_admin.

Route: /v1/models/{model_id}/versions/{version}/approval (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
modelIDstringyesRegistry identifier of the model.
versionstringyesVersion to approve, as registered.
bodyanyyesOptional {reason} shown to the approvers.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Request the approval of a version". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.CreateCategory​

CreateCategory(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

Create a model category. Creates a category for the tenant, or a shared one with scope: platform (platform_admin only, 403 platform_only), and answers 201. A slug already used answers 409 category_exists; invalid fields 422 parameter_invalid. Audited. Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/llm/categories (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesslug (lowercase letters, digits, dashes and underscores, 1 to 40 characters, required), label (text or {en, fr}, 80 characters at most, required), description (500 characters at most), icon, sort_order (0 to 10000, default 100), scope (platform for a shared category).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a model category". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.CreateVersion​

CreateVersion(ctx context.Context, modelID string, body any, opts ...CallOption) (json.RawMessage, error)

Register a model version. Registers a version of the model in the tenant with status draft and answers 201. The version needs a licence (SPDX expression, or terms reference starting with https:// or LicenseRef-) and the weights provenance; invalid fields answer 422 model_version_invalid with their names, an existing version 409 model_version_exists. Audited (model.version.create). Requires a tenant principal with tenant_admin or platform_admin.

Route: /v1/models/{model_id}/versions (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
modelIDstringyesRegistry identifier of the model.
bodyanyyesversion (1 to 64 characters: letters, digits, dots, dashes, underscores, plus), licence_spdx or licence_terms_ref, weights with source (https://, oci://, hf://, s3:// or registry://), digest (sha256: and 64 hex characters) and size_bytes (positive integer), optional capabilities (list of texts).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Register a model version". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.DeleteCategory​

DeleteCategory(ctx context.Context, slug string, opts ...CallOption) error

Delete a model category. Deletes a category created by the tenant or the platform and answers 204. A predefined category cannot be deleted (409 category_builtin), nor a category still used by a model (409 category_in_use); a shared category needs platform_admin (403 platform_only). Audited. Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/llm/categories/{slug} (DELETE).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
slugstringyesSlug of the category: lowercase letters, digits, dashes and underscores, 1 to 40 characters.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: error. Error of the call (a typed error of the SDK), nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.Enable​

Enable(ctx context.Context, modelID string, opts ...CallOption) (json.RawMessage, error)

Enable a disabled model. Lifts the kill switch of the model for the tenant. Audited (model.enable). Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/models/{model_id}/enable (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
modelIDstringyesRegistry identifier of the model.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Enable a disabled model". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.GetCategory​

GetCategory(ctx context.Context, slug string, opts ...CallOption) (json.RawMessage, error)

Get a model category. One model category with its number of models. Unknown slug: 404 category_not_found. Requires a reader role.

Route: /v1/llm/categories/{slug} (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
slugstringyesSlug of the category.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Get a model category". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.Import​

Import(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

Import discovered models. Registers the models chosen in a discovery. Idempotent: the ones already registered (same id, or same provider and provider model id) are skipped and listed with already_registered. Every item is checked first; one invalid item refuses the whole import with 422 import_invalid and the problem of each item. Each model and the import are audited. Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/models/import (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesprovider_id (provider id or name, required), models (1 to 200 objects from the discovery: provider_model_id and the optional registry id, category and sheet fields), optional scope (platform).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Import discovered models". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.ListCategories​

ListCategories(ctx context.Context, opts ...CallOption) (*Page, error)

List the model categories. Model categories visible to the caller (predefined, shared and tenant ones) with their label and description in English and French, icon, order and number of models using them. One page only. Requires a reader role.

Route: /v1/llm/categories (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.ListVersions​

ListVersions(ctx context.Context, modelID string, opts ...CallOption) (json.RawMessage, error)

List the versions of a model. Versions of the model in the tenant, oldest first, with licence, weights source, digest and size, capabilities, status (draft, pending_approval, canary, active, superseded, rolled_back) and approval. Requires a tenant principal with tenant_admin, platform_admin, security_officer, finops, developer, auditor or viewer.

Route: /v1/models/{model_id}/versions (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
modelIDstringyesRegistry identifier of the model.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the versions of a model". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.Rollback​

Rollback(ctx context.Context, modelID string, body any, opts ...CallOption) (json.RawMessage, error)

Roll back a model version. During a canary, aborts it: the active version keeps all the traffic. Otherwise, restores the version that was active before the last full publication. The version left becomes rolled_back, the step is added to the rollout history and audited (model.rollout.rollback). Nothing to roll back: 409 model_rollback_unavailable. Requires a tenant principal with tenant_admin or platform_admin.

Route: /v1/models/{model_id}/rollback (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
modelIDstringyesRegistry identifier of the model.
bodyanyyesOptional {reason} written to the rollout history and the audit trail.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Roll back a model version". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.Rollout​

Rollout(ctx context.Context, modelID string, opts ...CallOption) (json.RawMessage, error)

Read the rollout of a model. Active version, canary version and canary share of the model in the tenant, with the whole rollout history (publish, canary, rollback, actor, reason, approval). Requires a tenant principal with tenant_admin, platform_admin, security_officer, finops, developer, auditor or viewer.

Route: /v1/models/{model_id}/rollout (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
modelIDstringyesRegistry identifier of the model.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the rollout of a model". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.RolloutVersion​

RolloutVersion(ctx context.Context, modelID string, version string, body any, opts ...CallOption) (json.RawMessage, error)

Publish a model version. Publishes an approved version fully (canary_percent 100, default) or as a canary for 1 to 99 percent of the traffic, picked deterministically from the caller (same session or principal, same version). Requires a tenant principal with tenant_admin or platform_admin.

Route: /v1/models/{model_id}/versions/{version}/rollout (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
modelIDstringyesRegistry identifier of the model.
versionstringyesApproved version to publish.
bodyanyyescanary_percent (integer 1 to 100, default 100) and an optional reason.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Publish a model version". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

ModelsService.UpdateCategory​

UpdateCategory(ctx context.Context, slug string, body any, opts ...CallOption) (json.RawMessage, error)

Update a model category. Changes the label, description, icon or order of a category; the slug never changes. A predefined category answers 409 category_builtin; a shared category needs platform_admin. Invalid values answer 422 parameter_invalid. Audited. Requires tenant_admin, platform_admin or ai_platform_engineer.

Route: /v1/llm/categories/{slug} (PATCH).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
slugstringyesSlug of the category.
bodyanyyesFields to change: label and description (a text, or {en, fr}; label 80 characters at most, description 500), icon (lowercase name of 1 to 48 characters, or null), sort_order (0 to 10000).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Update a model category". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

Class MediaService​

Multimodal. Media and multimodal processing: encrypted media storage and jobs for vision, image generation and edition, video processing and generation, speech to text, diarization, text to speech and multimodal DLP.

MediaService.List​

List(ctx context.Context, opts ...CallOption) (*Page, error)

List the media. Tenant media (Multimodal Contract documents), keyset paginated with cursor, filtered by media_type and classification (400 invalid_request for an unknown value).

Route: /v1/media (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

Class MultimodalService​

Multimodal. Media and multimodal processing: encrypted media storage and jobs for vision, image generation and edition, video processing and generation, speech to text, diarization, text to speech and multimodal DLP.

MultimodalService.CompleteJob​

CompleteJob(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

Report the result of a queued job. Called by GPU workers (agent or service identities) to report a queued job result: status running, succeeded, failed or cancelled (else 400 invalid_request), with output, error and measured units; the quota reservation is committed or released. A finished job answers 409 conflict. Needs agent or tenant_admin. 404 not_found.

Route: /v1/multimodal/jobs/{job_id}/complete (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the job.
bodyanyyesStatus, output, error and measured units of the job.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Report the result of a queued job". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

Class RealtimeService​

Realtime voice. Realtime voice sessions: a LiveKit room token and a WebSocket event protocol to stream audio to an agent, with participant consent, turns, DLP filtered transcripts, optional recordings and metering.

RealtimeService.CreateToken​

CreateToken(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

Get a new WebSocket token. New single use WebSocket token for an open session (reconnection), read under RLS: ws_url, ws_token, ws_token_expires_at. 409 session_ended; 404 not_found. Needs tenant_admin, developer or agent. Audited as realtime.session.token.

Route: /v1/realtime/sessions/{session_id}/token (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the realtime session.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Get a new WebSocket token". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RealtimeService.GetSession​

GetSession(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

Get a realtime session. Returns the session: room, identities, agent, pipeline, configuration, status, audio seconds, tokens and usage. 404 not_found.

Route: /v1/realtime/sessions/{session_id} (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the realtime session.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Get a realtime session". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RealtimeService.ListConsents​

ListConsents(ctx context.Context, sessionID string, opts ...CallOption) (json.RawMessage, error)

List the consents of a session. Consents recorded for the session, in capture order, with their revocation when revoked. One page only.

Route: /v1/realtime/sessions/{session_id}/consents (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
sessionIDstringyesIdentifier (UUID) of the realtime session.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the consents of a session". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RealtimeService.RecordConsent​

RecordConsent(ctx context.Context, sessionID string, body any, opts ...CallOption) (json.RawMessage, error)

Record a participant consent. Consent of one participant (purpose, recording, transcription, retention, method), captured by the caller (201). The participant defaults to the participant of the session. The method must be verbal, click, written or api (422 parameter_invalid); the session must not be ended (409 session_ended); the policy realtime.consent.record is evaluated. Needs tenant_admin, developer or agent. Audited as realtime.consent.record.

Route: /v1/realtime/sessions/{session_id}/consents (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
sessionIDstringyesIdentifier (UUID) of the realtime session.
bodyanyyesThe consent of the participant.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Record a participant consent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RealtimeService.RevokeConsent​

RevokeConsent(ctx context.Context, sessionID string, consentID string, opts ...CallOption) (json.RawMessage, error)

Revoke a consent. Revocation takes effect on the next audio event: transcription and recording are refused again. A consent already revoked or unknown answers 404 not_found. Needs tenant_admin, developer or agent. Audited as realtime.consent.revoke.

Route: /v1/realtime/sessions/{session_id}/consents/{consent_id}/revoke (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
sessionIDstringyesIdentifier (UUID) of the realtime session.
consentIDstringyesIdentifier (UUID) of the consent.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Revoke a consent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RealtimeService.Transcripts​

Transcripts(ctx context.Context, sessionID string, opts ...CallOption) (json.RawMessage, error)

List the transcripts of a session. Stored transcripts, already filtered by the DLP (the raw transcript is never stored), with turn, consent, participant, DLP findings and expiry. Needs tenant_admin, developer, auditor or security_officer.

Route: /v1/realtime/sessions/{session_id}/transcripts (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
sessionIDstringyesIdentifier (UUID) of the realtime session.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the transcripts of a session". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RealtimeService.Turns​

Turns(ctx context.Context, sessionID string, opts ...CallOption) (json.RawMessage, error)

List the turns of a session. Turns with the participant, the user, the agent, the trace id, the status (a barge-in records cancelled) and the measured latency, in order. One page only.

Route: /v1/realtime/sessions/{session_id}/turns (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
sessionIDstringyesIdentifier (UUID) of the realtime session.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the turns of a session". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RealtimeService.WebSocketURL​

WebSocketURL(sessionID string) (string, error)

WebSocketURL returns the ws(s) URL of WebSocket /v1/realtime/ws/{session_id}; dial it with the headers of Client.Headers (see package realtime).

NameTypeDefaultRequiredDescription
sessionIDstringyesIdentifier of the realtime session, put in place of {session_id}.

Returns: (string, error). The wss:// URL (or ws:// for localhost and 127.0.0.1) built from the base URL; the error is set when the identifier or the URL is refused by ValidateWebSocketURL.

Raises: error.

Class FinOpsService​

FinOps. Cost management of AI usage: price cards, usage events, estimates, quotas and reservations, GPU cost allocation, billing reconciliation and alerts.

FinOpsService.CheckBudget​

CheckBudget(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

Read the quota consumption. Each quota of the tenant with its current window and the cost and tokens used and reserved in it. Run quotas need run to find their window. Requires a reader role and a tenant principal.

Route: /v1/quotas/usage (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the quota consumption". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

FinOpsService.CreateMediaPrice​

CreateMediaPrice(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

Add a media price revision. Adds a dated price revision for a media unit and answers 201. A revision never rewrites an older one. The same unit, provider, resource and start date answers 409 media_price_exists; an invalid field 422 media_price_invalid. Audited. Requires finops or tenant_admin, and a tenant principal.

Route: /v1/finops/media-prices (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesunit (audio_second, image, video_second, gpu_second, storage_gb_month), provider, unit_price (number, at least 0), currency (ISO 4217), source (where the price comes from, required), optional resource (default *, the whole provider) and effective_from (ISO 8601, default now).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Add a media price revision". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

FinOpsService.EstimateMediaCost​

EstimateMediaCost(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

Estimate media costs. Prices up to 100 media items with the revision in force at their date (exact resource first, then the provider wide * revision). An item without price comes back with amount: null, status: unavailable and reason: price_unknown; total is given only when every item is priced in one currency (complete: true). Invalid items answer 422 media_price_invalid with the field. Requires a reader role or agent, and a tenant principal.

Route: /v1/finops/media-costs/estimate (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesitems: 1 to 100 objects with unit (audio_second, image, video_second, gpu_second, storage_gb_month), provider, quantity (positive number), optional resource (default *) and at (ISO 8601, default now).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Estimate media costs". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

FinOpsService.ListMediaPrices​

ListMediaPrices(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

List the media prices. Dated media price revisions of the tenant by unit, provider, resource and date, with the list of supported units. An unknown unit answers 422 media_price_invalid. Requires a reader role and a tenant principal.

Route: /v1/finops/media-prices (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the media prices". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

FinOpsService.RecordUsage​

RecordUsage(ctx context.Context, event any, opts ...CallOption) (json.RawMessage, error)

Ingest a usage event. Validates a Usage Event v1, prices it (measured cost in the tenant currency) and stores it; answers 201, or 200 with duplicate: true when the same event_id was already stored. An invalid event answers 422 usage_event_invalid with the errors; an event of another tenant 403 usage_tenant_mismatch. One audit event per call, never the payload. Requires finops, tenant_admin, agent or developer, and a tenant principal.

Route: /v1/finops/usage (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
eventanyyesUsage Event to record, any JSON serializable value; sent as is to IngestUsage.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Ingest a usage event". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

FinOpsService.Settings​

Settings(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

Read the FinOps settings. Currency, monthly budget, variance threshold and reservation lifetime of the tenant (defaults: USD, no budget, 10 percent, 900 seconds). Requires a reader role and a tenant principal.

Route: /v1/finops/settings (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the FinOps settings". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

FinOpsService.UpdateSettings​

UpdateSettings(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

Change the FinOps settings. Changes the given settings of the tenant; omitted or null fields keep their value. Audited (finops.settings.update). Requires finops or tenant_admin, and a tenant principal.

Route: /v1/finops/settings (PUT).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesSettings to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change the FinOps settings". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).