Quickstart

Get up and running with Optima Forge in under 5 minutes.

Quickstart

Get up and running with Optima Forge in under 5 minutes. This guide walks you through creating an account, obtaining your API key, making your first request, and enabling advanced features like memory and security.

1. Create Your Account

Head to optima-forge.com/sign-up and create your free account. Every new account starts with a 7-day Ultimate trial that unlocks all features, including advanced routing, full memory, and multi-agent capabilities. The trial activates on your first API request, not at sign-up, so take your time exploring the dashboard first.

2. Get Your API Key

Once signed in, navigate to Dashboard → API Keys and click Create Key. Give it a descriptive name (e.g., "dev-local") and copy the key immediately — it will not be shown again. Your API key starts with forge_ and is used in the Authorization header for all requests.

export FORGE_API_KEY="forge_sk_your_key_here"

3. Install the SDK (Optional)

Optima Forge is fully OpenAI-compatible, so you can use any existing OpenAI SDK by pointing it at the Forge base URL. Alternatively, install our dedicated SDK for additional features:

# JavaScript / TypeScript
npm install @optima-forge/sdk

# Python
pip install optima-forge

4. Make Your First Request

The simplest way to verify your setup is with a curl command:

curl -X POST https://api.optima-forge.com/v1/chat/completions   -H "Authorization: Bearer $FORGE_API_KEY"   -H "Content-Type: application/json"   -d '{
    "model": "auto",
    "messages": [
      {"role": "user", "content": "Hello, Forge!"}
    ]
  }'

Setting model to "auto" activates the Quality Router, which selects the best provider based on your query's complexity, cost targets, and real-time ELO scores.

5. Use the JavaScript SDK

import { Forge } from "@optima-forge/sdk";

const forge = new Forge({ apiKey: process.env.FORGE_API_KEY });

const response = await forge.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Explain quantum computing in 3 sentences." }],
});

console.log(response.choices[0].message.content);

6. Use the Python SDK

from optima_forge import Forge

forge = Forge(api_key="forge_sk_your_key_here")

response = forge.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Explain quantum computing in 3 sentences."}],
)

print(response.choices[0].message.content)

7. Enable Advanced Features

Forge extends the OpenAI request format with an optional forge object. Enable memory, security scanning, caching, and more:

{
  "model": "auto",
  "messages": [{"role": "user", "content": "Remember my name is Alice."}],
  "forge": {
    "memory": { "enabled": true, "userId": "user_123" },
    "security": { "level": "standard" },
    "cache": { "enabled": true, "ttl": 3600 }
  }
}

8. Check Your Dashboard

Return to the Forge Dashboard to see your request in the live feed. The dashboard shows real-time metrics including latency, cost, provider selection, cache hit rates, and security scan results. You can drill into any request to see the full trace powered by Langfuse.

Next Steps