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

# Check grammar

> Check text for grammar and spelling issues with suggested corrections. Responses are not cached due to the unique nature of each text submission.



## OpenAPI

````yaml https://api.surnex.io/openapi.json post /v1/content/grammar
openapi: 3.1.0
info:
  title: Surnex API
  description: |-
    Surnex SEO Platform API — api.surnex.io

    Provides the complete backend for the Surnex SEO dashboard including:
    - Multi-tenant organization management
    - Project tracking (domains)
    - Keyword rank tracking (Phase 1+)
    - Backlink analysis (Phase 3+)
    - Site auditing (Phase 4+)
    - Stripe billing integration
    - MCP endpoint for AI agents at /mcp
  version: 0.1.0
servers: []
security: []
paths:
  /v1/content/grammar:
    post:
      tags:
        - Content Generation
      summary: Check grammar
      description: >-
        Check text for grammar and spelling issues with suggested corrections.
        Responses are not cached due to the unique nature of each text
        submission.
      operationId: check_grammar_v1_content_grammar_post
      parameters:
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrammarCheckRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponse_GrammarCheckResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    GrammarCheckRequest:
      properties:
        text:
          type: string
          maxLength: 10000
          minLength: 1
          title: Text
          description: Text to check for grammar issues.
        language_code:
          type: string
          maxLength: 10
          title: Language Code
          default: en
      type: object
      required:
        - text
      title: GrammarCheckRequest
      description: Request for grammar checking.
    APIResponse_GrammarCheckResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - $ref: '#/components/schemas/GrammarCheckResponse'
            - type: 'null'
      type: object
      title: APIResponse[GrammarCheckResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GrammarCheckResponse:
      properties:
        issues:
          items:
            $ref: '#/components/schemas/GrammarIssue'
          type: array
          title: Issues
        total_issues:
          type: integer
          title: Total Issues
      type: object
      required:
        - issues
        - total_issues
      title: GrammarCheckResponse
      description: Response from grammar checking.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    GrammarIssue:
      properties:
        message:
          type: string
          title: Message
          description: Description of the issue.
        offset:
          type: integer
          title: Offset
          description: Character offset of the issue.
        length:
          type: integer
          title: Length
          description: Length of the problematic text.
        suggestions:
          items:
            type: string
          type: array
          title: Suggestions
          description: Suggested corrections.
        severity:
          anyOf:
            - type: string
            - type: 'null'
          title: Severity
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        rule:
          anyOf:
            - type: string
            - type: 'null'
          title: Rule
      type: object
      required:
        - message
        - offset
        - length
      title: GrammarIssue
      description: A single grammar issue found.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````