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
| Status | Description | Body |
|---|---|---|
200 | Success | application/json: object |
default | Error | application/json: Error |
Fields of the 200 response (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | no | Always masked. |
auto_analyze | boolean | no | - |
base_url | string | no | - |
enabled | boolean | no | - |
has_api_key | boolean | no | - |
max_tokens | integer | no | - |
model | string | no | - |
provider | string | no | - |
system_prompt | string | no | - |
timeout_secs | integer | no | - |
PUT /api/v1/admin/ai/config
Update AI config (partial)
Request body (required)
application/json: object
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | no | - |
auto_analyze | boolean | no | Analyse every upload automatically (default false). Takes effect immediately. |
base_url | string | no | - |
enabled | boolean | no | - |
max_tokens | integer | no | - |
model | string | no | - |
provider | string | no | custom is any OpenAI-compatible endpoint and requires base_url. One of: openai, azure, ollama, custom. |
system_prompt | string | no | - |
timeout_secs | integer | no | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success | - |
default | Error | application/json: Error |
GET /api/v1/admin/ai/models
List provider models
Responses
| Status | Description | Body |
|---|---|---|
200 | Success | - |
default | Error | application/json: Error |
POST /api/v1/admin/ai/test
Test AI provider connection
Request body (required)
application/json: object
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | no | - |
base_url | string | no | - |
model | string | no | - |
provider | string | no | One of: openai, azure, ollama, custom. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success | - |
default | Error | application/json: Error |
GET /api/v1/repositories/{name}/ai-analysis
List AI analyses
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | - |
status | query | string | no | - |
limit | query | string | no | - |
offset | query | string | no | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success | - |
default | Error | application/json: Error |
GET /api/v1/repositories/{name}/ai-analysis/{artifactID}
Get AI analysis
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | - |
artifactID | path | string | yes | - |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success | - |
default | Error | application/json: Error |
POST /api/v1/repositories/{name}/ai-analysis/{artifactID}/trigger
Trigger AI analysis
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | - |
artifactID | path | string | yes | - |
Request body
application/json: object
| Field | Type | Required | Description |
|---|---|---|---|
artifact_format | string | no | Optional; taken from the stored artifact when omitted. |
artifact_name | string | no | Optional; taken from the stored artifact when omitted. |
artifact_version | string | no | Optional; taken from the stored artifact when omitted. |
manifest_text | string | no | Optional manifest text sent to the model as-is (max 256 KiB). When omitted the server reads the manifest from the stored artifact. |
Responses
| Status | Description | Body |
|---|---|---|
202 | Queued | - |
404 | Repository not found, or no manifest_text given and the artifact is not in the repository | application/json: Error |
422 | No manifest_text given and no manifest can be read from this kind of artifact (for example docker images and raw files) | application/json: Error |
503 | AI analysis is not enabled | application/json: Error |
default | Error | application/json: Error |