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

# Post summarize

> Summarizes text content or documents. Costs 2 credits per 10,000 tokens.



## OpenAPI

````yaml api-reference/openapi.json post /summarize
openapi: 3.0.1
info:
  title: Norns AI API
  description: API documentation for Norns AI services
  version: 1.0.0
servers:
  - url: https://www.norns.ai/api/v0
    description: Production server
security:
  - bearerAuth: []
paths:
  /summarize:
    post:
      description: Summarizes text content or documents. Costs 2 credits per 10,000 tokens.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SummarizeRequest'
      responses:
        '200':
          description: Successful summarization response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummarizeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SummarizeRequest:
      type: object
      properties:
        content:
          type: string
          description: Text content to summarize
        file:
          type: string
          format: binary
          description: File to summarize (PDF, DOCX, or TXT, max 10MB)
        targetLanguage:
          type: string
          description: Target language for the summary translation
        maxLength:
          type: integer
          description: Maximum length of the summary in characters
      oneOf:
        - required:
            - content
        - required:
            - file
    SummarizeResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            summary:
              type: string
              description: Generated summary text
            sentences:
              type: array
              items:
                type: object
                properties:
                  text:
                    type: string
                    description: Individual sentence from the summary
                  startIndex:
                    type: number
                    description: Starting position of the sentence
                  endIndex:
                    type: number
                    description: Ending position of the sentence
            usage:
              type: integer
              description: Number of credits consumed
            originalLanguage:
              type: string
              description: Detected language of the original text
            targetLanguage:
              type: string
              description: Language of the summary
            tokenCount:
              type: integer
              description: Number of tokens processed
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication

````