> ## 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.

# Signup

> Create a new account and receive a read-only API key.

A 6-digit verification code is sent to the provided email. Call
POST /v2/auth/verify with the code (and this key in the Authorization
header) to upgrade to full access.



## OpenAPI

````yaml /openapi-docs.yaml post /auth/signup
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:
  /auth/signup:
    post:
      tags:
        - Auth
      summary: Signup
      description: |-
        Create a new account and receive a read-only API key.

        A 6-digit verification code is sent to the provided email. Call
        POST /v2/auth/verify with the code (and this key in the Authorization
        header) to upgrade to full access.
      operationId: signup_v2_auth_signup_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignupRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignupResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SignupRequest:
      properties:
        email:
          type: string
          title: Email
          description: User email address
        password:
          anyOf:
            - type: string
              minLength: 8
            - type: 'null'
          title: Password
          description: Optional password for web login (random if omitted)
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        organization_name:
          type: string
          minLength: 1
          title: Organization Name
          description: Organization name (required — all API keys are org-scoped)
        idempotency_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Idempotency Key
          description: Idempotency key for safe retries
      type: object
      required:
        - email
        - organization_name
      title: SignupRequest
    SignupResponse:
      properties:
        api_key:
          type: string
          title: Api Key
          description: >-
            Read-only API key — verify via POST /v2/auth/verify to unlock full
            access
        api_key_id:
          type: string
          title: Api Key Id
        user_id:
          type: string
          title: User Id
        organization_id:
          type: string
          title: Organization Id
        verified:
          type: boolean
          title: Verified
          description: Whether the account has been verified (always false on signup)
          default: false
      type: object
      required:
        - api_key
        - api_key_id
        - user_id
        - organization_id
      title: SignupResponse
    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

````