Skip to content

Primary Source - API & Advanced Usage

REST API

Namespace: primary-source/v1. The endpoints expose AI content resources with semantic metadata, optimized for agents.

Endpoint Description
GET /wp-json/primary-source/v1/{resource_type} List resources (profile, services, FAQ, cases...) with metadata
GET /wp-json/primary-source/v1/{resource_type}/chunks?id={id} Pre-computed RAG chunks of a resource
GET /openapi.yaml Automatically generated OpenAPI 3.1.0 documentation

Discovery files

The plugin generates automatically (rewrite rules):

File Description
/llms.txt Text index of the content for LLMs
/llms-{lang}.txt Language-localized version (e.g. llms-en.txt, llms-it.txt)
/ai.txt Access rules for AI bots
/ai-sitemap.xml Sitemap with semantic namespaces (ai:primary_source, ai:entity_type)
/.well-known/ai-plugin.json Manifest following the OpenAI standard

Shortcode

[primary_source id="123"]
[primary_source type="ai_profile" limit="5"]

Defaults: type ai_profile, limit 3.


Back to overview | Installation | Configuration