Download OpenAPI specification:
Automatically generated swagger spec for the ai stack.
Returns the advert-generation account config for the given account, including the account-wide style prompt.
| accountId required | string <int64> |
{- "config": {
- "accountId": "string",
- "prompt": "string"
}
}Updates the account-wide advert-generation prompt for the given account. Returns the updated config.
| accountId required | string <int64> |
| prompt | string |
{- "prompt": "string"
}{- "config": {
- "accountId": "string",
- "prompt": "string"
}
}Stores feedback for a prior generation identified by generationId, with rating and optional comment. Does not trigger regeneration. Returns the stored feedback.
| comment | string Optional free text. Does not trigger regeneration by itself. |
| generationId required | string |
| rating required | string (advert_generationFeedbackRating) Default: "FEEDBACK_RATING_UNDEFINED" Enum: "FEEDBACK_RATING_UNDEFINED" "FEEDBACK_RATING_POSITIVE" "FEEDBACK_RATING_NEGATIVE" |
{- "comment": "string",
- "generationId": "string",
- "rating": "FEEDBACK_RATING_UNDEFINED"
}{- "feedback": {
- "comment": "string",
- "rating": "FEEDBACK_RATING_UNDEFINED"
}
}Generates an advert title and description for the given objectId using account config and object data. Returns title, description, generationId, and the ai-gateway requestId.
| objectId required | string |
{- "objectId": "string"
}{- "description": "string",
- "generationId": "string",
- "parentGenerationId": "string",
- "requestId": "string",
- "title": "string"
}Revises a prior generation identified by generationId using the provided feedback instruction. Account prompt and object data are reloaded server-side. Returns a new title, description, generationId, requestId, and parentGenerationId.
| feedback required | string Revision instruction appended as a user turn after the previous assistant output. |
| generationId required | string Prior generation to revise. Account prompt and object data are reloaded server-side. |
{- "feedback": "string",
- "generationId": "string"
}{- "description": "string",
- "generationId": "string",
- "parentGenerationId": "string",
- "requestId": "string",
- "title": "string"
}Returns AI gateway settings for the given account, including whether AI is enabled and which use cases are allowed.
| accountId required | string <int64> |
{- "settings": {
- "accountId": "string",
- "enabled": true,
- "enabledUseCases": [
- "AI_USE_CASE_UNDEFINED"
]
}
}Updates AI gateway settings for the given account: enabled flag and enabled use cases. When enabled is true and enabledUseCases is empty, all registered use cases are allowed. Returns the updated settings.
| accountId required | string <int64> |
| enabled | boolean |
| enabledUseCases | Array of strings (ai_gatewayAiUseCase) Items Enum: "AI_USE_CASE_UNDEFINED" "AI_USE_CASE_CLAIM_MANAGEMENT" "AI_USE_CASE_ADVERT_DESCRIPTION" Use cases enabled for this account. When enabled=true and empty, all registered use cases are allowed. |
{- "enabled": true,
- "enabledUseCases": [
- "AI_USE_CASE_UNDEFINED"
]
}{- "settings": {
- "accountId": "string",
- "enabled": true,
- "enabledUseCases": [
- "AI_USE_CASE_UNDEFINED"
]
}
}Returns a paginated list of individual AI usage records for the given account in the [fromUnix, toUnix) window. Supports optional use-case filter, pageSize, and pageToken. Response includes records, nextPageToken, and totalCount.
| accountId required | string <int64> |
| filterUseCases | Array of strings (ai_gatewayAiUseCase) Items Enum: "AI_USE_CASE_UNDEFINED" "AI_USE_CASE_CLAIM_MANAGEMENT" "AI_USE_CASE_ADVERT_DESCRIPTION" Optional. If empty, include all use cases. |
| fromUnix required | string <int64> Start of period (inclusive), UNIX seconds. |
| pageSize required | integer <int32> Max records to return. Default 50, max 500. |
| pageToken required | string Opaque cursor from previous response. |
| toUnix required | string <int64> End of period (exclusive), UNIX seconds. |
{- "accountId": "string",
- "filterUseCases": [
- "AI_USE_CASE_UNDEFINED"
], - "fromUnix": "string",
- "pageSize": 0,
- "pageToken": "string",
- "toUnix": "string"
}{- "nextPageToken": "string",
- "records": [
- {
- "accountId": "string",
- "context": {
- "clientRequestId": "string",
- "referenceIds": [
- "string"
]
}, - "cost": {
- "amountMicros": "string",
- "currencyCode": "string"
}, - "createdAt": "string",
- "finishReason": "FINISH_REASON_UNDEFINED",
- "latencyMs": 0,
- "provider": "AI_PROVIDER_UNDEFINED",
- "requestId": "string",
- "resolvedModel": "string",
- "usage": {
- "completionTokens": 0,
- "promptTokens": 0,
- "totalTokens": 0
}, - "useCase": "AI_USE_CASE_UNDEFINED",
- "usedFallbackModel": true
}
], - "totalCount": 0
}Returns the configured AI quotas for the given account, typically one entry per quota period (daily, monthly).
| accountId required | string <int64> |
{- "quotas": [
- {
- "costCurrencyCode": "string",
- "hardLimit": true,
- "maxCostMicros": "string",
- "maxRequests": 0,
- "maxTotalTokens": 0,
- "period": "QUOTA_PERIOD_UNDEFINED"
}
]
}Replaces AI quotas for the given account with the provided quota entries (period, max requests/tokens/cost, hard limit). Returns the updated quotas.
| accountId required | string <int64> |
Array of objects (ai_gatewayAiQuota) |
{- "quotas": [
- {
- "costCurrencyCode": "string",
- "hardLimit": true,
- "maxCostMicros": "string",
- "maxRequests": 0,
- "maxTotalTokens": 0,
- "period": "QUOTA_PERIOD_UNDEFINED"
}
]
}{- "quotas": [
- {
- "costCurrencyCode": "string",
- "hardLimit": true,
- "maxCostMicros": "string",
- "maxRequests": 0,
- "maxTotalTokens": 0,
- "period": "QUOTA_PERIOD_UNDEFINED"
}
]
}Returns aggregated AI usage for the given account in the [fromUnix, toUnix) window. Optional filterUseCases limits the summary; response includes request counts, tokens, cost, and per-use-case breakdown.
| accountId required | string <int64> |
| fromUnix | string <int64> Start of period (inclusive), UNIX seconds. |
| toUnix | string <int64> End of period (exclusive), UNIX seconds. |
| filterUseCases | Array of strings Items Enum: "AI_USE_CASE_UNDEFINED" "AI_USE_CASE_CLAIM_MANAGEMENT" "AI_USE_CASE_ADVERT_DESCRIPTION" Optional. If empty, aggregate across all use cases. |
{- "summary": {
- "accountId": "string",
- "byUseCase": [
- {
- "cost": {
- "amountMicros": "string",
- "currencyCode": "string"
}, - "requestCount": 0,
- "tokens": {
- "completionTokens": 0,
- "promptTokens": 0,
- "totalTokens": 0
}, - "useCase": "AI_USE_CASE_UNDEFINED"
}
], - "fromUnix": "string",
- "toUnix": "string",
- "totalCost": {
- "amountMicros": "string",
- "currencyCode": "string"
}, - "totalRequests": 0,
- "totalTokens": {
- "completionTokens": 0,
- "promptTokens": 0,
- "totalTokens": 0
}
}
}