GitHub Octocat API

The GitHub Octocat API is a playful, non-functional endpoint in GitHubs REST API that returns an ASCII-art rendering of the Octocat mascot as plain text. Its primarily meant for fun and demospeople often use it to sanity-check connectivity, see how the API formats responses and headers, or showcase simple requests without touching real repository data. It doesnt manage or expose any GitHub resources, and in some clients you can even supply a short message that the Octocat says.

OpenAPI Specification

github-octocat-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: GitHub Octocat API
  description: 'Offers a basic endpoint to fetch the Octocat as ASCII art and provides a default Octocat image URL. '
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Octocat
paths:
  /octocat:
    get:
      summary: GitHub Get Octocat
      description: The GitHub Octocat API endpoint allows users to retrieve an ASCII art representation of GitHub's mascot, Octocat, by sending a GET request to the /octocat path. This simple API operation returns the iconic Octocat image in text format, which can be customized with an optional query parameter to display different speech bubble messages. It's primarily used for fun, testing purposes, or as an Easter egg in applications, demonstrating GitHub's playful side while providing developers with a lighthearted way to verify API connectivity.
      tags:
      - Octocat
      operationId: getOctocat
      parameters:
      - name: s
        in: query
        description: The words to show in Octocat's speech bubble
        schema:
          type: string
        required: false
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/octocat-stream:
              schema:
                type: string
              examples:
                default:
                  $ref: '#/components/examples/octocat'
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/meta/meta#get-octocat
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: meta
        subcategory: meta
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  examples:
    octocat:
      value: "               MMM.           .MMM\n               MMMMMMMMMMMMMMMMMMM\n               MMMMMMMMMMMMMMMMMMM      ___________________________________\n              MMMMMMMMMMMMMMMMMMMMM    |                                   |\n             MMMMMMMMMMMMMMMMMMMMMMM   | Avoid administrative distraction. |\n            MMMMMMMMMMMMMMMMMMMMMMMM   |_   _______________________________|\n            MMMM::- -:::::::- -::MMMM    |/\n             MM~:~ 00~:::::~ 00~:~MM\n        .. MMMMM::.00:::+:::.00::MMMMM ..\n              .MM::::: ._. :::::MM.\n                 MMMM;:::::;MMMM\n          -MM        MMMMMMM\n          ^  M+     MMMMMMMMM\n              MMMMMMM MM MM MM\n                   MM MM MM MM\n                   MM MM MM MM\n                .~~MM~MM~MM~MM~~.\n             ~~~~MM:~MM~~~MM~:MM~~~~\n            ~~~~~~==~==~~~==~==~~~~~~\n             ~~~~~~==~==~==~==~~~~~~\n                 :~==~==~==~==~~  \n"
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/