> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get data contribution settings

> Returns workspace consent, classifier configuration, and recent aggregate contribution analytics. Requires `settings:read` and feature access.

<Note>This endpoint requires the data-contribution feature, an owner or admin identity, and the appropriate settings capability.</Note>


## OpenAPI

````yaml GET /data-contribution
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    A gateway API for accessing various AI models with OpenAI-compatible
    endpoints.
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /data-contribution:
    get:
      tags:
        - Gateway
      summary: Get data contribution settings
      description: >-
        Returns workspace consent, classifier configuration, and recent
        aggregate contribution analytics. Requires `settings:read` and feature
        access.
      operationId: getDataContributionSettings
      responses:
        '200':
          description: Data contribution settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataContributionOverviewResponse'
        default:
          description: Request failed or feature unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DataContributionOverviewResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - enabled
            - policyVersion
            - sampleRateBps
            - classifierSampleRateBps
            - discountBps
            - last30Days
            - classifiers
            - analytics
            - starterCategories
          properties:
            enabled:
              type: boolean
            policyVersion:
              type: string
            consentedAt:
              type: string
              format: date-time
              nullable: true
            sampleRateBps:
              type: integer
            classifierSampleRateBps:
              type: integer
            discountBps:
              type: integer
            last30Days:
              type: object
              required:
                - contributions
                - discountNanos
              properties:
                contributions:
                  type: integer
                discountNanos:
                  type: integer
            classifiers:
              type: array
              items:
                $ref: '#/components/schemas/DataContributionClassifier'
            analytics:
              type: array
              items:
                type: object
                additionalProperties: true
            starterCategories:
              $ref: '#/components/schemas/DataContributionCategories'
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        ok:
          type: boolean
          example: false
        error:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          example: error_type
        message:
          type: string
          example: Human-readable error message
        description:
          type: string
          example: Additional error details.
        generation_id:
          type: string
          example: G-abc123
        status_code:
          type: integer
          example: 502
        error_type:
          type: string
          enum:
            - user
            - system
          example: system
        error_origin:
          type: string
          enum:
            - user
            - gateway
            - upstream
          example: upstream
        reason:
          type: string
          example: all_candidates_failed
        attempt_count:
          type: integer
          example: 2
        failed_providers:
          type: array
          items:
            type: string
          example:
            - google-ai-studio
            - openai
        failed_statuses:
          type: array
          items:
            type: integer
          example:
            - 403
            - 429
        upstream_error:
          $ref: '#/components/schemas/ErrorUpstreamError'
        failure_sample:
          type: array
          items:
            $ref: '#/components/schemas/ErrorFailureSampleItem'
        provider_failure_diagnostics:
          $ref: '#/components/schemas/ErrorProviderFailureDiagnostics'
        routing_diagnostics:
          $ref: '#/components/schemas/ErrorRoutingDiagnostics'
        provider_candidate_diagnostics:
          $ref: '#/components/schemas/ErrorProviderCandidateDiagnostics'
        provider_enablement:
          $ref: '#/components/schemas/ErrorProviderEnablementDiagnostics'
        missing_pricing_providers:
          type: array
          items:
            type: string
        provider_payment_required_provider:
          type: string
          example: openai
        provider_payment_required_support_notice:
          type: string
          example: >-
            Our upstream provider billing appears to be unavailable. If this
            persists, contact support.
        details:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    DataContributionClassifier:
      type: object
      required:
        - id
        - slug
        - name
        - kind
        - instructions
        - categories
        - model
        - service_tier
        - sample_rate_bps
        - enabled
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        kind:
          type: string
          enum:
            - starter
            - custom
        instructions:
          type: string
        categories:
          $ref: '#/components/schemas/DataContributionCategories'
        model:
          type: string
        service_tier:
          type: string
          enum:
            - standard
            - flex
        sample_rate_bps:
          type: integer
        enabled:
          type: boolean
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
      additionalProperties: true
    DataContributionCategories:
      type: object
      minProperties: 1
      maxProperties: 16
      additionalProperties:
        type: array
        minItems: 1
        maxItems: 32
        items:
          type: string
    ErrorUpstreamError:
      type: object
      properties:
        code:
          type: string
          nullable: true
          example: PERMISSION_DENIED
        message:
          type: string
          nullable: true
          example: The caller does not have permission.
        description:
          type: string
          nullable: true
        param:
          type: string
          nullable: true
    ErrorFailureSampleItem:
      type: object
      properties:
        provider:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        status:
          type: integer
          nullable: true
        upstream_error_code:
          type: string
          nullable: true
        upstream_error_message:
          type: string
          nullable: true
        upstream_error_description:
          type: string
          nullable: true
        upstream_error_param:
          type: string
          nullable: true
        upstream_payload_preview:
          type: string
          nullable: true
        retryable:
          type: boolean
          nullable: true
      additionalProperties: true
    ErrorProviderFailureDiagnostics:
      type: object
      properties:
        category:
          type: string
          enum:
            - credentials_not_configured
            - credentials_invalid_or_forbidden
            - provider_access_missing
            - region_or_project_restriction
            - model_unavailable_for_endpoint
            - rate_limited
            - server_error
        hint:
          type: string
        provider:
          type: string
          nullable: true
    ErrorRoutingDiagnostics:
      type: object
      properties:
        filterStages:
          type: array
          items:
            type: object
            properties:
              stage:
                type: string
              beforeCount:
                type: integer
              afterCount:
                type: integer
              droppedProviders:
                type: array
                items:
                  type: object
                  properties:
                    providerId:
                      type: string
                      nullable: true
                    reason:
                      type: string
                      nullable: true
                  additionalProperties: true
            additionalProperties: true
      additionalProperties: true
    ErrorProviderCandidateDiagnostics:
      type: object
      properties:
        totalProviders:
          type: integer
        supportsEndpointCount:
          type: integer
        candidateCount:
          type: integer
        droppedUnsupportedEndpoint:
          type: array
          items:
            type: string
        droppedMissingAdapter:
          type: array
          items:
            type: object
            properties:
              providerId:
                type: string
                nullable: true
              endpoint:
                type: string
                nullable: true
            additionalProperties: true
      additionalProperties: true
    ErrorProviderEnablementDiagnostics:
      type: object
      properties:
        capability:
          type: string
        providersBefore:
          type: array
          items:
            type: string
        providersAfter:
          type: array
          items:
            type: string
        dropped:
          type: array
          items:
            type: object
            properties:
              providerId:
                type: string
                nullable: true
              reason:
                type: string
                nullable: true
            additionalProperties: true
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication

````