# API Documentation Stream API

For detailed documentation, visit:[ gmINFRA API Documentation](https://infra.gm.ai/)

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>  \\
>
> &#x20;   -H "Content-Type: application/json" \\
>
> &#x20;   -d '{
>
> &#x20;       "model": "gm-01-8B",
>
> &#x20;       "messages": \[
>
> &#x20;           {
>
> &#x20;               "role": "user",
>
> &#x20;               "content": "What is BTC?"
>
> &#x20;           }
>
> &#x20;       ],
>
> &#x20;       "stream": "true",
>
> &#x20;       "temperature": 1
>
> &#x20;   }'

#### 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.
