Skip to main content
Defense contractors shouldn’t need months of cloud integration and compliance paperwork to use AI. Consus Gateway routes your requests through FedRAMP High and DoD IL5 authorized environments using the OpenAI SDK you already know. Change two lines and start building.

Prerequisites

  • An API key (book a call to get set up)
  • The OpenAI SDK for your language, or any HTTP client

1. Install the SDK

pip install openai

2. Configure the Client

Point the OpenAI SDK at Consus Gateway and pass your API key via the x-api-key header.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.consus.io/v1",
    api_key="dummy",  # Required by SDK but not used for auth
    default_headers={"x-api-key": "YOUR_API_KEY"},
)

3. Make a Request

Swap the model parameter to use any available model. All requests stay within government-authorized cloud environments.
completion = client.chat.completions.create(
    model="claude-3-7-sonnet:il5",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(completion.choices[0].message.content)

What’s Next