Developer Quickstart
Get up and running with the GlomaxGPT API in minutes. This guide walks you through installation, authentication, and making your first API call using the Responses API.
1. SDK'yı Yükle
GlomaxGPT provides official SDKs for Python and Node.js. Choose your preferred language to get started.
# Requires Python 3.8+
pip install GlomaxGPT
# Verify installation
python -c "import GlomaxGPT; print(GlomaxGPT.__version__)"
# Requires Node.js 18+
npm install GlomaxGPT
# Or with yarn
yarn add GlomaxGPT
# Or with pnpm
pnpm add GlomaxGPT
# No installation needed — use cURL directly
curl https://api.glomaxgpt.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GlomaxGPT_API_KEY" \
-d '{
"model": "glomaxgpt-pro",
"input": "Hello, world!"
}'
2. API Anahtarını Al
All API requests require authentication using an API key. You can generate and manage your keys in the GlomaxGPT dashboard.
Create an account
Sign up at platform.glomaxgpt.com if you haven't already. You'll need a verified email address.
Navigate to API Keys
Go to Settings → API Keys in the dashboard. Click Create new secret key.
Store your key securely
Copy the key immediately — it won't be shown again. Store it as an environment variable, never hardcode it in source files.
Set the environment variable
# Linux / macOS
export GlomaxGPT_API_KEY="sk-proj-..."
# Windows PowerShell
$env:GlomaxGPT_API_KEY = "sk-proj-..."
# Add to ~/.bashrc or ~/.zshrc for persistence
echo 'export GlomaxGPT_API_KEY="sk-proj-..."' >> ~/.bashrc
.env files with python-dotenv or a secrets manager in production. Rotate keys immediately if they are exposed.
3. Your First API Call
The Responses API is the newest and most powerful way to interact with GlomaxGPT models. It supports multi-turn conversations, built-in tools, and structured outputs.
from GlomaxGPT import GlomaxGPT
client = GlomaxGPT() # Uses GlomaxGPT_API_KEY env var automatically
response = client.responses.create(
model="glomaxgpt-pro",
input="Write a haiku about recursion in programming."
)
print(response.output_text)
import GlomaxGPT from "GlomaxGPT";
const client = new GlomaxGPT();
const response = await client.responses.create({
model: "glomaxgpt-pro",
input: "Write a haiku about recursion in programming.",
});
console.log(response.output_text);
output_text property gives you the text output directly without navigating nested response objects.
4. Multi-turn Conversations
The Responses API makes it easy to maintain conversation context. You can pass previous response IDs or explicitly include message history.
from GlomaxGPT import GlomaxGPT
client = GlomaxGPT()
# First turn
response = client.responses.create(
model="glomaxgpt-pro",
input="What is the capital of France?"
)
print(response.output_text) # Paris
# Second turn — reference previous response
follow_up = client.responses.create(
model="glomaxgpt-pro",
previous_response_id=response.id,
input="What is its population?"
)
print(follow_up.output_text) # ~2.1 million (city proper)
# Alternatively, pass explicit message history
response2 = client.responses.create(
model="glomaxgpt-pro",
input=[
{"role": "user", "content": "What is the capital of France?"},
{"role": "assistant", "content": "The capital of France is Paris."},
{"role": "user", "content": "What is its population?"}
]
)
print(response2.output_text)
import GlomaxGPT from "GlomaxGPT";
const client = new GlomaxGPT();
// First turn
const response = await client.responses.create({
model: "glomaxgpt-pro",
input: "What is the capital of France?",
});
console.log(response.output_text);
// Second turn — reference previous response
const followUp = await client.responses.create({
model: "glomaxgpt-pro",
previous_response_id: response.id,
input: "What is its population?",
});
console.log(followUp.output_text);
5. Add Web Search
Give your model access to real-time web search with a single parameter. The model will automatically decide when to search.
from GlomaxGPT import GlomaxGPT
client = GlomaxGPT()
response = client.responses.create(
model="glomaxgpt-pro",
tools=[{"type": "web_search_preview"}],
input="What are the latest developments in quantum computing in 2025?"
)
print(response.output_text)
# Access citations and sources
for item in response.output:
if item.type == "web_search_call":
print(f"Searched for: {item.action.query}")
import GlomaxGPT from "GlomaxGPT";
const client = new GlomaxGPT();
const response = await client.responses.create({
model: "glomaxgpt-pro",
tools: [{ type: "web_search_preview" }],
input: "What are the latest developments in quantum computing in 2025?",
});
console.log(response.output_text);
6. Image Input
GlomaxGPT Pro and other vision-capable models can analyze images. Pass image URLs or base64-encoded images directly.
from GlomaxGPT import GlomaxGPT
client = GlomaxGPT()
# Using an image URL
response = client.responses.create(
model="glomaxgpt-pro",
input=[
{
"role": "user",
"content": [
{
"type": "input_image",
"image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png"
},
{
"type": "input_text",
"text": "What do you see in this image? Describe it in detail."
}
]
}
]
)
print(response.output_text)
import GlomaxGPT from "GlomaxGPT";
const client = new GlomaxGPT();
const response = await client.responses.create({
model: "glomaxgpt-pro",
input: [
{
role: "user",
content: [
{
type: "input_image",
image_url: "https://example.com/image.png",
},
{
type: "input_text",
text: "What do you see in this image?",
},
],
},
],
});
console.log(response.output_text);
7. Streaming Responses
For a better user experience, stream the model's response token by token instead of waiting for the full output.
from GlomaxGPT import GlomaxGPT
client = GlomaxGPT()
# Stream using context manager
with client.responses.stream(
model="glomaxgpt-pro",
input="Write a short story about a robot learning to paint."
) as stream:
for text in stream.text_deltas:
print(text, end="", flush=True)
# Or use the raw stream iterator
stream = client.responses.create(
model="glomaxgpt-pro",
input="Explain quantum entanglement simply.",
stream=True
)
for event in stream:
if event.type == "response.text.delta":
print(event.delta, end="", flush=True)
import GlomaxGPT from "GlomaxGPT";
const client = new GlomaxGPT();
// Stream using the helper
const stream = await client.responses.stream({
model: "glomaxgpt-pro",
input: "Write a short story about a robot learning to paint.",
});
for await (const chunk of stream) {
if (chunk.type === "response.text.delta") {
process.stdout.write(chunk.delta);
}
}
// Get the final response after streaming
const finalResponse = await stream.finalResponse();
console.log("\nTotal tokens:", finalResponse.usage.total_tokens);
Sonraki Adımlar
You're ready to build. Explore these guides to go deeper into specific capabilities.
Text Generation
Learn about conversation design, system prompts, JSON mode, and token management.
Build Agents
Create autonomous AI agents with tools, handoffs, guardrails, and multi-agent coordination.
Image Generation
Generate and edit images using GlomaxGPT Vision 2 with precise prompts and parameters.
Fine-tuning
Customize models with your own data using supervised learning, RFT, or DPO.
Embeddings
Build semantic search, RAG pipelines, and recommendation systems with vector embeddings.
Reasoning Models
Tackle complex math, coding, and analysis problems with the glomaxgpt-think and glomaxgpt-think-mini models.