Proompty Prompts API
The Prompts API from Proompty — 3 operation(s) for prompts.
The Prompts API from Proompty — 3 operation(s) for prompts.
openapi: 3.0.0
info:
title: Proompty Chat Prompts API
version: 1.1.0
description: '
Proompty is an advanced Retrieval Augmented Generation (RAG) API designed
to empower users in seamlessly integrating their data and harnessing the
power of customized Large Language Model (LLM) prompts for interactive
communication. At its core, Proompty operates through a series of
interconnected functionalities that enable users to navigate and
manipulate their data effectively.'
termsOfService: https://proompty.com/terms-of-service
contact:
email: developers@proompty.com
servers:
- url: https://app.proompty.com/api
security:
- APIKey: []
tags:
- name: Prompts
paths:
/topics/{topicId}/prompts/{promptId}/chat:
post:
parameters:
- in: path
name: topicId
schema:
type: string
required: true
- in: path
name: promptId
schema:
type: string
required: true
tags:
- Prompts
description: 'Chat with a Prompt AI with a message or a binary stream using content-type: application/octet-stream (see Request body dropdown)
'
summary: 'Retrieves user information within the Proompty API system. By sending a GET request to this endpoint, users can obtain detailed data pertaining to their profile and associated claims. This includes essential user attributes such as email, full name, avatar URL, subscription plan, and role. Additionally, the response includes claims regarding the user''s subscription status, role type, and other pertinent details. In the event that the requested user is not found, a 404 error response is returned, indicating the absence of the specified user within the system.
'
requestBody:
required: true
content:
application/json:
schema:
properties:
message:
type: string
description: The message to send to the prompt AI.
example: What is your favorite color?
model:
type: string
description: The model to use for the response. Default is gpt4.
example: gpt3 | gpt4 | gpt4o
temperature:
type: string
description: The temperature to use for the response. Default is 0.15.
example: '0.15'
maxTokens:
type: string
description: The maximum number of tokens to generate for the response. Default is 500.
example: '500'
application/octet-stream:
schema:
type: string
format: binary
description: The binary stream to be uploaded.
responses:
'200':
description: Prompt
content:
application/json:
schema:
properties:
text:
type: string
description: The response from the prompt AIt.
example: My favorite color is blue.
model:
type: string
description: The model used to generate the response.
example: gpt4
sourceDocuments:
type: array
items:
type: object
properties:
metadata:
type: object
properties:
documentId:
type: string
filename:
type: string
topicId:
type: string
'404':
description: Prompt not found
'500':
description: Error getting prompt
/topics/{topicId}/prompts/{promptId}:
get:
parameters:
- in: path
name: topicId
schema:
type: string
required: true
- in: path
name: promptId
schema:
type: string
required: true
tags:
- Prompts
description: Retrieves a Prompt
summary: Retrieve details about a specific prompt within a designated topic in the Proompty API. By sending a GET request to this endpoint with the corresponding topicId and promptId parameters, users can access information such as the prompt's content, creation date, and any associated metadata. The API responds with the prompt object in JSON format, containing the relevant details. In case the requested prompt or topic is not found, appropriate error responses are returned (404 for prompt not found, 500 for other errors), ensuring users receive accurate feedback regarding the status of their request.
responses:
'200':
description: Prompt
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/Prompt'
'404':
description: Prompt not found
'500':
description: Error getting prompt
put:
parameters:
- in: path
name: topicId
schema:
type: string
required: true
- in: path
name: promptId
schema:
type: string
required: true
tags:
- Prompts
description: Update a Prompt
summary: Proompty Update a specific prompt within a designated topic. Users can send a PUT request to this endpoint with the corresponding topicId and promptId parameters, along with a JSON payload containing the updated prompt information. This enables users to modify aspects of the prompt such as its content, metadata, or any other relevant properties. Upon successful execution, the endpoint responds with the updated prompt object in JSON format, providing confirmation of the changes made. In case the specified prompt or topic is not found, the endpoint returns an appropriate error response (404 for prompt not found, 500 for other errors), ensuring transparent communication and accurate handling of requests.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Prompt'
responses:
'200':
description: Prompt
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/Prompt'
'404':
description: Prompt not found
'500':
description: Error getting prompt
delete:
parameters:
- in: path
name: topicId
schema:
type: string
required: true
- in: path
name: promptId
schema:
type: string
required: true
tags:
- Prompts
description: Deletes a Prompt
summary: Remove a specific prompt associated with a particular topic. To utilize this endpoint, users send a DELETE request with the relevant topicId and promptId parameters. Upon successful execution, the specified prompt is permanently deleted from the system. The API responds with a confirmation message indicating the successful deletion of the prompt. In the event that the requested prompt or topic is not found, appropriate error responses are returned (404 for prompt not found, 500 for other errors). This endpoint provides users with the capability to manage prompts effectively within their topics, ensuring streamlined content management within the Proompty platform.
responses:
'200':
description: Confirmation
content:
application/json:
schema:
properties:
message:
type: string
example: Prompt deleted
'404':
description: Prompt not found
'500':
description: Error getting prompt
/topics/{topicId}/prompts:
get:
parameters:
- in: path
name: topicId
schema:
type: string
required: true
tags:
- Prompts
description: Retrieve all prompts for a topic
summary: Retrieve a list of all prompts associated with a specific topic. Users can send a GET request to this endpoint with the relevant topicId parameter to access comprehensive information about each prompt within the specified topic. The API responds with an array of prompt objects in JSON format, containing details such as prompt content, creation dates, and any relevant metadata. This endpoint facilitates efficient management and retrieval of prompts within topics, allowing users to access and utilize prompts effectively in their interactions with the Proompty platform. In case the requested topic is not found, the endpoint returns an appropriate error response (404), ensuring clarity and accuracy in communication between users and the API.
responses:
'200':
description: Prompts
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Prompt'
'404':
description: Topic not found
'500':
description: Error getting prompts
post:
parameters:
- in: path
name: topicId
schema:
type: string
required: true
tags:
- Prompts
description: Create a prompt for a topic
summary: Create a new prompts within a specified topic. Users can send a POST request to this endpoint, including the topicId parameter in the URL path and a JSON payload containing the details of the prompt to be created. This payload typically includes the prompt content, along with any relevant metadata. Upon successful execution, the API responds with the newly created prompt object in JSON format, confirming its addition to the specified topic. If there are any issues with the request, such as invalid input data or the specified topic not being found, the endpoint returns an appropriate error response (400 for bad request, 404 for topic not found), ensuring users receive accurate feedback regarding the status of their request. This endpoint offers users a straightforward method for adding prompts to topics, facilitating the efficient management and organization of content within the Proompty platform.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Prompt'
responses:
'200':
description: Prompt
content:
application/json:
schema:
$ref: '#/components/schemas/Prompt'
'400':
description: Bad request
'404':
description: Topic not found
'500':
description: Error creating prompt
externalDocs:
url: /api.yaml
description: OpenAPI Specification