Skip to main content
metadata fills the info block of the generated document. It is the only required plugin option.
payload.config.ts
metadata.title and metadata.version are required. The plugin throws on boot if either is missing.

The base URL is not metadata

metadata carries the API’s title, version, and description only — never its URL. Keeping the base URL out of the config is what lets the same document work behind any host, proxy, or environment.
  • Over HTTP, the spec’s servers field is filled in per request from the incoming Host header. There is nothing to configure.
  • Writing to a file, there is no request to read a host from, so you set it yourself with the CLI’s --server flag (see Generate) or an explicit servers array when building the document in your own code (see Programmatic use).