Skip to content

Instantly share code, notes, and snippets.

@garethpaul
Created May 8, 2025 04:02
Show Gist options
  • Save garethpaul/ee0bef35152b002fda2c8cdd531180aa to your computer and use it in GitHub Desktop.
Save garethpaul/ee0bef35152b002fda2c8cdd531180aa to your computer and use it in GitHub Desktop.
Poe OpenAI Spec
openapi: 3.0.0
info:
title: Poe Protocol API
version: 1.0.0
description: API specification for integrating Poe Protocol with OpenAI-compatible endpoints.
servers:
- url: https://your-bot-server.com
paths:
/poe:
post:
summary: Handle Poe Protocol requests
operationId: handlePoeRequest
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PoeRequest'
responses:
'200':
description: Successful response
content:
text/event-stream:
schema:
type: string
'400':
description: Bad request
'401':
description: Unauthorized
'501':
description: Not implemented
components:
schemas:
PoeRequest:
type: object
required:
- version
- type
properties:
version:
type: string
description: Protocol version (e.g., "1.0")
type:
type: string
enum: [query, settings, report_reaction, report_error]
description: Type of the request
query:
type: array
items:
$ref: '#/components/schemas/Message'
description: Array of messages in the conversation
message_id:
type: string
description: Identifier for the message to be created
user_id:
type: string
description: Identifier for the user
conversation_id:
type: string
description: Identifier for the conversation thread
metadata:
type: string
description: Internal metadata used by Poe
temperature:
type: number
format: float
description: Sampling temperature
skip_system_prompt:
type: boolean
description: Whether to skip system prompt adjustments
stop_sequences:
type: array
items:
type: string
description: Sequences where the model should stop generating further tokens
logit_bias:
type: object
additionalProperties:
type: number
description: Adjust the likelihood of specified tokens appearing in the completion
Message:
type: object
required:
- role
- content
- content_type
- timestamp
- message_id
properties:
role:
type: string
enum: [system, user, bot]
description: Role of the message sender
content:
type: string
description: Content of the message
content_type:
type: string
enum: [text/plain, text/markdown]
description: MIME type of the content
timestamp:
type: integer
description: Timestamp in microseconds since Unix epoch
message_id:
type: string
description: Unique identifier for the message
feedback:
type: array
items:
$ref: '#/components/schemas/Feedback'
description: Feedback provided for the message
attachments:
type: array
items:
$ref: '#/components/schemas/Attachment'
description: Attachments included with the message
metadata:
type: string
description: Arbitrary metadata set by the server bot
Feedback:
type: object
properties:
type:
type: string
enum: [like, dislike]
description: Type of feedback
reason:
type: string
description: Reason for the feedback
Attachment:
type: object
required:
- url
- content_type
- name
properties:
url:
type: string
format: uri
description: URL to the attachment
content_type:
type: string
description: MIME type of the attachment
name:
type: string
description: Name of the attachment
parsed_content:
type: string
description: Parsed content of the attachment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment