API Documentation
Language chat
POST
/
v1
/
language
/
{router}
/
chat
curl --request POST \
--url http://localhost:9099/v1/language/{router}/chat \
--header 'Content-Type: application/json' \
--data '{
"message": {
"content": "<string>",
"name": "<string>",
"role": "<string>"
},
"messageHistory": [
{
"content": "<string>",
"name": "<string>",
"role": "<string>"
}
],
"override": {
"message": {
"content": "<string>",
"name": "<string>",
"role": "<string>"
},
"model_id": "<string>"
}
}'
{
"cached": true,
"created": 123,
"id": "<string>",
"model": "<string>",
"model_id": "<string>",
"modelResponse": {
"message": {
"content": "<string>",
"name": "<string>",
"role": "<string>"
},
"responseId": {},
"tokenCount": {
"promptTokens": 123,
"responseTokens": 123,
"totalTokens": 123
}
},
"provider": "<string>",
"router": "<string>"
}
Path Parameters
Router ID
Body
application/json
Request Data
The content of the message.
The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.
The role of the author of this message. One of system, user, or assistant.
The content of the message.
The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.
The role of the author of this message. One of system, user, or assistant.
Response
200
application/json
OK
The content of the message.
The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.
The role of the author of this message. One of system, user, or assistant.
Was this page helpful?
curl --request POST \
--url http://localhost:9099/v1/language/{router}/chat \
--header 'Content-Type: application/json' \
--data '{
"message": {
"content": "<string>",
"name": "<string>",
"role": "<string>"
},
"messageHistory": [
{
"content": "<string>",
"name": "<string>",
"role": "<string>"
}
],
"override": {
"message": {
"content": "<string>",
"name": "<string>",
"role": "<string>"
},
"model_id": "<string>"
}
}'
{
"cached": true,
"created": 123,
"id": "<string>",
"model": "<string>",
"model_id": "<string>",
"modelResponse": {
"message": {
"content": "<string>",
"name": "<string>",
"role": "<string>"
},
"responseId": {},
"tokenCount": {
"promptTokens": 123,
"responseTokens": 123,
"totalTokens": 123
}
},
"provider": "<string>",
"router": "<string>"
}