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

# Get slice details

> Returns the complete definition for a single slice, including its output schema, preferred model, and evidence grouping strategy. Use this to understand what a slice produces before running it.

<Tip>The `outputSchema` field tells you the exact shape of the structured result you'll get when a run completes. Use it to plan how your integration handles the output.</Tip>


## OpenAPI

````yaml /api/openapi.yaml get /api/public/v1/slices/{key}
openapi: 3.1.0
info:
  title: OnePerfectSlice API
  version: 1.0.0
  description: |
    Programmatic access to OnePerfectSlice. Authenticate with a team-scoped
    API key (Bearer sk_...) obtained from Org Settings → API Keys.
servers:
  - url: https://app.oneperfectslice.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /api/public/v1/slices/{key}:
    get:
      tags:
        - Slices
      summary: Get slice details
      description: >-
        Returns the complete definition for a single slice, including its output
        schema, preferred model, and evidence grouping strategy. Use this to
        understand what a slice produces before running it.
      operationId: getSlice
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
          description: Unique slice key (e.g. "high_intent_deals")
      responses:
        '200':
          description: Slice detail
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/SliceDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Monthly usage limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: USAGE_LIMIT_EXCEEDED
                  message: Monthly usage limit for AI insights runs has been exceeded
        '404':
          description: Slice not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: SLICE_NOT_FOUND
                  message: Slice not found
      security:
        - bearerAuth: []
components:
  schemas:
    SliceDetail:
      type: object
      required:
        - key
        - title
        - objective
        - description
        - elementKeys
        - outputSchema
        - preferredModel
        - includeCrmData
        - evidenceGrouping
      properties:
        key:
          type: string
          example: high_intent_deals
        title:
          type: string
          example: High-Intent Deals
        objective:
          type: string
          enum:
            - pipeline
            - deals
            - expand
            - product
          example: pipeline
        description:
          type: string
          example: Surfaces deals showing strong buying signals.
        elementKeys:
          type: array
          items:
            type: string
          example:
            - intent_signal
            - budget_confirmation
        outputSchema:
          type: object
          description: JSON schema defining the structured output of this slice
          additionalProperties: true
        preferredModel:
          type: string
          description: LLM model used for analysis
          example: gpt-5-mini
        includeCrmData:
          type: boolean
          description: Whether CRM data is included in analysis context
          example: true
        evidenceGrouping:
          type: string
          description: How evidence is grouped in results
          enum:
            - ByElement
            - ByAccount
          example: ByElement
    ApiError:
      type: object
      description: Standard error envelope for all public API error responses
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable UPPER_SNAKE_CASE error code
              example: INVALID_TOKEN
            message:
              type: string
              description: Human-readable error description
              example: Token is invalid
            details:
              type: object
              description: Optional additional error context
              additionalProperties: true
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            missingToken:
              value:
                error:
                  code: MISSING_TOKEN
                  message: Authorization header with Bearer token is required
            invalidToken:
              value:
                error:
                  code: INVALID_TOKEN
                  message: Token is invalid
            tokenRevoked:
              value:
                error:
                  code: TOKEN_REVOKED
                  message: Token has been revoked
            tokenExpired:
              value:
                error:
                  code: TOKEN_EXPIRED
                  message: Token has expired
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with sk_ prefix. Create one in Org Settings → API Keys.
      x-default: sk_your_api_key

````