Op deze pagina

API-referentie: AI

De AI-endpoints voeren AI-prompts asynchroon uit. Je kunt de API herhaaldelijk aanroepen om het resultaat op te vragen.

Een directe AI-prompt starten (async; poll POST …/ai/{promptType}/status met dezelfde body)

Endpoint: POST /v1/tenant/{tenantId}/ai/{promptType}

Authenticatie: Tenantgebonden API-sleutel · scope write

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
promptType processAnalysis | processQuestion | aiSummary | processDocumentation | processRaci | processMetaEdit path Ja Toegestane waarden: processAnalysis, processQuestion, aiSummary, processDocumentation, processRaci, processMetaEdit

Request body:

{
	"prompt": "string",
	"summaryVariant": "string"
}
Veld Type Verplicht Beschrijving
prompt string Ja Prompt in natuurlijke taal
Maximale lengte: 10000
summaryVariant string Nee

Response (200):

AI-resultaat (status: success | generating | error)

{
	"status": "success",
	"result": {
		"type": "processAnalysis",
		"analysis": "string"
	},
	"error": "string"
}
Veld Type Verplicht Beschrijving
status success | error | generating Ja Toegestane waarden: success, error, generating
result object | object | object | object | object | object Nee Promptspecifieke resultaatgegevens, aanwezig wanneer de status success is
error string Nee Foutmelding wanneer de status error is

Fouten:

  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 429 Gebruikslimiet bereikt

Een lopende AI-generatie opvragen (stuur exact dezelfde body als bij de POST waarmee de generatie is gestart)

POST gebruiken om de status op te vragen is bewust zo ontworpen: de generatie wordt bepaald door prompt + promptType + summaryVariant. Daarom stuur je bij het opvragen opnieuw de body mee in plaats van een run-id.

Endpoint: POST /v1/tenant/{tenantId}/ai/{promptType}/status

Authenticatie: Tenantgebonden API-sleutel · scope write

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
promptType processAnalysis | processQuestion | aiSummary | processDocumentation | processRaci | processMetaEdit path Ja Toegestane waarden: processAnalysis, processQuestion, aiSummary, processDocumentation, processRaci, processMetaEdit

Request body:

{
	"prompt": "string",
	"summaryVariant": "string"
}
Veld Type Verplicht Beschrijving
prompt string Ja Prompt in natuurlijke taal
Maximale lengte: 10000
summaryVariant string Nee

Response (200):

AI-resultaat (status: success | generating | error)

{
	"status": "success",
	"result": {
		"type": "processAnalysis",
		"analysis": "string"
	},
	"error": "string"
}
Veld Type Verplicht Beschrijving
status success | error | generating Ja Toegestane waarden: success, error, generating
result object | object | object | object | object | object Nee Promptspecifieke resultaatgegevens, aanwezig wanneer de status success is
error string Nee Foutmelding wanneer de status error is

Fouten:

  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 429 Gebruikslimiet bereikt