Method: corpora.documents.create

Creates an empty Document.

HTTP request

POST https://generativelanguage.googleapis.com/v1beta/{parent=corpora/*}/documents

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The name of the Corpus where this Document will be created. Example: corpora/my-corpus-123

Request body

The request body contains an instance of Document.

Response body

If successful, the response body contains a newly created instance of Document.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/generative-language.retriever

For more information, see the Authentication Overview.