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

# Ingest Sources

> Upload raw content sources for ingestion into the knowledge graph.
Each source is a discrete content payload (text, markdown.)
that will be processed by the extraction pipeline.



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json post /api/v1/sources
openapi: 3.1.0
info:
  title: Crosmos Memory API
  description: Agent memory system with hybrid retrieval
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/sources:
    post:
      tags:
        - sources
      summary: Ingest Sources
      description: |-
        Upload raw content sources for ingestion into the knowledge graph.
        Each source is a discrete content payload (text, markdown.)
        that will be processed by the extraction pipeline.
      operationId: ingest_sources_api_v1_sources_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestSourcesRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestAcceptedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    IngestSourcesRequest:
      properties:
        space_id:
          type: string
          format: uuid
          title: Space Id
          description: Memory space to ingest into
        sources:
          items:
            $ref: '#/components/schemas/SourcePayload'
          type: array
          maxItems: 100
          minItems: 1
          title: Sources
          description: Array of source payloads to ingest
      type: object
      required:
        - space_id
        - sources
      title: IngestSourcesRequest
    IngestAcceptedResponse:
      properties:
        job_id:
          type: string
          format: uuid
          title: Job Id
        status:
          type: string
          title: Status
          default: pending
        source_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Source Ids
      type: object
      required:
        - job_id
        - source_ids
      title: IngestAcceptedResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SourcePayload:
      properties:
        content:
          type: string
          maxLength: 100000
          minLength: 1
          title: Content
          description: Raw content to ingest
        content_type:
          type: string
          title: Content Type
          description: >-
            Content MIME type: text, markdown, html, json, pdf, image, audio,
            video
          default: text
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
          description: Optional speaker role (e.g. 'user', 'assistant')
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
          description: Optional metadata stored with the source
      type: object
      required:
        - content
      title: SourcePayload
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: JWT access token or API key (csk_…)
      scheme: bearer

````