ai14 Ops

AI API

AI provider credentials, feature flags, and usage metering.

Queries

QUERY

aiCallLog

#

Paginated tenant call log. Admin-only.

Argumente

  • providerIdString
  • featureString
  • succeededBoolean
  • daysInt
  • pagination
Gibt zurück!
QUERY

aiFeaturesConfig

#

Read the calling tenant's AI feature toggles. Returns the "all-off" default when no row exists yet.

Gibt zurück!
QUERY

aiProvider

#

Fetch a single AI provider by id. Returns null for unknown ids.

Argumente

  • idString!
Gibt zurück
QUERY

aiProviders

#

List the AI providers configured for the calling tenant. Returns an empty list when nothing is configured — front-ends use the tenant's plan to decide whether to render the upgrade CTA.

Gibt zurück[!]!
QUERY

aiSpendSummary

#

Spend rollup grouped by (provider, feature) over the last days days (default 30). Admin-only.

Argumente

  • daysInt
Gibt zurück!

Mutations

MUTATION

createAiProvider

#

Save a new AI provider for the calling tenant. Requires the tenant to be on Pro plan or higher; otherwise returns PlanGateNotMet.

Argumente

  • input!
Gibt zurück!
MUTATION

deleteAiProvider

#

Soft-delete an AI provider. The credential blob remains on disk (so audit can reference it) but no further AI calls will use it.

Argumente

  • idString!
Gibt zurückBoolean!
MUTATION

setAiFeaturesConfig

#

Toggle one or more AI features for the calling tenant. Plan-gated: Pro+ only. Per-feature toggles default off — every AI feature requires explicit opt-in here before it runs.

Argumente

  • input!
Gibt zurück!
MUTATION

setDefaultAiProvider

#

Promote an AI provider to be the tenant's default. Atomically demotes the previous default if any.

Argumente

  • idString!
Gibt zurückBoolean!
MUTATION

synthesizeSpeech

#

Synthesize speech via the tenant's configured AI provider. Pro+ tenants only; requires voice_tts_enabled toggle.

Argumente

  • input!
Gibt zurück!
MUTATION

testAiProvider

#

Round-trip a tiny "ping" prompt through the configured provider to verify the saved key works. Always returns a result object (success or failure) rather than erroring, so the front-end can render the outcome inline next to the provider row. Counts toward the provider's monthly budget like any other call.

Argumente

  • idString!
Gibt zurück!
MUTATION

transcribeAudio

#

Transcribe an audio clip via the tenant's configured AI provider. Pro+ tenants only; requires voice_transcription_enabled toggle.

Argumente

  • input!
Gibt zurück!
MUTATION

translateText

#

Translate text to target_language. Plan- and toggle-gated.

Argumente

  • input!
Gibt zurück!
MUTATION

updateAiProvider

#

Update an existing AI provider. Use this to rotate the API key, rename, change the default model, change the base URL, or activate/deactivate.

Argumente

  • input!
Gibt zurück!