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

# Read a stored object as a text, document or binary entry

> Read one stored object as an entry: ``text`` or ``document`` with its ``content``, else ``binary``.

The kind and the content are the shared content classifier's. A binary object is
classified from its size and at most two detection windows, never read whole. A
refused text or document (over the size cap, not UTF-8, an extractor's failure) is
a ``400``; a missing object a ``404``; no provider, or no ``files`` extra, a ``501``.



## OpenAPI

````yaml /openapi.json get /api/storage/entries/{resource_id}
openapi: 3.1.0
info:
  description: >-
    The operator HTTP surface served under /api/*. The platform's core routes.
    Plugin routes are published by each plugin.
  title: tai42-skeleton API
  version: 30.0.0
servers: []
security: []
paths:
  /api/storage/entries/{resource_id}:
    get:
      tags:
        - storage
      summary: Read a stored object as a text, document or binary entry
      description: >-
        Read one stored object as an entry: ``text`` or ``document`` with its
        ``content``, else ``binary``.


        The kind and the content are the shared content classifier's. A binary
        object is

        classified from its size and at most two detection windows, never read
        whole. A

        refused text or document (over the size cap, not UTF-8, an extractor's
        failure) is

        a ``400``; a missing object a ``404``; no provider, or no ``files``
        extra, a ``501``.
      operationId: get_api_storage_entries_resource_id
      parameters:
        - in: path
          name: resource_id
          required: true
          schema:
            type: string
          x-tai42-converter: path
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/StoredEntry'
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    StoredEntry:
      description: One stored object as a text, document or binary entry.
      discriminator:
        mapping:
          binary: '#/components/schemas/StoredBinaryEntry'
          document: '#/components/schemas/StoredDocumentEntry'
          text: '#/components/schemas/StoredTextEntry'
        propertyName: kind
      oneOf:
        - $ref: '#/components/schemas/StoredTextEntry'
        - $ref: '#/components/schemas/StoredDocumentEntry'
        - $ref: '#/components/schemas/StoredBinaryEntry'
      title: StoredEntry
    Error:
      properties:
        code:
          description: >-
            Stable machine-readable reason a client keys a dedicated error state
            on, present on refusals that opt in (e.g. a 501 not-configured
            refusal). Optional: absent when the error carries only a
            human-readable message.
          type: string
        error:
          type: string
      required:
        - error
      type: object
    StoredBinaryEntry:
      description: 'A stored binary object: its metadata, with no content.'
      properties:
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        id:
          title: Id
          type: string
        kind:
          const: binary
          title: Kind
          type: string
        size:
          title: Size
          type: integer
      required:
        - kind
        - id
        - content_type
        - size
      title: StoredBinaryEntry
      type: object
    StoredDocumentEntry:
      description: >-
        A stored document (PDF, DOCX, …): ``content`` is the text extracted from
        it, not its stored bytes.
      properties:
        content:
          title: Content
          type: string
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        id:
          title: Id
          type: string
        kind:
          const: document
          title: Kind
          type: string
        size:
          title: Size
          type: integer
      required:
        - kind
        - id
        - content_type
        - size
        - content
      title: StoredDocumentEntry
      type: object
    StoredTextEntry:
      description: A stored object the classifier reads as text, with its UTF-8 content.
      properties:
        content:
          title: Content
          type: string
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        id:
          title: Id
          type: string
        kind:
          const: text
          title: Kind
          type: string
        size:
          title: Size
          type: integer
      required:
        - kind
        - id
        - content_type
        - size
        - content
      title: StoredTextEntry
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.