Endpoint schema snippet

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:
system_promptstring or nullOptional
The system prompt to use for the chat completion

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:
system_promptstring or nullOptional
The system prompt to use for the chat completion
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:
system_promptstring or nullOptional
The system prompt to use for the chat completion
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" />