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

# Get template HTML

> Returns the raw HTML content of the template.



## OpenAPI

````yaml https://api.pdfshift.io/openapi.json get /templates/{slug}.html
openapi: 3.0.3
info:
  title: PDFShift API Documentation
  version: '3.0'
  description: >-
    This is the documentation for the PDFShift API.


    Our aim here is to provide you with a clear, concise and complete set of
    tool to generate the PDF you want.


    Don't forget to add the `sandbox` parameter to `True` while testing the API,
    this won't use your credits and generate free PDF (with a watermark).

    But if you forgot to set it, don't worry ; Send us a message and we'll reset
    your credits usage.
  termsOfService: https://pdfshift.io/terms
  contact:
    name: PDFShift
    url: https://pdfshift.io
    email: support@pdfshift.io
  x-logo:
    url: https://pdfshift.io/images/favicons/android-chrome-512x512.png
servers:
  - url: https://api.pdfshift.io/v3
    description: ''
    x-last-modified: 1764750693905
security:
  - apiKeyHeader: []
externalDocs:
  description: You can access our documentation online by visiting https://docs.pdfshift.io
  url: https://docs.pdfshift.io
paths:
  /templates/{slug}.html:
    get:
      tags:
        - templates
      summary: Get template HTML
      description: Returns the raw HTML content of the template.
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: HTML content
          headers:
            X-RateLimit-Remaining:
              description: >-
                The number of requests remaining in the current rate limit
                window.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                The maximum number of requests allowed in the current rate limit
                window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                The time at which the current rate limit window resets (Unix
                timestamp).
              schema:
                type: integer
                format: int64
          content:
            text/html:
              schema:
                type: string
              example: <html>...</html>
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '401':
          description: Unauthorized. Invalid auth key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Template not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests. You have been rate limited.
          headers:
            X-RateLimit-Remaining:
              description: >-
                The number of requests remaining in the current rate limit
                window.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                The maximum number of requests allowed in the current rate limit
                window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                The time at which the current rate limit window resets (Unix
                timestamp).
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Errors:
      type: object
      properties:
        success:
          type: boolean
        errors:
          type: object
        code:
          type: integer
          format: int32
    Error:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: integer
          format: int32
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      description: >-
        Authenticate your account by including your secret key in API requests.

        You can manage your API keys in the
        [Dashboard](https://app.pdfshift.io/dashboard/).


        Authentication to the API is performed by using the HTTP Header
        X-API-Key.
      name: X-API-Key
      in: header
      x-last-modified: 1764750344730

````