PostHog LLM Analytics API

The LLM Analytics API from PostHog — 58 operation(s) for llm analytics.

OpenAPI Specification

posthog-llm-analytics-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PostHog actions LLM Analytics API
  version: 1.0.0
  description: ''
tags:
- name: LLM Analytics
paths:
  /api/environments/{project_id}/llm_analytics/evaluation_summary/:
    post:
      operationId: llm_analytics_evaluation_summary_create
      description: "\nGenerate an AI-powered summary of evaluation results.\n\nThis endpoint analyzes evaluation runs and identifies patterns in passing\nand failing evaluations, providing actionable recommendations.\n\nData is fetched server-side by evaluation ID to ensure data integrity.\n\n**Use Cases:**\n- Understand why evaluations are passing or failing\n- Identify systematic issues in LLM responses\n- Get recommendations for improving response quality\n- Review patterns across many evaluation runs at once\n        "
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluationSummaryRequest'
            examples:
              EvaluationSummaryRequest:
                value:
                  evaluation_id: 550e8400-e29b-41d4-a716-446655440000
                  filter: all
                  force_refresh: false
                summary: Evaluation Summary Request
                description: Summarize evaluation results by ID
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EvaluationSummaryRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EvaluationSummaryRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - llm_analytics:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluationSummaryResponse'
              examples:
                SuccessResponse:
                  value:
                    overall_assessment: Evaluations show generally good quality with some factual accuracy issues.
                    pass_patterns:
                    - title: Clear Communication
                      description: Responses consistently provided well-structured information
                      frequency: common
                      example_generation_ids:
                      - gen_abc123
                      - gen_ghi789
                    fail_patterns:
                    - title: Factual Errors
                      description: Some responses contained inaccurate information
                      frequency: occasional
                      example_generation_ids:
                      - gen_def456
                    na_patterns: []
                    recommendations:
                    - Implement fact-checking for critical claims
                    - Add source citations where applicable
                    statistics:
                      total_analyzed: 3
                      pass_count: 2
                      fail_count: 1
                      na_count: 0
                  summary: Success Response
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '500':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
      x-explicit-tags:
      - LLM Analytics
      - llm_analytics
  /api/environments/{project_id}/llm_analytics/sentiment/:
    post:
      operationId: llm_analytics_sentiment_create
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SentimentRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SentimentRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SentimentRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - llm_analytics:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentimentBatchResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '500':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
      x-explicit-tags:
      - LLM Analytics
      - llm_analytics
  /api/environments/{project_id}/llm_analytics/summarization/:
    post:
      operationId: llm_analytics_summarization_create
      description: "\nGenerate an AI-powered summary of an LLM trace or event.\n\nThis endpoint analyzes the provided trace/event, generates a line-numbered text\nrepresentation, and uses an LLM to create a concise summary with line references.\n\n**Two ways to use this endpoint:**\n\n1. **By ID (recommended):** Pass `trace_id` or `generation_id` with an optional `date_from`/`date_to`.\n   The backend fetches the data automatically. `summarize_type` is inferred.\n2. **By data:** Pass the full trace/event data blob in `data` with `summarize_type`.\n   This is how the frontend uses it.\n\n**Summary Format:**\n- Title (concise, max 10 words)\n- Mermaid flow diagram showing the main flow\n- 3-10 summary bullets with line references\n- \"Interesting Notes\" section for failures, successes, or unusual patterns\n- Line references in [L45] or [L45-52] format pointing to relevant sections\n\nThe response includes the structured summary, the text representation, and metadata.\n        "
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SummarizeRequest'
            examples:
              TraceSummarization:
                value:
                  summarize_type: trace
                  data:
                    trace:
                      id: trace_123
                      properties:
                        $ai_span_name: ChatBot Interaction
                    hierarchy:
                    - event:
                        id: gen_1
                        event: $ai_generation
                        properties:
                          $ai_input:
                          - role: user
                            content: Hello
                          $ai_output_choices:
                          - message:
                              role: assistant
                              content: Hi there!
                      children: []
                summary: Trace Summarization
                description: Summarize a full trace with hierarchy
              EventSummarization:
                value:
                  summarize_type: event
                  data:
                    event:
                      id: gen_456
                      event: $ai_generation
                      properties:
                        $ai_input:
                        - role: user
                          content: Explain Python
                        $ai_output_choices:
                        - message:
                            role: assistant
                            content: Python is...
                summary: Event Summarization
                description: Summarize a single generation event
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SummarizeRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SummarizeRequest'
      security:
      - PersonalAPIKeyAuth:
        - llm_analytics:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummarizeResponse'
              examples:
                SuccessResponse:
                  value:
                    summary: '## Summary

                      - User initiated conversation with greeting [L5-8]

                      - Assistant responded with friendly message [L12-15]


                      ## Interesting Notes

                      - Standard greeting pattern with no errors'
                    metadata:
                      text_repr_length: 450
                      model: gpt-4.1
                  summary: Success Response
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '500':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
      x-explicit-tags:
      - LLM Analytics
      - llm_analytics
  /api/environments/{project_id}/llm_analytics/summarization/batch_check/:
    post:
      operationId: llm_analytics_summarization_batch_check_create
      description: "\nCheck which traces have cached summaries available.\n\nThis endpoint allows batch checking of multiple trace IDs to see which ones\nhave cached summaries. Returns only the traces that have cached summaries\nwith their titles.\n\n**Use Cases:**\n- Load cached summaries on session view load\n- Avoid unnecessary LLM calls for already-summarized traces\n- Display summary previews without generating new summaries\n        "
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchCheckRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BatchCheckRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BatchCheckRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchCheckResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
      x-explicit-tags:
      - LLM Analytics
      - llm_analytics
  /api/environments/{project_id}/llm_analytics/text_repr/:
    post:
      operationId: llm_analytics_text_repr_create
      description: "\nGenerate a human-readable text representation of an LLM trace event.\n\nThis endpoint converts LLM analytics events ($ai_generation, $ai_span, $ai_embedding, or $ai_trace)\ninto formatted text representations suitable for display, logging, or analysis.\n\n**Supported Event Types:**\n- `$ai_generation`: Individual LLM API calls with input/output messages\n- `$ai_span`: Logical spans with state transitions\n- `$ai_embedding`: Embedding generation events (text input → vector)\n- `$ai_trace`: Full traces with hierarchical structure\n\n**Options:**\n- `max_length`: Maximum character count (default: 2000000)\n- `truncated`: Enable middle-content truncation within events (default: true)\n- `truncate_buffer`: Characters at start/end when truncating (default: 1000)\n- `include_markers`: Use interactive markers vs plain text indicators (default: true)\n  - Frontend: set true for `<<<TRUNCATED|base64|...>>>` markers\n  - Backend/LLM: set false for `... (X chars truncated) ...` text\n- `collapsed`: Show summary vs full trace tree (default: false)\n- `include_hierarchy`: Include tree structure for traces (default: true)\n- `max_depth`: Maximum depth for hierarchical rendering (default: unlimited)\n- `tools_collapse_threshold`: Number of tools before auto-collapsing list (default: 5)\n  - Tool lists >5 items show `<<<TOOLS_EXPANDABLE|...>>>` marker for frontend\n  - Or `[+] AVAILABLE TOOLS: N` for backend when `include_markers: false`\n- `include_line_numbers`: Prefix each line with line number like L001:, L010: (default: false)\n\n**Use Cases:**\n- Frontend display: `truncated: true, include_markers: true, include_line_numbers: true`\n- Backend LLM context (summary): `truncated: true, include_markers: false, collapsed: true`\n- Backend LLM context (full): `truncated: false`\n\nThe response includes the formatted text and metadata about the rendering.\n        "
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextReprRequest'
            examples:
              GenerationExample:
                value:
                  event_type: $ai_generation
                  data:
                    id: gen_123
                    properties:
                      $ai_input:
                      - role: user
                        content: What is the capital of France?
                      $ai_output_choices:
                      - message:
                          role: assistant
                          content: The capital of France is Paris.
                  options:
                    max_length: 10000
                summary: Generation Example
                description: Stringify an $ai_generation event
              TraceExample:
                value:
                  event_type: $ai_trace
                  data:
                    trace:
                      trace_id: trace_123
                      name: ChatBot Interaction
                    hierarchy:
                    - id: gen_1
                      event: $ai_generation
                      children: []
                summary: Trace Example
                description: Stringify a full trace with hierarchy
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TextReprRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TextReprRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - llm_analytics:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextReprResponse'
              examples:
                SuccessResponse:
                  value:
                    text: 'INPUT:


                      [1] USER


                      What is the capital of France?


                      ...'
                    metadata:
                      event_type: $ai_generation
                      event_id: gen_123
                      rendering: detailed
                      char_count: 150
                      truncated: false
                  summary: Success Response
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '500':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
      x-explicit-tags:
      - LLM Analytics
      - llm_analytics
  /api/environments/{environment_id}/dataset_items/:
    get:
      operationId: environments_dataset_items_list
      parameters:
      - in: query
        name: dataset
        schema:
          type: string
        description: Filter by dataset ID
        examples:
          SingleDatasetID:
            value: 695401fa-6f0e-4389-b186-c45a7f1273d3
            summary: Single dataset ID
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      tags:
      - LLM Analytics
      security:
      - PersonalAPIKeyAuth:
        - dataset:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetItemList'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
    post:
      operationId: environments_dataset_items_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetItem'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatasetItem'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatasetItem'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - dataset:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetItem'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
  /api/environments/{environment_id}/dataset_items/{id}/:
    get:
      operationId: environments_dataset_items_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this dataset item.
        required: true
      tags:
      - LLM Analytics
      security:
      - PersonalAPIKeyAuth:
        - dataset:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetItem'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
    put:
      operationId: environments_dataset_items_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this dataset item.
        required: true
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetItem'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatasetItem'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatasetItem'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - dataset:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetItem'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
    patch:
      operationId: environments_dataset_items_partial_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this dataset item.
        required: true
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDatasetItem'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDatasetItem'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDatasetItem'
      security:
      - PersonalAPIKeyAuth:
        - dataset:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetItem'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
    delete:
      operationId: environments_dataset_items_destroy
      description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this dataset item.
        required: true
      tags:
      - LLM Analytics
      security:
      - PersonalAPIKeyAuth:
        - dataset:write
      responses:
        '405':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - llm_analytics
  /api/environments/{environment_id}/datasets/:
    get:
      operationId: environments_datasets_list
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: id__in
        schema:
          type: array
          items:
            type: string
            format: uuid
        description: Multiple values may be separated by commas.
        explode: false
        style: form
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - in: query
        name: order_by
        schema:
          type: array
          items:
            type: string
            enum:
            - -created_at
            - -updated_at
            - created_at
            - updated_at
        description: 'Ordering


          * `created_at` - Created At

          * `-created_at` - Created At (descending)

          * `updated_at` - Updated At

          * `-updated_at` - Updated At (descending)'
        explode: false
        style: form
      - in: query
        name: search
        schema:
          type: string
        description: Search in name, description, or metadata
      tags:
      - LLM Analytics
      security:
      - PersonalAPIKeyAuth:
        - dataset:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetList'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
    post:
      operationId: environments_datasets_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dataset'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Dataset'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Dataset'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - dataset:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
  /api/environments/{environment_id}/datasets/{id}/:
    get:
      operationId: environments_datasets_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this dataset.
        required: true
      tags:
      - LLM Analytics
      security:
      - PersonalAPIKeyAuth:
        - dataset:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
    put:
      operationId: environments_datasets_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this dataset.
        required: true
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dataset'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Dataset'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Dataset'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - dataset:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
    patch:
      operationId: environments_datasets_partial_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this dataset.
        required: true
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDataset'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDataset'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDataset'
      security:
      - PersonalAPIKeyAuth:
        - dataset:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
          description: ''
      deprecated: true
      x-explicit-tags:
      - llm_analytics
    delete:
      operationId: environments_datasets_destroy
      description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this dataset.
        required: true
      tags:
      - LLM Analytics
      security:
      - PersonalAPIKeyAuth:
        - dataset:write
      responses:
        '405':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - llm_analytics
  /api/environments/{project_id}/evaluation_runs/:
    post:
      operationId: evaluation_runs_create
      description: 'Create a new evaluation run.


        This endpoint validates the request and enqueues a Temporal workflow

        to asynchronously execute the evaluation.'
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluationRunRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EvaluationRunRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EvaluationRunRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - evaluation:write
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
      x-explicit-tags:
      - llm_analytics
  /api/environments/{project_id}/evaluations/:
    get:
      operationId: evaluations_list
      parameters:
      - in: query
        name: enabled
        schema:
          type: boolean
        description: Filter by enabled status
      - in: query
        name: id__in
        schema:
          type: array
          items:
            type: string
            format: uuid
        description: Multiple values may be separated by commas.
        explode: false
        style: form
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - in: query
        name: order_by
        schema:
          type: array
          items:
            type: string
            enum:
            - -created_at
            - -name
            - -updated_at
            - created_at
            - name
            - updated_at
        description: 'Ordering


          * `created_at` - Created At

          * `-created_at` - Created At (descending)

          * `updated_at` - Updated At

          * `-updated_at` - Updated At (descending)

          * `name` - Name

          * `-name` - Name (descending)'
        explode: false
        style: form
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: query
        name: search
        schema:
          type: string
        description: Search in name or description
      tags:
      - LLM Analytics
      security:
      - PersonalAPIKeyAuth:
        - evaluation:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedEvaluationList'
          description: ''
      x-explicit-tags:
      - llm_analytics
    post:
      operationId: evaluations_create
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - LLM Analytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Evaluation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Evaluation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Evaluation'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - evaluation:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Evaluation'
          description: ''
      x-explicit-tags:
      - llm_analytics
  /api/environments/{project_id}/evaluations/{id}/:
    get:
      operationId: evaluations_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this evaluation.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
  

# --- truncated at 32 KB (208 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/openapi/posthog-llm-analytics-api-openapi.yml