Pryon Generative API
The Generative API from Pryon — 6 operation(s) for generative.
The Generative API from Pryon — 6 operation(s) for generative.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/pryon-generative-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Pryon Generative API
version: '1.0'
description: 'Operations tagged Generative across 12 of this provider''s published API definitions: pryon-chat-completion-only-generative-openapi.json, pryon-chat-completion-openapi.json, pryon-extra-chat-completion-openapi.json, pryon-feedback-may2025-openapi.json, pryon-gen-answer-summary-openapi.json, pryon-generative-api-openapi.yml, pryon-generative-listmodels-openapi.json, pryon-generative-openapi.json, pryon-generative-query-guardrails-openapi.json, pryon-generative-query-rewrite-openapi.json, pryon-generative-services-may2025-openapi.json, pryon-generative-swagger-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: '{pryon_base_url}'
- url: /
tags:
- name: Generative
paths:
/api/generative/v1alpha1/chat/completions:
post:
summary: Chat Completions
description: Generates a model response from the messages in a conversation.
operationId: Generative_CreateChatCompletions
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionsRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionsResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
description: Default error response
tags:
- Generative
parameters:
- name: Authorization
in: header
required: true
schema:
type: string
example: 'Authorization: Bearer {base64-encoded-token}'
- name: x-pryon-org-id
in: header
required: false
schema:
type: string
description: Organization ID; only required for organizations with multiple tenants.
example: pryoninc.com
servers:
- url: '{pryon_base_url}'
/api/generative/v1alpha1/chat/completions/models:
get:
description: Lists the models available for our Chat Completions API
operationId: Generative_ListChatCompletionsModels
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListChatCompletionsModelsRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListChatCompletionsModelsResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
description: Default error response
tags:
- Generative
parameters:
- name: Authorization
in: header
required: true
schema:
type: string
example: 'Authorization: Bearer {base64-encoded-token}'
- name: x-pryon-org-id
in: header
required: false
schema:
type: string
description: Organization ID; only required for organizations with multiple tenants.
example: pryoninc.com
servers:
- url: '{pryon_base_url}'
/api/generative/v1alpha1/tasks/complete-query:
post:
description: "Generates a completed query by replacing references to entities / information\n in prior turns of the conversation."
operationId: Generative_CompleteQuery
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CompleteQueryRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CompleteQueryResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
description: Default error response
tags:
- Generative
parameters:
- name: Authorization
in: header
required: true
schema:
type: string
example: 'Authorization: Bearer {base64-encoded-token}'
- name: x-pryon-org-id
in: header
required: false
schema:
type: string
description: Organization ID; only required for organizations with multiple tenants.
example: pryoninc.com
servers:
- url: '{pryon_base_url}'
/api/generative/v1alpha1/tasks/guardrail-query:
post:
description: Return query toxicity and prompt injection classifications given a query
operationId: Generative_GuardrailQuery
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/QueryGuardrailsRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/QueryGuardrailsResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
description: Default error response
tags:
- Generative
parameters:
- name: Authorization
in: header
required: true
schema:
type: string
example: 'Authorization: Bearer {base64-encoded-token}'
- name: x-pryon-org-id
in: header
required: false
schema:
type: string
description: Organization ID; only required for organizations with multiple tenants.
example: pryoninc.com
servers:
- url: '{pryon_base_url}'
/api/generative/v1alpha1/tasks/route-query:
post:
description: Return query out-of-domain classifications given a query
operationId: Generative_RouteQuery
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RouteQueryRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RouteQueryResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
description: Default error response
tags:
- Generative
parameters:
- name: Authorization
in: header
required: true
schema:
type: string
example: 'Authorization: Bearer {base64-encoded-token}'
- name: x-pryon-org-id
in: header
required: false
schema:
type: string
description: Organization ID; only required for organizations with multiple tenants.
example: pryoninc.com
servers:
- url: '{pryon_base_url}'
/api/generative/v1alpha1/tasks/summarize-answer:
post:
description: Generates a summarized answer given retrieval outputs and configs
operationId: Generative_AnswerSummarization
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AnswerSummarizationRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AnswerSummarizationResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
description: Default error response
tags:
- Generative
parameters:
- name: Authorization
in: header
required: true
schema:
type: string
example: 'Authorization: Bearer {base64-encoded-token}'
- name: x-pryon-org-id
in: header
required: false
schema:
type: string
description: Organization ID; only required for organizations with multiple tenants.
example: pryoninc.com
servers:
- url: '{pryon_base_url}'
components:
schemas:
QueryGuardrailsRequest:
properties:
query:
description: Query to check against guardrails models.
type: string
type: object
ExchangeOutput:
properties:
output_id:
description: UUID generated by the entity creating the output resource.
type: string
text:
description: The answer snippet or reply displayed to the end-user.
type: string
summary_text:
description: The exchange reply that is intended to be translated to speech and played as audio for the end-user. This is generally a shorter form equivalent to "text" that works better as a spoken reply. If there is no shorter form summarization available, this will be empty, and "text" will be synthesized into speech.
type: string
audio:
allOf:
- $ref: '#/components/schemas/ExchangeAudioOutput'
description: The optional audio data containing the conversation response to the request query.
attachments:
additionalProperties:
$ref: '#/components/schemas/Attachment'
description: The additional information containing the conversation response to the request query, keyed by a UUIDv4 string.
type: object
subject_ids:
description: The subjects known to be associated with this output.
items:
type: string
type: array
context:
allOf:
- $ref: '#/components/schemas/Context'
description: Additional context for this output.
data_source_metadata:
additionalProperties:
$ref: '#/components/schemas/MetadataTypeValue'
description: DEPRECATED - to be replaced by system_data_source_metadata
type: object
system_data_source_metadata:
additionalProperties:
$ref: '#/components/schemas/MetadataTypeValue'
type: object
user_selected_data_source_metadata:
additionalProperties:
$ref: '#/components/schemas/MetadataTypeValue'
description: "The user-selected data source metadata associated with this content.\n The key is the user-selected data source metadata category, db_field_name."
type: object
user_defined_metadata:
additionalProperties:
$ref: '#/components/schemas/MetadataTypeValue'
description: "The user-defined metadata associated with this content.\n The key is the user-defined metadata category, db_field_name."
type: object
type: object
Status:
description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
properties:
code:
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
format: int32
type: integer
message:
description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
type: string
details:
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
items:
$ref: '#/components/schemas/GoogleProtobufAny'
type: array
type: object
FunctionDefinition:
description: Function definition matching OpenAI's FunctionDefinition
properties:
name:
description: The name of the function to be called; must be a-z, A-Z, 0-9, or contain underscores and dashes; maximum is 64 chars.
type: string
description:
description: Description of the operability of the function.
type: string
parameters:
description: 'JSON Schema as a string; corresponds to FunctionParameters: Dict[str, object].'
type: object
strict:
description: Whether to enable strict schema adherence.
type: boolean
type: object
Choice:
description: Individual completion choice.
properties:
index:
description: Index of the choice
format: int32
type: integer
message:
allOf:
- $ref: '#/components/schemas/Message'
description: "The message containing the completion.\n Present only if stream=false in request."
delta:
allOf:
- $ref: '#/components/schemas/Delta'
description: "The delta for a streaming chunk.\n Present only if stream=true in request."
logprobs:
description: Log probability information for the choice.
items:
$ref: '#/components/schemas/LogProbs'
type: array
finish_reason:
description: Reason why the completion finished.
type: string
type: object
LogProbToken:
properties:
token:
description: Credential used to verify user identity.
type: string
logprob:
description: The log probability of this token, if it is within the top 20 most likely tokens; if not within top 20, the value -9999.0 is used to signify that the token is very unlikely.
format: float
type: number
bytes:
description: A list of integers representing the UTF-8 bytes representation of the token; useful in instances where characters are represented by multiple tokens and their byte representations; must be combined to generate the correct text representation; can be null if there is no bytes representation for the token.
items:
format: int32
type: integer
type: array
type: object
ChatCompletionsRequest:
properties:
messages:
description: List of messages that form the conversation.
items:
$ref: '#/components/schemas/Message'
type: array
model:
description: ID of the model to use, in provider/model_id format; for a list of valid entries, see the [List Models API](https://docs.pryon.com/reference/generative_listchatcompletionsmodels-1#/) or reference the [List models for chat completion recipe](https://docs.pryon.com/recipes/list-models-for-chat-completion#/).
type: string
temperature:
type: number
format: float
description: Sampling temperature; the range depends on the product and model being called; higher values, for example, 0.8, make the output more random, while lower values, for example, 0.2, make the output more focused and deterministic; it is recommended that you adjust this value or top_p, but not both.
top_p:
type: number
format: float
description: Alternative to sampling with temperature, that is, nucleus sampling; the model considers the results of the tokens with top_p probability mass, for example, 0.1 means tokens comprising the top 10% probability mass are considered.
stream:
type: boolean
description: If set to True, the model response data is generated using server-sent events and streamed to the client.
stop:
type: array
items:
type: string
description: Stop sequence signals for the API generation.
max_completion_tokens:
type: integer
format: int32
description: Maximum number of tokens generated in the chat completion; can be used to control costs for text generated via API.
logprobs:
type: boolean
description: True returns the log probabilities of each output token present in the content of message; False does not return probabilities.
top_logprobs:
description: "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability.\n logprobs must be set to true if this parameter is used."
format: int32
type: integer
tools:
description: List of tools (functions) available to the model.
items:
$ref: '#/components/schemas/Tool'
type: array
tool_choice:
allOf:
- $ref: '#/components/schemas/GoogleProtobufValue'
description: Tool used by the model to call the functions; valid values are auto (default; model decides whether to call a function and which one to use), none (model will not call any function) and required (forces the model to call at least one of the provided functions).
response_format:
allOf:
- $ref: '#/components/schemas/ResponseFormat'
description: Format that the model must output; currently only JSON schema is supported.
type: object
Tool:
description: Tool definition for function calling.
properties:
type:
description: The type of tool; currently only Function is supported.
type: string
function:
allOf:
- $ref: '#/components/schemas/FunctionDefinition'
description: Function definition.
type: object
DeltaToolCall:
description: Tool call in assistant messages; for streamed responses.
properties:
index:
description: Index of this tool call.
format: uint32
type: integer
id:
description: Unique identifier for this tool call.
type: string
type:
description: Will be Function.
type: string
function:
allOf:
- $ref: '#/components/schemas/FunctionCall'
description: The function or tool to use.
type: object
Attachment:
properties:
content_type:
description: "The content type of the additional information. Format of each type field is application/vnd.pryon.**{content_type}**. Commonly occurring types are:\n - **text** - The answer snippet or the text corresponding to detected short spans within the answer_in_context. Best_n will be the same string as the ‘text’ field and represents the ranking of the sentence within the AIC/chunk.\n - **answer_in_context** - Chunk of text identified as most relevant to the input query. The smaller text answer/reply is extracted from this larger text.\n - **answer_type** - Answer type or classification. Answer types include:\n - **TEXT_EXCERPT**: Default.\n - **FAQ**: An answer derived from the frequently asked questions.\n - **OUT_OF_DOMAIN**: A query that is out of domain.\n - **NON_ASCII_OUT_OF_SCOPE**: A query that is out of scope due to non ascii characters.\n - **BELOW_THRESHOLD**: The best answer scored below the minimum specified score.\n - **NO_ANSWER**: No suitably scored answer was found.\n - **answer_approval_id** - Approval ID of matching verified answer - valid UUID v4 string.\n - **score** - An approximation of the strength of the returned answer and answer_in_context chunk, or the float score returned from a model.\n - **level** - Configurable answer confidence levels to categorize outputs.\n - **content_id** - content_id of the knowledge domain content where the answer is located. A client application may use the content API to get more information about the content.\n - **content_display_name** - Display name of the source file that includes the best sentence answer.\n - **content_source_location** - URL of the source content where the answer and chunk are located.\n - **index** - Index into a custom data source.\n - **followup_choice** - Indicates a multiple-choice question is being returned to the user as a reply to their request. Each of the choices will be an attachment with this value.\n - **related_questions** - Questions related to the input question. e.g. key: rq_best_<ix>, value: {content_type:application/vnd.pryon.related_questions, content: <string>}, where ix is the index from 1 onwards.\n - **related_questions_score** - Score of a Related Question, e.g. key: rq_score_best_<ix>, value: {content_type:application/vnd.pryon.related_questions_score, content: <string>}, where ix is the index from 1 onwards.\n - **followup_questions** - Followup Question to the input question. e.g. key: fq_best_<ix>, value: {content_type:application/vnd.pryon.followup_questions, content: <string>}, where ix is the index from 1 onwards.\n - **followup_questions_score** - Followup Question score. e.g. key: fq_score_best_<ix>, value: {content_type:application/vnd.pryon.followup_questions_score, content: <string>}.\n - **start_page** - Page number where the answer_in_context or the chunk starts in a PDF.\n - **start_page_bbox** - Bounding box of the entire page on which the answer is found.\n - **end_page** - Page number where the answer_in_context ends in a PDF.\n - **start_char_index** - Index of the first occurrence of the best_sentence or answer substring within the surrounding answer_in_context chunk.\n - **end_char_index** - Index of the last occurrence of the best_sentence or answer substring within the surrounding answer_in_context chunk.\n - **bbox** - Bounding box coordinates returned as a list of four floating point numbers representing the top-left and bottom-right corners of the box for the answer snippet on the source document image.\n - **flag** - Boolean flag with either true or false values.\n - **texttrack_cue** - relative time offset from the beginning of the video associated with the short answer. e.g. key: \"texttrack_cue\", value: {content_type: application/vnd.pryon.texttrack_cue, content: <HH:MM:SS>}.\n - **answer_html** - A marked up HTML version of the text_wordy/answer_in_context text. Available only for views that contain tables and originate from PDFs, and only using Delphi DM/RC (hs_dmrc_enabled=true)."
type: string
content:
description: The content of the additional information.
type: string
type: object
ListChatCompletionsModelsResponse:
description: "Response for ListChatCompletionsModels\n Provides all the available models for our Chat Completions API"
properties:
items:
additionalProperties:
$ref: '#/components/schemas/ChatCompletionsModels'
description: List of all the available models for our Chat Completions API separated by provider
type: object
type: object
Delta:
description: Delta of a message for streaming.
properties:
role:
description: Role of the message sender (if changed).
type: string
content:
description: Content delta of the message.
type: string
tool_calls:
description: For assistant messages; tool calls made by the model.
items:
$ref: '#/components/schemas/DeltaToolCall'
type: array
type: object
Message:
description: Individual message in the conversation.
properties:
role:
description: Role of the message sender (system, user, assistant); check provider documentation for what each model supports.
type: string
content:
description: Content of the message.
type: string
tool_calls:
description: 'For assistant messages: tool calls made by the model.'
items:
$ref: '#/components/schemas/ToolCall'
type: array
name:
description: Name for the participant; provides the model information to differentiate between participants of the same role.
type: string
type: object
RouteQueryRequest:
properties:
query:
description: 'Required: Query string'
type: string
domain:
description: "Modification to query classification prompt. Defaults to \"the company you provide support for\",\n but can be modified to define any domain, e.g. \"a medical device manufacturer\", \"municipal public resources\", etc."
type: string
enable_generative_conversational_response:
description: Whether or not conversational responses are generated or canned
type: boolean
type: object
FunctionCall:
description: Function call details
properties:
name:
description: Name of the function being called.
type: string
arguments:
description: JSON string of arguments.
type: string
type: object
LogProbs:
properties:
content:
description: A list of message content tokens with log probability information.
items:
$ref: '#/components/schemas/LogProbTokenWithTop'
type: array
refusal:
description: A list of message refusal tokens with log probability information.
items:
$ref: '#/components/schemas/LogProbTokenWithTop'
type: array
type: object
ChatCompletionsResponse:
description: "Response for chat completion\n non-streaming: https://platform.openai.com/docs/api-reference/chat/object\n streaming: https://platform.openai.com/docs/api-reference/chat/streaming"
properties:
id:
description: Unique identifier for the chat completion.
type: string
choices:
description: A list of chat completion choices; can be more than one if n is greater than 1.
items:
$ref: '#/components/schemas/Choice'
type: array
created:
description: The Unix timestamp (in seconds) of when the chat completion was created.
type: string
model:
description: Model used for completion.
type: string
object:
description: Object type; either chat.completion or chat.completion.chunk.
type: string
usage:
allOf:
- $ref: '#/components/schemas/Usage'
description: Usage statistics for the completion.
type: object
GoogleProtobufValue:
description: Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
ListChatCompletionsModelsRequest:
description: The request schema for our ListChatCompletionsModels endpoint
properties:
function_calling:
description: Filters for models that support function calling
type: boolean
type: object
Usage:
properties:
prompt_tokens:
description: Tokens in the prompt.
format: int32
type: integer
completion_tokens:
description: Tokens in the completion.
format: int32
type: integer
total_tokens:
description: Total tokens used.
format: int32
type: integer
type: object
MetadataTypeValue:
properties:
display_field_name:
description: The data source metadata category, display_field_name.
type: string
value:
allOf:
- $ref: '#/components/schemas/GoogleProtobufValue'
description: The data source metadata value.
data_type:
description: Data Type of the metadata field.
format: enum
type: integer
type: object
GenerationConfigs:
properties:
model:
description: "ID of the model to use, following the <provider>/<model_id> format.\n e.g pryon/pryon-zeus-1, openai/gpt-4o, openai/o1-mini,\n anthropic/claude-3-5-sonnet-latest etc."
type: string
temperature:
description: "Sampling temperature.\n Range will depend on the specific model being called,\n Please check provider / model documentation."
format: float
type: number
top_p:
description: Alternative to temperature for nucleus sampling
format: float
type: number
stream:
description: "Whether to stream partial message deltas\n making this optional because it needs to be explicitly checked"
type: boolean
stop:
description: Stop sequences where the API should stop generating
items:
type: string
type: array
max_completion_tokens:
description: Maximum number of tokens to generate.
format: int32
type: integer
type: object
QueryGuardrailsResponse:
properties:
is_toxic:
description: Whether or not the given query contains toxic content
type: boolean
is_prompt_injection_attack:
description: Whether or not the given query contains a prompt injection attack
type: boolean
type: object
Context:
properties:
augmentation:
description: Predefined additional information provided with the source of this output. See "documentation about augmenting" link.
type: object
type: object
ToolCall:
description: Tool call in assistant messages (for responses).
properties:
id:
description: Unique identifier for the tool call.
type: string
type:
description: Will be function.
type: string
function:
allOf:
- $ref: '#/components/schemas/FunctionCall'
description: The function or tool to use.
type: object
ChatCompletionsModels:
description: A list of our Chat Completions models
properties:
models:
description: List of all the available models for our Chat Completions API
items:
$ref: '#/components/schemas/ChatCompletionsModel'
type: array
type: object
CompleteQueryResponse:
properties:
completed_query:
type: string
type: object
AnswerSummarizationConfigs:
description: Answer summarization specific configurations
properties:
unanswerable_response:
description: "Defines the response when the LLM encounters questions it cannot\n or should not answer. This field controls how the system gracefully handles queries\n that fall outside its knowledge base, violate content policies, require real-time\n information it lacks, or exceed its capabilities.\n\n Example:\n unanswerable_response: \"I don't have access to the information needed to answer\n that question accurately."
type: string
persona:
description: "Defines the personality, tone, and behavioral characteristics that shape how the LLM\n responds to users. This field controls the AI's communication style, expertise level,\n and interaction approach to create consistent and contextually appropriate responses.\n\n Example:\n persona: \"You are a friendly and knowledgeable technical documentation specialist."
type: string
type: object
ExchangeAudioOutput:
properties:
audio_output_id:
description: Random UUID generated by the entity creating the audio output resource.
type: string
audio_encoding:
description: The audio encoding of the input.
format: enum
type: integer
sample_rate_hertz:
description: The sample rate in Hertz of the audio data returned in content.
format: int32
type: integer
content:
description: The bytes of audio data encoded as specified in audio_encoding.
format: bytes
type: string
type: object
AttributionReference:
description: Attribution reference
properties:
position:
description: "the position in the full response text where the reference begins\n 1-indexed"
format: int32
type: integer
exchange_output_index:
# --- truncated at 32 KB (138 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pryon/refs/heads/main/openapi/pryon-generative-api-openapi.yml