Ir al contenido

Importar un documento fuente

POST/api/public/v1/aip/sources beta

A paste, an uploaded pdf / docx / md / txt, or audio/*. A paste and an upload answer 201 with the canonical text's char_count; audio answers 202: the aip_sources row exists immediately and job_id is the transcribe job to poll. Wait for the transcript before creating a draft. 413 over 5 MiB, 415 for anything outside the list above.

Ventana de terminal
curl --fail-with-body -X POST 'https://app.openlatch.ai/api/public/v1/aip/sources' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"text":"Never push directly to main without a review."}'
Rol en la organizaciónEste punto de conexión
ownerPermitido
adminPermitido
editorPermitido
viewerNo permitido

Una clave tiene el rol que su propietario ocupa en la organización. Consulte Autenticación.

Ámbito de la clave de API: aip:write

ParámetroTipoDescripción
Idempotency-Keystring or nullOptional. Makes this request safe to retry. Depending on the request, the same key with the same request either joins the job the first one queued (409 JOB_ALREADY_EXISTS, the job id in details) or replays the first answer (Idempotent-Replayed: true; 409 IDEMPOTENCY_IN_PROGRESS while it runs). The same key with another request is 422 IDEMPOTENCY_KEY_REUSED.
CampoTipoDescripción
textstringObligatorio. A pasted policy document, verbatim.
CampoTipoDescripción
dataobjectObligatorio. `201 for a paste or an upload` — the text is already canonical.
data.char_countintegerObligatorio.
data.idstringObligatorio.
data.kindstringObligatorio.
data.page_countinteger or null
{
"data": {
"char_count": 3,
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"kind": "string",
"page_count": 3
}
}