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

> Extracts text from images using OCR. Costs 1 credit per request.



## OpenAPI

````yaml api-reference/openapi.json post /ocr
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:
  /ocr:
    post:
      description: Extracts text from images using OCR. Costs 1 credit per request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OCRRequest'
      responses:
        '200':
          description: Successful OCR response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OCRResponse'
        '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:
    OCRRequest:
      type: object
      required:
        - imageUrl
      properties:
        imageUrl:
          type: string
          description: URL of the image to process (must include protocol)
    OCRResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            text:
              type: object
              properties:
                description:
                  type: string
                  description: Overall description of the image content
                sentences:
                  type: array
                  items:
                    type: object
                    properties:
                      text:
                        type: string
                        description: Extracted text
                      startIndex:
                        type: integer
                        description: Starting position of the text
                      endIndex:
                        type: integer
                        description: Ending position of the text
            usage:
              type: integer
              description: Number of credits consumed
            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

````