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

# Extract Facts

> Extract facts from provided text, without storing them.



## OpenAPI

````yaml /api-reference/auto-generated-openapi.yml post /tools/extract-facts
openapi: 3.0.0
info:
  title: Corti API
  version: 2.0.0
servers:
  - url: https://api.{environment}.corti.app/v2/
    variables:
      environment:
        default: eu
        enum:
          - us
          - eu
security:
  - AuthorizationHeader:
      - bearer
tags:
  - name: Interactions
  - name: Facts
  - name: Documents
  - name: Codes
  - name: Recordings
  - name: Transcripts
  - name: Languages
paths:
  /tools/extract-facts:
    post:
      tags:
        - Facts
      summary: Extract Facts
      description: Extract facts from provided text, without storing them.
      operationId: facts_extract
      parameters:
        - $ref: '#/components/parameters/Tenant-Name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FactsExtractRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactsExtractResponse'
          description: Returns the extracted facts.
        '504':
          description: RFC9457
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: csharp
          label: C# .NET SDK
          source: |
            using Corti;

            var client = new CortiClient(
                "TENANT_NAME",
                CortiClientEnvironment.Eu,
                new CortiClientAuth.ClientCredentials("client_id", "client_secret")
            );
            await client.Facts.ExtractAsync(
                new FactsExtractRequest
                {
                    Context = new List<CommonTextContext>()
                    {
                        new CommonTextContext { Type = CommonTextContextType.Text, Text = "text" },
                    },
                    OutputLanguage = "outputLanguage",
                }
            );
        - lang: javascript
          label: JavaScript SDK
          source: |
            import { CortiClient, CortiEnvironment } from "@corti/sdk";

            const client = new CortiClient({
                environment: CortiEnvironment.Eu,
                auth: {
                    clientId: "YOUR_CLIENT_ID",
                    clientSecret: "YOUR_CLIENT_SECRET"
                },
                tenantName: "YOUR_TENANT_NAME"
            });
            await client.facts.extract({
                context: [{
                        type: "text",
                        text: "text"
                    }],
                outputLanguage: "outputLanguage"
            });
components:
  parameters:
    Tenant-Name:
      name: Tenant-Name
      in: header
      description: >-
        Identifies a distinct entity within Corti's multi-tenant system. Ensures
        correct routing and authentication of the request.
      required: true
      example: base
      schema:
        type: string
        description: >-
          Identifies a distinct entity within Corti's multi-tenant system.
          Ensures correct routing and authentication of the request.
        example: base
  schemas:
    FactsExtractRequest:
      properties:
        context:
          items:
            $ref: '#/components/schemas/CommonTextContext'
          type: array
        outputLanguage:
          description: >-
            The desired output language code for extracted facts. Check
            [languages page](/stt/languages) for more.
          type: string
      type: object
      required:
        - context
        - outputLanguage
    FactsExtractResponse:
      properties:
        facts:
          description: List of extracted facts based on the provided input context.
          type: array
          items:
            required:
              - group
              - value
              - text
            properties:
              group:
                description: The fact group key the fact belongs to.
                type: string
              value:
                description: (deprecated) An individual, atomic fact.
                type: string
              text:
                description: An individual, atomic fact.
                type: string
            type: object
        outputLanguage:
          description: The language locale of the output.
          type: string
        usageInfo:
          $ref: '#/components/schemas/CommonUsageInfo'
      type: object
      required:
        - facts
        - outputLanguage
        - usageInfo
    ErrorResponse:
      type: object
      required:
        - requestid
        - status
        - type
        - detail
      properties:
        requestid:
          type: string
        status:
          type: integer
        type:
          type: string
        detail:
          type: string
        validationErrors:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
    CommonTextContext:
      type: object
      title: Text
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
          description: |
            The type of context, always "text" in this context.
        text:
          type: string
          description: |
            A text string to be used as input to the model.
    CommonUsageInfo:
      type: object
      description: Credits consumed for this request.
      required:
        - creditsConsumed
      properties:
        creditsConsumed:
          type: number
  securitySchemes:
    AuthorizationHeader:
      type: http
      description: Input your token
      scheme: bearer

````