openapi: 3.0.0
info:
  title: JSON GPT API
  description: This API provides JSON responses based on the provided text prompts.
  version: 1.0.0
servers:
  - url: https://api.jsongpt.com
paths:
  /json:
    get:
      summary: Get JSON response based on text prompt
      description: Provide a text prompt to receive a JSON response.
      parameters:
        - in: query
          name: prompt
          required: true
          schema:
            type: string
          description: The text prompt to generate a JSON response.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                description: The JSON response generated from the prompt.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message describing what went wrong.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message indicating server-side failure.