ai API (develop:84871a)

Download OpenAPI specification:

License: None

Automatically generated swagger spec for the ai stack.

AdvertGenerationService

Get advert generation account config

Returns the advert-generation account config for the given account, including the account-wide style prompt.

path Parameters
accountId
required
string <int64>

Responses

Response samples

Content type
application/json
{
  • "config": {
    }
}

Set advert generation account config

Updates the account-wide advert-generation prompt for the given account. Returns the updated config.

path Parameters
accountId
required
string <int64>
Request Body schema: application/json
required
prompt
string

Responses

Request samples

Content type
application/json
{
  • "prompt": "string"
}

Response samples

Content type
application/json
{
  • "config": {
    }
}

Submit feedback on a generation

Stores feedback for a prior generation identified by generationId, with rating and optional comment. Does not trigger regeneration. Returns the stored feedback.

Request Body schema: application/json
required
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"

Responses

Request samples

Content type
application/json
{
  • "comment": "string",
  • "generationId": "string",
  • "rating": "FEEDBACK_RATING_UNDEFINED"
}

Response samples

Content type
application/json
{
  • "feedback": {
    }
}

Generate an advert description

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.

Request Body schema: application/json
required
objectId
required
string

Responses

Request samples

Content type
application/json
{
  • "objectId": "string"
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "generationId": "string",
  • "parentGenerationId": "string",
  • "requestId": "string",
  • "title": "string"
}

Regenerate an advert description

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.

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "feedback": "string",
  • "generationId": "string"
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "generationId": "string",
  • "parentGenerationId": "string",
  • "requestId": "string",
  • "title": "string"
}

AiGatewayService

Get AI account settings

Returns AI gateway settings for the given account, including whether AI is enabled and which use cases are allowed.

path Parameters
accountId
required
string <int64>

Responses

Response samples

Content type
application/json
{
  • "settings": {
    }
}

Set AI account settings

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.

path Parameters
accountId
required
string <int64>
Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "enabledUseCases": [
    ]
}

Response samples

Content type
application/json
{
  • "settings": {
    }
}

List AI usage records

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.

Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "accountId": "string",
  • "filterUseCases": [
    ],
  • "fromUnix": "string",
  • "pageSize": 0,
  • "pageToken": "string",
  • "toUnix": "string"
}

Response samples

Content type
application/json
{
  • "nextPageToken": "string",
  • "records": [
    ],
  • "totalCount": 0
}

Get AI quotas for an account

Returns the configured AI quotas for the given account, typically one entry per quota period (daily, monthly).

path Parameters
accountId
required
string <int64>

Responses

Response samples

Content type
application/json
{
  • "quotas": [
    ]
}

Set AI quotas for an account

Replaces AI quotas for the given account with the provided quota entries (period, max requests/tokens/cost, hard limit). Returns the updated quotas.

path Parameters
accountId
required
string <int64>
Request Body schema: application/json
required
Array of objects (ai_gatewayAiQuota)

Responses

Request samples

Content type
application/json
{
  • "quotas": [
    ]
}

Response samples

Content type
application/json
{
  • "quotas": [
    ]
}

Get AI usage summary

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.

path Parameters
accountId
required
string <int64>
query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "summary": {
    }
}