Skip to content

AI API ​

7 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.

Endpoints ​

GET /api/v1/admin/ai/config ​

Get AI config (api key masked)

Responses

StatusDescriptionBody
200Successapplication/json: object
defaultErrorapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
api_keystringnoAlways masked.
auto_analyzebooleanno-
base_urlstringno-
enabledbooleanno-
has_api_keybooleanno-
max_tokensintegerno-
modelstringno-
providerstringno-
system_promptstringno-
timeout_secsintegerno-

PUT /api/v1/admin/ai/config ​

Update AI config (partial)

Request body (required)

application/json: object

FieldTypeRequiredDescription
api_keystringno-
auto_analyzebooleannoAnalyse every upload automatically (default false). Takes effect immediately.
base_urlstringno-
enabledbooleanno-
max_tokensintegerno-
modelstringno-
providerstringnocustom is any OpenAI-compatible endpoint and requires base_url. One of: openai, azure, ollama, custom.
system_promptstringno-
timeout_secsintegerno-

Responses

StatusDescriptionBody
200Success-
defaultErrorapplication/json: Error

GET /api/v1/admin/ai/models ​

List provider models

Responses

StatusDescriptionBody
200Success-
defaultErrorapplication/json: Error

POST /api/v1/admin/ai/test ​

Test AI provider connection

Request body (required)

application/json: object

FieldTypeRequiredDescription
api_keystringno-
base_urlstringno-
modelstringno-
providerstringnoOne of: openai, azure, ollama, custom.

Responses

StatusDescriptionBody
200Success-
defaultErrorapplication/json: Error

GET /api/v1/repositories/{name}/ai-analysis ​

List AI analyses

Parameters

NameInTypeRequiredDescription
namepathstringyes-
statusquerystringno-
limitquerystringno-
offsetquerystringno-

Responses

StatusDescriptionBody
200Success-
defaultErrorapplication/json: Error

GET /api/v1/repositories/{name}/ai-analysis/{artifactID} ​

Get AI analysis

Parameters

NameInTypeRequiredDescription
namepathstringyes-
artifactIDpathstringyes-

Responses

StatusDescriptionBody
200Success-
defaultErrorapplication/json: Error

POST /api/v1/repositories/{name}/ai-analysis/{artifactID}/trigger ​

Trigger AI analysis

Parameters

NameInTypeRequiredDescription
namepathstringyes-
artifactIDpathstringyes-

Request body

application/json: object

FieldTypeRequiredDescription
artifact_formatstringnoOptional; taken from the stored artifact when omitted.
artifact_namestringnoOptional; taken from the stored artifact when omitted.
artifact_versionstringnoOptional; taken from the stored artifact when omitted.
manifest_textstringnoOptional manifest text sent to the model as-is (max 256 KiB). When omitted the server reads the manifest from the stored artifact.

Responses

StatusDescriptionBody
202Queued-
404Repository not found, or no manifest_text given and the artifact is not in the repositoryapplication/json: Error
422No manifest_text given and no manifest can be read from this kind of artifact (for example docker images and raw files)application/json: Error
503AI analysis is not enabledapplication/json: Error
defaultErrorapplication/json: Error

Free software under the AGPL-3.0-or-later.