Back to home

DEVELOPER QUICKSTART

GIGACOMMA API quickstart

From an API key to your first model request. Start building with the GIGACOMMA Model API and familiar tools.

01

Create an API key

Sign in to the console and create an inference key in API Keys. Save the full key in your local environment variables.

Get an API key
02

Choose a model

Check input formats, specifications, and rates in the model library. Supported endpoints and request formats vary by model.

Explore all models
03

Configure and run

Expand connection setup and run the preparation commands, including the actual API address and model ID. Save the example and run it in your local development environment.

BUILT FOR YOUR STACK

Your first API request

This example uses a language model. See each model's detail page for image, speech, video, and other request formats.

Expand connection setup and run the preparation commands first. Then save and run the Python or cURL example.

Connection setup & preparationActual API address, model ID, and environment variables
API address
https://api.ecohash.com/v1
API model ID
llama-3.1-8b-instruct

Replace YOUR_API_KEY with the full inference API key issued in the console. Run setup in macOS/Linux or a compatible shell. JSON cURL examples use the Python standard library to build the request body.

Terminal
python -m pip install openai
export GIGACOMMA_API_BASE_URL='https://api.ecohash.com/v1'
export GIGACOMMA_MODEL_ID='llama-3.1-8b-instruct'
export GIGACOMMA_API_KEY="YOUR_API_KEY"

GIGACOMMA_API_KEY is the environment variable name. Its value is an inference API key from the console, not an OpenAI API key. Get an API key

quickstart.py
import osfrom openai import OpenAIMODEL_ID = os.environ["GIGACOMMA_MODEL_ID"]client = OpenAI(    base_url=os.environ["GIGACOMMA_API_BASE_URL"],    api_key=os.environ["GIGACOMMA_API_KEY"],)response = client.chat.completions.create(    model=MODEL_ID,    messages=[{"role": "user", "content": "Hello!"}],    max_tokens=256,)print(response.choices[0].message.content)

Request not working?

Check that you ran setup in the same shell and configured the full API key. Use the exact model ID and input format from that model's connection setup and example.

Advanced developer resourcesFull API specifications and model-specific requirements

For file formats, advanced parameters, and models requiring specialized inputs, open the full reference. The link opens a separate technical documentation site.

Open full API reference