Interact with the GPT API and review the OpenAPI schema directly in this interface.
openapi: 3.0.3
info:
title: GPT Actions API
description: API for interacting with GPT functionalities programmatically.
version: 1.0.0
servers:
- url: https://api.yourdomain.com
description: Production server
- url: https://sandbox.yourdomain.com
description: Sandbox server
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
schemas:
ConversationRequest:
type: object
required:
- userId
- message
properties:
userId:
type: string
description: The unique identifier of the user.
message:
type: string
description: The input message from the user.
ConversationResponse:
type: object
properties:
conversationId:
type: string
description: Unique ID for the conversation.
reply:
type: string
description: GPT's response to the user's message.
ActionRequest:
type: object
required:
- action
- parameters
properties:
action:
type: string
description: The GPT action to trigger (e.g., "summarize", "generateCode").
parameters:
type: object
additionalProperties: true
description: Parameters for the specified action.
ActionResponse:
type: object
properties:
success:
type: boolean
result:
type: string
description: The output of the triggered GPT action.
paths:
/api/v1/gpt/conversations:
post:
summary: Start a new GPT conversation.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConversationRequest'
responses:
'200':
description: Successful response with GPT's reply.
content:
application/json:
schema:
$ref: '#/components/schemas/ConversationResponse'
'400':
description: Invalid input.
/api/v1/gpt/respond:
post:
summary: Process a user input and return GPT's response.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConversationRequest'
responses:
'200':
description: GPT's response to the input.
content:
application/json:
schema:
$ref: '#/components/schemas/ConversationResponse'
'400':
description: Invalid input.
/api/v1/gpt/status:
get:
summary: Retrieve server or service status.
responses:
'200':
description: Server status information.
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Server status (e.g., "online", "offline").
uptime:
type: string
description: Duration the server has been online.
/api/v1/gpt/logs:
get:
summary: Fetch interaction logs.
responses:
'200':
description: List of interaction logs.
content:
application/json:
schema:
type: array
items:
type: object
properties:
timestamp:
type: string
userId:
type: string
message:
type: string
reply:
type: string
/api/v1/gpt/actions:
post:
summary: Trigger a specific GPT action.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ActionRequest'
responses:
'200':
description: Result of the GPT action.
content:
application/json:
schema:
$ref: '#/components/schemas/ActionResponse'
'400':
description: Invalid action or parameters.
security:
- ApiKeyAuth: []