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

# Retrieve file metadata

> GET /v1/files/{fileId} — fetch metadata for a single file.

```bash theme={null}
curl https://api.infery.ai/v1/files/file_abc123... \
  -H "Authorization: Bearer $INFERY_API_KEY"
```

Returns metadata only (id, size, filename, purpose, timestamps). For bytes use [GET /v1/files/{fileId}/content](/api-reference/files/content).

**Workspace-scoped**: cross-workspace lookup returns 404 (we don't leak existence).


## OpenAPI

````yaml openapi.json GET /v1/files/{fileId}
openapi: 3.0.0
info:
  title: Infery Gateway
  description: >-
    Infery Inference Gateway — OpenAI-compatible API for LLMs, embeddings,
    images, audio, and video
  version: '1.0'
  contact: {}
servers:
  - url: https://api.infery.ai
    description: Production
  - url: http://localhost:3001
    description: Local
security: []
tags: []
paths:
  /v1/files/{fileId}:
    get:
      tags:
        - Files
      summary: Retrieve file metadata
      operationId: retrieveFile
      parameters:
        - name: fileId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: File metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: file_1hR9xTPZqK4mVLc2nJ7fY5wB
                  object:
                    type: string
                    example: file
                  bytes:
                    type: integer
                    example: 245192
                  created_at:
                    type: integer
                    example: 1713204900
                  filename:
                    type: string
                    example: report.pdf
                  purpose:
                    type: string
                    enum:
                      - assistants
                      - vision
                      - user_data
                      - batch
                    example: assistants
                  status:
                    type: string
                    example: processed
        '401':
          description: Unauthorized — invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '404':
          description: File not found (or not in this workspace)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - ApiKey: []
components:
  schemas:
    ErrorResponseDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetailDto'
      required:
        - error
    ErrorDetailDto:
      type: object
      properties:
        message:
          type: string
          example: Model not found
          description: Human-readable error message
        type:
          type: string
          example: invalid_request_error
          description: Error category
          enum:
            - invalid_request_error
            - authentication_error
            - permission_error
            - quota_exceeded
            - rate_limit_error
            - server_error
        code:
          type: object
          example: model_not_found
          nullable: true
          description: Stable machine-readable error code
        param:
          type: object
          example: model
          nullable: true
          description: >-
            Name of the request parameter that triggered the error, if
            applicable
      required:
        - message
        - type
        - code
        - param
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key in format: Bearer inf_***'

````