Skip to content

Inference API

Run open models through Geometric’s optimized deployments

Set up your environment

Request an API key before running the examples below.

Create a Python virtual environment and install the OpenAI client used in the first example:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install openai

These activation commands are for macOS and Linux. In Windows PowerShell, use .venv\Scripts\Activate.ps1.

Set your key in the same terminal before running an example. Replace the placeholder with your issued key; keep real keys out of source files and version control.

export GEOMETRIC_API_KEY='your-issued-key'

In Windows PowerShell, use $env:GEOMETRIC_API_KEY = 'your-issued-key'.

If you use the Anthropic example instead, install its client with python -m pip install anthropic.

Quickstart

Requests use the model deepseek/deepseek-v4.1-flash-1017. The examples read your key from the GEOMETRIC_API_KEY environment variable.

OpenAI SDK

import os
from openai import OpenAI


client = OpenAI(base_url="https://api.geometric.so/v1", api_key=os.environ["GEOMETRIC_API_KEY"])
response = client.chat.completions.create(
    model="deepseek/deepseek-v4.1-flash-1017",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Anthropic SDK

import os
from anthropic import Anthropic

client = Anthropic(base_url="https://api.geometriclabs.ai", api_key=os.environ["GEOMETRIC_API_KEY"])
message = client.messages.create(
    model="deepseek/deepseek-v4.1-flash",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)

Limits

Table 1 Limits per key 4 rows

A request over a limit, or one that arrives while the service is at capacity, gets HTTP 429 with a Retry-After header. Retry after the specified number of seconds.

Questions about inference

Which clients can I use?

Use the OpenAI Python SDK with https://api.geometric.so/v1. Contact us to confirm Anthropic-compatible access for your deployment.

Which model ID should I send?

Use deepseek/deepseek-v4.1-flash-1017 for DeepSeek v4.1 Flash 1017. Use the exact API model identifier rather than substituting a research checkpoint name.

What are the request limits?

The published limits are eight requests in flight per key and four requests per second, with bursts up to 32. The context limit is 1,048,576 tokens and the output limit is 65,536 tokens per response.

What should I do if I receive HTTP 429?

Requests over a limit, or arriving while the service is at capacity, receive HTTP 429 with a Retry-After header. Wait the specified number of seconds before retrying.

Where can I discuss pricing or a different workload?

Contact Geometric to discuss pricing and your workload requirements. For optimization or integration into your own environment, explore a partnership.