naftiko: 1.0.0-alpha2 info: label: PostHog API — LLM Analytics description: 'PostHog API — LLM Analytics. 5 operations. Lead operation: LLM Analytics. Self-contained Naftiko capability covering one Posthog business surface.' tags: - Posthog - LLM Analytics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: POSTHOG_API_KEY: POSTHOG_API_KEY capability: consumes: - type: http namespace: posthog-llm-analytics baseUri: '' description: PostHog API — LLM Analytics business capability. Self-contained, no shared references. resources: - name: api-environments-project_id-llm_analytics-evaluation_summary path: /api/environments/{project_id}/llm_analytics/evaluation_summary/ operations: - name: llmanalyticsevaluationsummarycreate method: POST description: Generate an AI-powered summary of evaluation results. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-environments-project_id-llm_analytics-sentiment path: /api/environments/{project_id}/llm_analytics/sentiment/ operations: - name: llmanalyticssentimentcreate method: POST description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-environments-project_id-llm_analytics-summarization path: /api/environments/{project_id}/llm_analytics/summarization/ operations: - name: llmanalyticssummarizationcreate method: POST description: Generate an AI-powered summary of an LLM trace or event. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-environments-project_id-llm_analytics-summarization-batch_check path: /api/environments/{project_id}/llm_analytics/summarization/batch_check/ operations: - name: llmanalyticssummarizationbatchcheckcreate method: POST description: Check which traces have cached summaries available. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-environments-project_id-llm_analytics-text_repr path: /api/environments/{project_id}/llm_analytics/text_repr/ operations: - name: llmanalyticstextreprcreate method: POST description: Generate a human-readable text representation of an LLM trace event. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.POSTHOG_API_KEY}}' exposes: - type: rest namespace: posthog-llm-analytics-rest port: 8080 description: REST adapter for PostHog API — LLM Analytics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/environments/{project-id}/llm-analytics/evaluation-summary name: api-environments-project-id-llm-analytics-evaluation-summary description: REST surface for api-environments-project_id-llm_analytics-evaluation_summary. operations: - method: POST name: llmanalyticsevaluationsummarycreate description: Generate an AI-powered summary of evaluation results. call: posthog-llm-analytics.llmanalyticsevaluationsummarycreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/llm-analytics/sentiment name: api-environments-project-id-llm-analytics-sentiment description: REST surface for api-environments-project_id-llm_analytics-sentiment. operations: - method: POST name: llmanalyticssentimentcreate description: llmanalyticssentimentcreate call: posthog-llm-analytics.llmanalyticssentimentcreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/llm-analytics/summarization name: api-environments-project-id-llm-analytics-summarization description: REST surface for api-environments-project_id-llm_analytics-summarization. operations: - method: POST name: llmanalyticssummarizationcreate description: Generate an AI-powered summary of an LLM trace or event. call: posthog-llm-analytics.llmanalyticssummarizationcreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/llm-analytics/summarization/batch-check name: api-environments-project-id-llm-analytics-summarization-batch-check description: REST surface for api-environments-project_id-llm_analytics-summarization-batch_check. operations: - method: POST name: llmanalyticssummarizationbatchcheckcreate description: Check which traces have cached summaries available. call: posthog-llm-analytics.llmanalyticssummarizationbatchcheckcreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/llm-analytics/text-repr name: api-environments-project-id-llm-analytics-text-repr description: REST surface for api-environments-project_id-llm_analytics-text_repr. operations: - method: POST name: llmanalyticstextreprcreate description: Generate a human-readable text representation of an LLM trace event. call: posthog-llm-analytics.llmanalyticstextreprcreate with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: posthog-llm-analytics-mcp port: 9090 transport: http description: MCP adapter for PostHog API — LLM Analytics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: generate-ai-powered-summary-evaluation description: Generate an AI-powered summary of evaluation results. hints: readOnly: false destructive: false idempotent: false call: posthog-llm-analytics.llmanalyticsevaluationsummarycreate with: body: tools.body outputParameters: - type: object mapping: $. - name: llmanalyticssentimentcreate description: llmanalyticssentimentcreate hints: readOnly: false destructive: false idempotent: false call: posthog-llm-analytics.llmanalyticssentimentcreate with: body: tools.body outputParameters: - type: object mapping: $. - name: generate-ai-powered-summary-llm description: Generate an AI-powered summary of an LLM trace or event. hints: readOnly: false destructive: false idempotent: false call: posthog-llm-analytics.llmanalyticssummarizationcreate with: body: tools.body outputParameters: - type: object mapping: $. - name: check-which-traces-have-cached description: Check which traces have cached summaries available. hints: readOnly: true destructive: false idempotent: false call: posthog-llm-analytics.llmanalyticssummarizationbatchcheckcreate with: body: tools.body outputParameters: - type: object mapping: $. - name: generate-human-readable-text-representation description: Generate a human-readable text representation of an LLM trace event. hints: readOnly: false destructive: false idempotent: false call: posthog-llm-analytics.llmanalyticstextreprcreate with: body: tools.body outputParameters: - type: object mapping: $.