APIAI documents
Poll an AI document generation
GET /documents/generations/{id}
AuthorizationBearer <token>
ChatPRD API key from Settings → API Keys, sent as Authorization: Bearer <key>. Read-only keys carry the connector:read scope; read/write keys also carry connector:write. Requires a Pro, Team or Enterprise plan.
In: header
Scope: connector:read
Path Parameters
idstring
Generation ID returned by an ai-create, ai-edit or ai-rewrite request.
Format
uuidResponse Body
curl -X GET "https://app.chatprd.ai/api/connectors/v1/documents/generations/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"kind": "create",
"status": "generating",
"threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",
"documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
"url": "http://example.com",
"error": {
"code": "string",
"message": "string"
},
"document": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"title": "string",
"contentMarkdown": "string",
"url": "http://example.com",
"threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",
"updatedAt": "2019-08-24T14:15:22Z"
},
"createdAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}