gmAI
  • Introduction
    • ◼️Introducing gmAI
    • ⛓️gmAI Framework
    • 🏰The landscape
    • 🔑The opportunity
    • Roadmap
    • 🪙$GM Token
      • 🪙Tokenomics
      • $GM Anchor Program
        • How to join?
  • gmAI Ecosystem
    • 📱gmAI Mini App
      • 🔐2FA authentication
    • 🔲Intent Trade
    • gmINFRA
      • AI Multi-Agents
      • AI Multi-LLM
      • Importance of AI Multi-Agent and Multi-LLM System
      • ⚙️gmMODEL
        • Features
        • gmiNFRA Chatbot
        • Developer Guideline
          • API Documentation Stream API
          • Swap API
    • 👬AnotherUs
  • KEEP IN TOUCH
    • Website
    • X
    • Telegram Announcement
    • Discord
    • Brand kit
Powered by GitBook
On this page
  1. gmAI Ecosystem
  2. gmINFRA
  3. gmMODEL
  4. Developer Guideline

API Documentation Stream API

PreviousDeveloper GuidelineNextSwap API

Last updated 9 months ago

For detailed documentation, visit:

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.

⚙️
gmINFRA API Documentation