API Documentation Stream API
For detailed documentation, visit: gmINFRA API Documentation
Endpoint: https://model.gm.ai/v1/chat/completions
Making Your First API Request
To run your first API request, paste the following command into your terminal:
curl -X POST https://model.gm.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gm-01-8B",
"messages": [
{
"role": "user",
"content": "What is BTC?"
}
],
"stream": "true",
"temperature": 1
}'
Request Body Explanation:
model (string): The model to use for the API call. Example: "gm-01-8B".
messages (array): The list of messages in the chat, including user and assistant input. Example: [ { "role": "user", "content": "What is BTC?" }, { "role": "assistant", "content": "BTC stands for Bitcoin. Would you like to know its current price?" } ]
stream (string): Whether or not to stream the response. Example: "true".
temperature (number): The temperature setting for the API call, affecting randomness. Example: 1.
Last updated