Connect the tools
you already use.
Setup paths for SDKs, coding agents, chat apps, and automation tools—plus the API reference behind them. One GlideAPI key, live model discovery, and compatible OpenAI or Anthropic request shapes.
Start with a single curl command
Create a key in the customer console, then pass it as a bearer token. Keys are accepted on every API endpoint.
curl https://glideapi.dev/v1/chat/completions \
-H "Authorization: Bearer YOUR_GLIDE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"messages": [{
"role": "user",
"content": "Write a three-word greeting."
}]
}'https://glideapi.dev/v1
Authorization: Bearer YOUR_GLIDE_KEY
# Anthropic Messages also accepts:
x-api-key: YOUR_GLIDE_KEYGET /v1/models before hard-coding one. It returns the models enabled for your account plus their current public prices and capability flags.Bring your own agent, IDE, app, or workflow.
Pick the guide that matches your tool. OpenAI-compatible guides use https://glideapi.dev/v1. Anthropic-native clients use https://glideapi.dev so the client can append its own /v1/messages route.
Open Console → API keys. Use a separate key per app or environment.
Use GET /v1/models or Models. Do not guess names.
Start with text-only chat. Add vision, tools, or web search after the base request works.
Coding agents and IDE assistants
Claude CodeAnthropic-compatible endpoint for Claude-style coding workflows.
- Set the endpoint and token in the terminal that launches Claude Code.
- Set
ANTHROPIC_MODELto an enabled GlideAPI model ID. - Restart Claude Code, then test with a short repository task.
export ANTHROPIC_BASE_URL="https://glideapi.dev"
export ANTHROPIC_AUTH_TOKEN="YOUR_GLIDE_KEY"
export ANTHROPIC_MODEL="YOUR_MODEL_ID"
claudeCodex CLIResponses-compatible custom provider for plain model calls.
- Create a custom provider in your Codex
config.toml. - Point it at GlideAPI’s
/v1base URL and select a Responses-compatible model. - Use local tools normally; OpenAI-hosted tools are not supplied by GlideAPI.
model_provider = "glideapi"
[model_providers.glideapi]
base_url = "https://glideapi.dev/v1"
env_key = "GLIDE_API_KEY"
wire_api = "responses"Cline, Roo Code, Kilo CodeVS Code coding agents using an OpenAI-compatible provider.
- Open the extension’s provider settings.
- Select OpenAI Compatible or OpenAI with a custom base URL.
- Enter the base URL, API key, and a live model ID.
Base URL: https://glideapi.dev/v1
API key: YOUR_GLIDE_KEY
Model: YOUR_MODEL_IDCursor and WindsurfUse only when your version exposes a custom OpenAI-compatible provider.
- Open model/provider settings and add a custom OpenAI endpoint.
- Paste the endpoint, key, and model ID.
- If your plan or version does not expose a custom endpoint field, it cannot be routed through GlideAPI.
Endpoint: https://glideapi.dev/v1
Authorization: Bearer YOUR_GLIDE_KEY
Model: YOUR_MODEL_IDContinue, Aider, OpenCodeOpenAI-compatible developer tools and terminal agents.
- Choose the OpenAI provider in the tool’s config.
- Set the API base/base URL to GlideAPI.
- Set your key and exact model ID; keep the key out of source control.
OPENAI_API_BASE=https://glideapi.dev/v1
OPENAI_API_KEY=YOUR_GLIDE_KEY
# Then select YOUR_MODEL_ID in the tool config.GitHub Copilot and fixed-provider agentsCompatibility check before setup.
Some products use only their own hosted model service and do not expose a custom OpenAI or Anthropic endpoint. Those products cannot be pointed at GlideAPI unless their specific version adds a custom-provider setting.
Chat UIs and internal apps
Open WebUI, LibreChat, LobeChatHosted chat frontends with an OpenAI-compatible connection.
- Add a new OpenAI connection in Admin/Provider settings.
- Set API base to GlideAPI and save the key as a server secret.
- Refresh models, then select an enabled model.
API base: https://glideapi.dev/v1
API key: YOUR_GLIDE_KEYNextChat, Chatbox, AnythingLLMDesktop or self-hosted chat applications.
- Choose OpenAI-compatible or Custom OpenAI in settings.
- Paste the base URL and key.
- Use a live model ID and send a one-message test.
https://glideapi.dev/v1
YOUR_GLIDE_KEY
YOUR_MODEL_IDFrameworks and automation
OpenAI SDK, LangChain, Vercel AI SDKUse an OpenAI-compatible base URL in code.
Set the SDK’s base URL to https://glideapi.dev/v1, provide a GlideAPI key, and pass an enabled model ID. Use Chat Completions for widest compatibility or Responses where your SDK supports it.
baseURL: "https://glideapi.dev/v1"
apiKey: process.env.GLIDE_API_KEY
model: "YOUR_MODEL_ID"Dify, Flowise, n8nLow-code workflows and application builders.
- Create an OpenAI-compatible credential/connection.
- Set the API base and key as a platform secret.
- Select a model returned by
/v1/models.
Base URL: https://glideapi.dev/v1
API key: YOUR_GLIDE_KEY
Model: YOUR_MODEL_IDUse the shape your client already speaks
Every route below uses the same API key and routes to the selected enabled model.
OpenAI Chat Completions
Best default for OpenAI-compatible SDKs and most chat integrations.
OpenAI Responses
Modern OpenAI request shape with input items, function tools, structured output, optional storage, and continuation.
Anthropic Messages
Anthropic-style messages, system prompts, content blocks, tool use, and event streaming.
Account and discovery
Retrieve live model metadata, balance, usage, costs, and per-model/per-key summaries.
Chat Completions
The broadest compatibility surface. Send standard chat messages, then use tools, vision, JSON output, and SSE when the chosen model supports them.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_GLIDE_KEY",
base_url="https://glideapi.dev/v1"
)
reply = client.chat.completions.create(
model="YOUR_MODEL_ID",
messages=[{"role":"user", "content":"Say hello"}],
temperature=0.2
)
print(reply.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.GLIDE_API_KEY,
baseURL: "https://glideapi.dev/v1"
});
const reply = await client.chat.completions.create({
model: "YOUR_MODEL_ID",
messages: [{ role: "user", content: "Say hello" }]
});| Parameter | Use |
|---|---|
model | Required. An ID returned by /v1/models. |
messages | Required. Standard system, user, assistant, and tool messages. |
temperature, top_p | Sampling controls. Temperature is 0–2; top_p is 0–1. |
max_tokens or max_completion_tokens | Requested output ceiling. |
stream | Set true for Server-Sent Events. |
tools, tool_choice | Function tool declarations and selection. |
response_format | JSON object/schema output where the provider supports it. |
Responses API
Use OpenAI’s Responses request shape when your app uses input, instructions, function-call output items, structured text, or optional persistent response state.
curl https://glideapi.dev/v1/responses \
-H "Authorization: Bearer YOUR_GLIDE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"instructions": "Be concise.",
"input": "Explain event loops.",
"max_output_tokens": 220
}'response = client.responses.create(
model="YOUR_MODEL_ID",
input=[{
"role": "user",
"content": [{"type":"input_text", "text":"Summarize this."}]
}],
text={"format": {"type": "json_object"}}
)| Supported request fields | Notes |
|---|---|
input, instructions | String or supported input item arrays. Text and image inputs are accepted. |
tools, tool_choice | Function tools only. Your application executes the function and sends its result back in a later request. |
reasoning.effort, text.verbosity | Forwarded when the selected provider supports the related control. |
text.format | text, json_object, and json_schema map to structured output. |
stream | Returns typed Responses SSE events. |
web_search Responses tool for current public web results. Computer use, code interpreter, file search, image generation, background mode, and file-ID uploads are not hosted by GlideAPI. Function tools work when your own client executes the tool.Web search
Add web_search to a Responses request when the model needs current public information. GlideAPI searches the web before the model runs and returns the sources with the response.
curl https://glideapi.dev/v1/responses \
-H "Authorization: Bearer $GLIDE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-enabled-model",
"input": "What changed in AI this week?",
"tools": [{
"type": "web_search",
"max_num_results": 5
}]
}'{
"tools": [{
"type": "web_search",
"max_num_results": 5,
"filters": {
"allowed_domains": ["openai.com"]
}
}]
}| Field | Use |
|---|---|
type | Set to web_search (or web_search_preview for compatibility). |
max_num_results | Optional, 1–8; defaults to 5. |
filters.allowed_domains | Optional allow-list of up to 20 domains. |
web_search_call output item; cite the returned source URLs when using their information.Messages API
Use Claude/Anthropic-style requests with system prompts, message content blocks, image blocks, tool use, tool results, and compatible streaming events.
curl https://glideapi.dev/v1/messages \
-H "x-api-key: YOUR_GLIDE_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model":"YOUR_MODEL_ID",
"max_tokens":256,
"messages":[{"role":"user","content":"Explain event loops."}]
}'import anthropic
client = anthropic.Anthropic(
api_key="YOUR_GLIDE_KEY",
base_url="https://glideapi.dev"
)
message = client.messages.create(
model="YOUR_MODEL_ID",
max_tokens=256,
messages=[{"role":"user", "content":"Hello"}]
)Use either x-api-key or Authorization: Bearer. Set stream: true to receive Anthropic-style message, content-block, delta, and message_stop events.
Function tools and vision inputs
Availability is model-dependent. Check the supports_tool_calling and supports_image_input fields in /v1/models before enabling either capability.
{
"tools": [{
"type": "function",
"function": {
"name": "lookup_weather",
"description": "Get local weather",
"parameters": {
"type": "object",
"properties": {"city":{"type":"string"}},
"required": ["city"]
}
}
}],
"tool_choice": "auto"
}{
"messages": [{
"role": "user",
"content": [
{"type":"text", "text":"Describe this image."},
{"type":"image_url", "image_url": {
"url":"https://example.com/photo.png"
}}
]
}]
}Tool execution loop
- Send a request with your function definitions.
- When the model returns a tool call, execute it in your application.
- Send the result back as a tool message (or a Responses
function_call_outputitem). - Ask the model to produce the final answer.
Streaming and request tracing
Set stream: true. Responses are delivered over Server-Sent Events, so use an SSE-capable client and keep the connection open until the final event.
| API | Stream format | Final event |
|---|---|---|
| Chat Completions | OpenAI chunk objects | [DONE] |
| Responses | Typed Responses events | response.completed |
| Anthropic Messages | Anthropic message/content/delta events | message_stop |
X-Request-Id. Save this value with your application logs; it identifies the request without requiring you to share prompt content.Stored responses and conversations
Responses are not stored by default. Set store: true to save a response, or pass a conversation ID to persist and continue a conversation.
curl https://glideapi.dev/v1/conversations \
-H "Authorization: Bearer YOUR_GLIDE_KEY" \
-H "Content-Type: application/json" \
-d '{"metadata":{"project":"support-bot"}}'{
"model": "YOUR_MODEL_ID",
"previous_response_id": "resp_...",
"input": "Now make it shorter.",
"store": true
}| Route | Purpose |
|---|---|
POST /v1/conversations | Create a conversation with optional metadata. |
GET /v1/conversations/{id} | Read its metadata and stored response IDs. |
DELETE /v1/conversations/{id} | Delete the conversation and its state. |
GET /v1/responses/{id} | Retrieve a response stored by the same API-key owner. |
DELETE /v1/responses/{id} | Delete a stored response. |
Stored records are scoped to the API-key owner. Use either previous_response_id or conversation for a request, not both.
Models, live rates, balance, and usage
Use discovery endpoints instead of copying model catalogs or prices into your app. The returned model list is the authoritative enabled list for your account.
{
"object": "list",
"data": [{
"id": "YOUR_MODEL_ID",
"supports_image_input": true,
"supports_tool_calling": true,
"pricing": {
"input": 0.00,
"output": 0.00,
"currency": "usd",
"label": "Per 1M tokens"
}
}]
}/v1/me
/v1/balance
/v1/usage?period=30d
/v1/usage/logs?limit=100
/v1/usage/summary?period=7d
/v1/usage/costs?period=30d
/v1/usage/models?period=30d
/v1/usage/keys?period=30d
/v1/billing/history?limit=100Usage filters accept period (24h, 7d, 30d, 90d), start_time, end_time, model, key_id, endpoint, and limit where applicable.
Errors, limits, and privacy
Errors use JSON with a stable error object. Handle status codes in your client and record the request ID for troubleshooting.
{
"error": {
"message": "Insufficient balance. Please add credits to continue.",
"type": "payment_required"
}
}400 Invalid or unsupported request field
401 Invalid or missing API key
402 Insufficient balance
404 Unknown endpoint or stored resource
429 Rate limited; retry with backoff
5xx Upstream or service failure; retry safelyRequest privacy
Normal requests are not persisted by GlideAPI. Operational metadata such as timestamps, selected model, token counts, status, cost, balance changes, and error metadata may be kept for account operation. When you choose store: true or use a conversation, the associated response state is stored until you delete it. Read the Privacy Policy for the full policy.