Skip to main content
This tutorial demonstrates how to use the GravixLayer SDK with simple, practical examples using the CLI interface.

Setup

First, install the GravixLayer SDK:
pip install gravixlayer
Set your API key as an environment variable:
  • Windows (CMD)
  • Windows (PowerShell)
  • Linux/macOS
set GRAVIXLAYER_API_KEY="your_api_key_here"

Your First Request

  • CLI
  • Python SDK
  • JavaScript SDK
gravixlayer chat --model "meta-llama/llama-3.1-8b-instruct" --user "Hello, world!"
Example Output:
Hello! How can I assist you today?
I