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

# Create Oracle Job

> Create a new Oracle research job.

Returns immediately with job_id and session_id.
Use /oracle/jobs/{job_id}/stream to receive real-time updates.

Features:
- Per-user concurrency limit: max 3 concurrent Oracle jobs
- Job queuing: additional jobs wait in queue
- 30-minute timeout per job



## OpenAPI

````yaml /openapi-docs.yaml post /oracle/jobs
openapi: 3.1.0
info:
  title: Nia AI API
  version: 1.1.0
  description: >-
    Nia AI API provides a single, consistent `sources` resource for all indexed
    content.


    ## Core Resources


    **Sources** (`/sources`)

    - `repository`

    - `documentation`

    - `research_paper`

    - `huggingface_dataset`

    - `local_folder`


    **Search** (`/search`)

    - `mode`: query | web | deep | universal


    Legacy endpoints are deprecated and will be removed in a future version.
    Prefer `/sources` and `/search` for new integrations.
servers:
  - url: https://apigcp.trynia.ai/v2
    description: Production API
  - url: http://localhost:8000/v2
    description: Local development
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
    description: API-first signup, login, and API key bootstrapping
  - name: Sources
    description: >-
      Unified source management (repositories, documentation, papers, datasets,
      local folders)
  - name: Search
    description: Unified search endpoint with mode discriminator
  - name: Context Sharing
    description: Cross-agent context management and retrieval
  - name: Categories
    description: Category management for organizing indexed sources
  - name: GitHub Search
    description: Live GitHub search and repository exploration
  - name: Advisor
    description: Context-aware code advisor against indexed documentation
  - name: Dependencies
    description: Dependency analysis and documentation subscription
  - name: Usage
    description: Usage tracking and bulk operations
paths:
  /oracle/jobs:
    post:
      tags:
        - Usage
      summary: Create Oracle Job
      description: |-
        Create a new Oracle research job.

        Returns immediately with job_id and session_id.
        Use /oracle/jobs/{job_id}/stream to receive real-time updates.

        Features:
        - Per-user concurrency limit: max 3 concurrent Oracle jobs
        - Job queuing: additional jobs wait in queue
        - 30-minute timeout per job
      operationId: create_oracle_job_v2_oracle_jobs_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OracleResearchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OracleResearchRequest:
      properties:
        query:
          type: string
          title: Query
          description: Research question to investigate
        repositories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Repositories
          description: Optional list of repository identifiers
        data_sources:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Data Sources
          description: Optional list of documentation source identifiers
        output_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Format
          description: Optional output format specification
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: >-
            Model to use: claude-opus-4-7, claude-sonnet-4-5-20250929, or
            claude-sonnet-4-5-1m
      type: object
      required:
        - query
      title: OracleResearchRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key must be provided in the Authorization header

````