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

# Ask a question about the project's connected source repositories

> Forwards the question to the code analyzer, which clones all
repositories connected to this project, investigates them, and returns a
user-facing answer (logic, behavior, click paths). The analyzer's system prompt enforces that no code,
identifiers or secrets are included in answers. With no repositories connected the endpoint returns 200
with a canned no-repositories answer; it fails with 409 when the AI usage limit is reached.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /code/ask
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /code/ask:
    post:
      tags:
        - Code
      summary: Ask a question about the project's connected source repositories
      description: >-
        Forwards the question to the code analyzer, which clones all

        repositories connected to this project, investigates them, and returns a

        user-facing answer (logic, behavior, click paths). The analyzer's system
        prompt enforces that no code,

        identifiers or secrets are included in answers. With no repositories
        connected the endpoint returns 200

        with a canned no-repositories answer; it fails with 409 when the AI
        usage limit is reached.
      operationId: AskCode
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodeKnowledgeAskDto'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  answer:
                    type: string
                required:
                  - answer
                type: object
      security:
        - jwt: []
components:
  schemas:
    CodeKnowledgeAskDto:
      properties:
        question:
          type: string
      required:
        - question
      type: object
      additionalProperties: false
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````