Endpoint schema snippet

View as Markdown

The <EndpointSchemaSnippet> component displays endpoint schemas from your API Reference. By default, it renders the complete schema, or you can use the selector prop to display specific parts like request body, response, path parameters, or query parameters.

Markdown-rich field descriptions aren’t yet supported and will display as plain text. See the Request path example below.

Usage

Path parameters

domainstringRequired

Request

messageslist of objectsRequired
The messages to use for the chat completion
modelenum or nullOptional
The model to use for the chat completion
Allowed values:
max_tokensinteger or nullOptional100-3500Defaults to 3000
The maximum number of tokens to generate. Note: setting a token count lower than 2000 may result in incomplete responses. You can add a custom system prompt to control the verbosity of the response.
system_promptstring or nullOptional
The system prompt to use for the chat completion
rewrite_queryboolean or nullOptionalDefaults to false
Whether to rewrite the query using query decomposition

Response

turnslist of objectsRequired
The conversation turns in the chat completion
citationslist of stringsRequired
List of citation strings
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" />

Variants

Full request

Passing request as the selector will only render the request schema.

Path parameters

domainstringRequired

Request

messageslist of objectsRequired
The messages to use for the chat completion
modelenum or nullOptional
The model to use for the chat completion
Allowed values:
max_tokensinteger or nullOptional100-3500Defaults to 3000
The maximum number of tokens to generate. Note: setting a token count lower than 2000 may result in incomplete responses. You can add a custom system prompt to control the verbosity of the response.
system_promptstring or nullOptional
The system prompt to use for the chat completion
rewrite_queryboolean or nullOptionalDefaults to false
Whether to rewrite the query using query decomposition
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request" />

Request path

Path parameters

domainstringRequired
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.path" />

Request query

Query parameters

domainstringRequired
Markdown
1<EndpointSchemaSnippet endpoint="POST /discord/install" selector="request.query" />

Request body

Request

messageslist of objectsRequired
The messages to use for the chat completion
modelenum or nullOptional
The model to use for the chat completion
Allowed values:
max_tokensinteger or nullOptional100-3500Defaults to 3000
The maximum number of tokens to generate. Note: setting a token count lower than 2000 may result in incomplete responses. You can add a custom system prompt to control the verbosity of the response.
system_promptstring or nullOptional
The system prompt to use for the chat completion
rewrite_queryboolean or nullOptionalDefaults to false
Whether to rewrite the query using query decomposition
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.body" />

Full response

Passing response as the selector will only render the response schema.

Response

turnslist of objectsRequired
The conversation turns in the chat completion
citationslist of stringsRequired
List of citation strings
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="response" />

Response body

Response

turnslist of objectsRequired
The conversation turns in the chat completion
citationslist of stringsRequired
List of citation strings
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="response.body" />