{"openapi":"3.0.3","info":{"description":"Pryon Generative API.","title":"Generative API","version":"1.0"},"servers":[{"url":"{pryon_base_url}"}],"tags":[{"name":"Generative"}],"paths":{"/api/generative/v1alpha1/chat/completions":{"post":{"description":"A generic text-generation interface to external LLM providers and Pryon-hosted LLMs.\n implements a subset of the OpenAI /v1/chat/completions API specification\n as defined here: https://platform.openai.com/docs/api-reference/chat\n Using the official OpenAI client SDK for your language is recommended.\n The following providers are supported currently:\n - pryon\n - openai\n - anthropic\n - vertex ai\n Please check the respective provider's documentation\n for supported text-generation models and accepted sampling params.\n If streaming is enabled, responses will follow the SSE standard\n https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events.","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"}]}},"/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"}]}},"/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"}]}},"/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"}]}},"/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"}]}},"/api/generative/v1alpha1/tasks/summarize-answer":{"post":{"summary":"Summarize Answers","description":"Generates a summarized answer given retrieval outputs and configurations.","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"}]}}},"components":{"schemas":{"AnswerSummarizationConfigs":{"description":"","properties":{"unanswerable_response":{"description":"Response for questions that fall outside the knowledge base, violate content policies, require unavailable real-time information, or exceed LLM capabilities; for example, I don't have access to the information needed to answer that question accurately.","type":"string"},"persona":{"description":"Personality, tone, expertise level, and interaction approach configured to create consistent and contextually appropriate responses; for example, You are an expert network specialist with a witty and friendly demeanor.","type":"string"}},"type":"object"},"AnswerSummarizationRequest":{"properties":{"query":{"description":"Query provided to generate an answer summary.","type":"string"},"exchange_outputs":{"description":"Extractive output for the generated answer.","items":{"$ref":"#/components/schemas/ExchangeOutput"},"type":"array"},"generation_configs":{"allOf":[{"$ref":"#/components/schemas/GenerationConfigs"}],"description":"General purpose settings that generate responses; always set to True."},"configs":{"allOf":[{"$ref":"#/components/schemas/AnswerSummarizationConfigs"}],"description":""},"include_exchange_outputs_context":{"description":"Whether to include the exchange output context in the response; default is False.","type":"boolean"}},"type":"object"},"AnswerSummarizationResponse":{"properties":{"answer_summarization_id":{"description":"Unique identifier for the summarization request.","type":"string"},"state":{"description":"Progress status for the streaming response. Values are:\n - EXCHANGE_OUTPUTS_CONTEXT: The first chunk of data returned; input flag for AnswerSummarizationRequest.include_exchange_outputs_context must be True; copy of what is passed as exchange_outputs to the AnswerSummarizationRequest. \n - IN_PROGRESS: Intermediate chunks of text. \n - COMPLETE: The last chunck which contains the complete text. \n - ERROR: An indication that an error occured.","format":"enum","type":"integer"},"delta":{"description":"Piece by piece responses for a streaming chunk; the request must be set to True for stream parameter.\n - EXCHANGE_OUTPUTS_CONTEXT: empty string \n - IN_PROGRESS: streamed chunk of tokens representing the partially generated answer \n - COMPLETE: empty string ","type":"string"},"text":{"description":"Text returned in the response.\n - EXCHANGE_OUTPUTS_CONTEXT: empty string \n - IN_PROGRESS: empty string \n - COMPLETE: full response text \n - ERROR: error message","type":"string"},"references":{"description":"Attributions for current text.\n - EXCHANGE_OUTPUTS_CONTEXT: empty list \n - IN_PROGRESS: empty list \n - COMPLETE: complete list of references for the entire text","items":{"$ref":"#/components/schemas/AttributionReference"},"type":"array"},"exchange_outputs":{"description":"Extractive output for the generated answer.\n - EXCHANGE_OUTPUTS_CONTEXT: original exchange outputs from request message \n - COMPLETE: empty list \n - IN_PROGRESS: empty list \n - ERROR: error message","items":{"$ref":"#/components/schemas/ExchangeOutput"},"type":"array"}},"type":"object"},"Attachment":{"properties":{"content_type":{"description":"The content type of the additional information in application/vnd.pryon.{content_type} format. Types are:\n - **text** - Answer snippet for detected short spans within the answer_in_context; best_n will be the same string and is the ranking of the sentence within the answer in context chunk.\n - **answer_in_context** - Chunk of text identified as most relevant to the input query; the smaller text answer is extracted from this larger text.\n - **answer_type** - Answer types include:\n - **TEXT_EXCERPT**: Default.\n - **FAQ**: Answer derived from the frequently asked questions.\n - **OUT_OF_DOMAIN**: Query outside of the informational scope.\n - **NON_ASCII_OUT_OF_SCOPE**: Query out of scope due to non ascii characters.\n - **BELOW_THRESHOLD**: 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.\n - **score** - An approximation of the strength of the returned answer and answer_in_context chunk; float score returned from a model.\n - **level** - Configurable answer confidence levels used to categorize outputs.\n - **content_id** - Content ID of the knowledge domain content that contains the answer.\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 that contain the answer and chunk.\n - **index** - Index into a custom data source.\n - **followup_choice** - Indicates a multiple-choice question is returned as a reply; each choice is an attachment with this value.\n - **related_questions** - Questions related to the input question.\n - **related_questions_score** - Score of the related question.\n - **followup_questions** - Question asked to expand on the initial response.\n - **followup_questions_score** - Score of the related followup question.\n - **start_page** - For a PDF, the page number where the answer_in_context or the chunk starts.\n - **start_page_bbox** - Bounding box of the entire page that contains the answer.\n - **end_page** - For a PDF, the page number where the answer_in_context ends.\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 floating point numbers for the top-left and bottom-right corners of the box for the answer snippet on the source document image.\n - **flag** - Either true or false.\n - **texttrack_cue** - Time offset from the beginning of the video associated with the short answer.\n - **answer_html** - Marked-up HTML version of the answer_in_context text; only views with tables that originate from PDF.","type":"string"},"content":{"description":"The content of the additional information.","type":"string"}},"type":"object"},"AttributionReference":{"description":"Attribution reference","properties":{"position":{"description":"Starting position of the reference in the full response text; 1 indicates indexed.","format":"int32","type":"integer"},"exchange_output_index":{"description":"Attribution reference for the exchange output; 1 indicates indexed.","format":"int32","type":"integer"}},"type":"object"},"ChatCompletionsModel":{"description":"An individual Chat Completions model","properties":{"id":{"description":"The id of the model. Either in the form of \"provider/model\" or \"provider/subprovider/model\"","type":"string"},"display_name":{"description":"The human friendly name of the model, used during selection in our UI","type":"string"}},"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"},"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, following the / 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","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"},"logprobs":{"description":"Whether to return log probabilities of the output tokens or not.\n If true, returns the log probabilities of each output token returned in the content of message.","type":"boolean"},"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":"Specifies the tool called by the model when generating a response; the simple string options below dictate the LLM behavior; defaults to none if no tools are present.\n none: the model will not call any tool and instead generates a message.\n auto: the model picks between generating a message or calling one or more tools.\n required: the model must call one or more tools.\n To force the model to call a specific tool, see Calling Specific Tools."}},"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":"The object type, which can be either\n chat.completion OR\n chat.completion.chunk","type":"string"},"usage":{"allOf":[{"$ref":"#/components/schemas/Usage"}],"description":"Usage statistics for the completion"}},"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"},"CompleteQueryRequest":{"properties":{"query":{"description":"Query to complete given context.","type":"string"},"conversation_context":{"description":"Context for prior turns in the conversation.","type":"string"},"conversation_id":{"description":"Retrieve context history (question-answer pairs)\n from previous exchanges in the conversation.","type":"string"}},"type":"object"},"CompleteQueryResponse":{"properties":{"completed_query":{"type":"string"}},"type":"object"},"Context":{"properties":{"augmentation":{"description":"Predefined additional information provided with the output source.","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"},"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/tool to use"}},"type":"object"},"ExchangeAudioOutput":{"properties":{"audio_output_id":{"description":"Unique identifier for the audio output resource.","type":"string"},"audio_encoding":{"description":"- UNSPECIFIED: Not specified.\n - LINEAR16: LINEAR16: Uncompressed 16-bit signed little-endian samples (Linear PCM).\n - MP3: MP3: MP3 audio encoding. The sample rate is encoded in the payload.","format":"enum","type":"integer"},"sample_rate_hertz":{"description":"Sample rate in hertz of the audio data; only valid value is 16000, which must be explicitly stated by the client.","format":"int32","type":"integer"},"content":{"description":"Bytes of encoded audio data.","format":"bytes","type":"string"}},"type":"object"},"ExchangeOutput":{"properties":{"output_id":{"description":"Unique identifier for the output.","type":"string"},"text":{"description":"A string containing the text output of the generative answer.","type":"string"},"summary_text":{"description":"The exchange reply translated to speech and played as audio; generally a shorter form equivalent to text that works better as a spoken reply; if blank, no shorter form text is available.","type":"string"},"audio":{"allOf":[{"$ref":"#/components/schemas/ExchangeAudioOutput"}],"description":""},"attachments":{"additionalProperties":{"$ref":"#/components/schemas/Attachment"},"description":"Unique identifier for the audio output resource.","type":"object"},"subject_ids":{"description":"Unique identifier for the subjects associated with the output.","items":{"type":"string"},"type":"array"},"context":{"allOf":[{"$ref":"#/components/schemas/Context"}],"description":"Additional context for the output."},"data_source_metadata":{"additionalProperties":{"$ref":"#/components/schemas/MetadataTypeValue"},"description":"DEPRECATED; replaced by system_data_source_metadata.","type":"object"},"system_data_source_metadata":{"additionalProperties":{"$ref":"#/components/schemas/MetadataTypeValue"},"description":"System-managed metadata for the information sources.","type":"object"},"user_selected_data_source_metadata":{"additionalProperties":{"$ref":"#/components/schemas/MetadataTypeValue"},"description":"User-selected metadata for the information sources; the main metadata category is db_field_name.","type":"object"},"user_defined_metadata":{"additionalProperties":{"$ref":"#/components/schemas/MetadataTypeValue"},"description":"User-defined metadata for the information sources; the main metadata category is db_field_name.","type":"object"}},"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"},"FunctionDefinition":{"description":"Function definition matching OpenAI's FunctionDefinition","properties":{"name":{"description":"The name of the function to be called\n Must be a-z, A-Z, 0-9, or contain underscores and dashes, max 64 chars","type":"string"},"description":{"description":"Description of what the function does","type":"string"},"parameters":{"description":"JSON Schema as a string (since protobuf doesn't have native JSON Schema support)\n This corresponds to FunctionParameters: Dict[str, object]","type":"object"},"strict":{"description":"Whether to enable strict schema adherence","type":"boolean"}},"type":"object"},"GenerationConfigs":{"properties":{"model":{"description":"ID of the model to use, in provider/model_id format; for a list of valid entries, see the [available models](https://docs.pryon.com/reference/available-models-for-chat-completions#/).","type":"string"},"temperature":{"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.","format":"float","type":"number"},"top_p":{"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.","format":"float","type":"number"},"stream":{"description":"If set to True, the model response data is generated using server-sent events and streamed to the client.","type":"boolean"},"stop":{"description":"Stop sequence signals for the API generation.","items":{"type":"string"},"type":"array"},"max_completion_tokens":{"description":"Maximum number of tokens generated in the chat completion; can be used to control costs for text generated via API.","format":"int32","type":"integer"}},"type":"object"},"GoogleProtobufAny":{"additionalProperties":true,"description":"Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.","properties":{"@type":{"description":"The type of the serialized message.","type":"string"}},"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"},"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"},"LogProbToken":{"properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens.\n Otherwise, 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.\n Useful in instances where characters are represented by multiple tokens\n and their byte representations must be combined to generate\n the correct text representation.\n Can be null if there is no bytes representation for the token.","items":{"format":"int32","type":"integer"},"type":"array"}},"type":"object"},"LogProbTokenWithTop":{"properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens.\n Otherwise, 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.\n Useful in instances where characters are represented by multiple tokens\n and their byte representations must be combined to generate\n the correct text representation.\n Can be null if there is no bytes representation for the token.","items":{"format":"int32","type":"integer"},"type":"array"},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position.\n In rare cases, there may be fewer than the number of requested top_logprobs returned.","items":{"$ref":"#/components/schemas/LogProbToken"},"type":"array"}},"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"},"Message":{"description":"Individual message in the conversation","properties":{"role":{"description":"Role of the message sender (system, user, assistant)\n Please check provider documentation on what's supported\n for a particular model.","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":"Optional: A name for the participant. Provides the model information to differentiate between participants of the same role.","type":"string"}},"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"},"QueryGuardrailsRequest":{"properties":{"query":{"description":"Query to check against guardrails models","type":"string"}},"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"},"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"},"RouteQueryResponse":{"properties":{"is_intelligible":{"description":"Whether or not the given query is intelligible","type":"boolean"},"is_english":{"description":"Whether or not the given query is in a supported language","type":"boolean"},"is_conversational":{"description":"Whether or not the given query is conversational","type":"boolean"},"conversational_response":{"description":"The LLM-generated response if the query is indeed conversational","type":"string"}},"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"},"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"},"ToolCall":{"description":"Tool call in assistant messages (for responses)","properties":{"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/tool to use"}},"type":"object"},"Usage":{"description":"Usage statistics\n TODO: if we're going out to reasoning models,\n do we need to include those tokens separately?","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"}}}}