Skip to main content

Quickstart

By the end of this page you'll have made a real, traced LLM call that renders a prompt you authored and routes through a provider of your choice. It takes about ten minutes.

1. Create your account

Open the web app and sign up. You get a personal team (workspace) immediately — no separate "create team" step.

AcruxCore sign-up screen

2. Create an API key

Go to Account & keys and click New key. Copy the key now — it's shown only once. This is what the SDK and your curl calls authenticate with.

Account & keys page with a personal API key

Set two environment variables you'll reuse everywhere:

export ACRUXCORE_API_KEY="<paste your key>"
# Hosted: https://api.acruxcore.com/api/v1 · Local dev: http://localhost:3001/api/v1
export ACRUXCORE_BASE_URL="https://api.acruxcore.com/api/v1"

3. Register a model

The gateway needs one credential (a provider key) and one model (a public name pointing at it). In the web app:

  1. Gateway → Credentials → New credential. Pick your provider — this guide uses OpenAI-compatible with the base URL https://openrouter.ai/api/v1 and an OpenRouter key. Paste the key; it's encrypted at rest and never shown again.
  2. Gateway → Models → New model. Set Public name to support-model, pick the credential, and set Upstream model to openai/gpt-4o-mini.

Callers now send model: "support-model"; the upstream id can change later without breaking them. (The gateway guide covers this in detail.)

4. Author a prompt

Prompts → New prompt. Name it support-reply. Add a system message and a user message, using {{ variables }} where the input goes:

Prompt editor with system and user messages

See the raw prompt template
system: You are a friendly, concise customer-support agent for {{ company }}.
Reply warmly and help the customer resolve their issue in 2-3 sentences.
user: {{ customer_message }}

Click Commit new version — the first commit auto-creates the production and staging aliases pointing at v1. (See Version a prompt for the full lifecycle.)

5. Make your first call

Now put the three pieces together: the prompt you authored, filled with real values, sent to support-model through the gateway. The gateway routes the call, prices it, and records a trace whichever way you call it. curl names the prompt and lets the gateway render it server-side — one request does everything. The SDKs render first, so your code can read or extend the messages before they go out.

curl -X POST "$ACRUXCORE_BASE_URL/gateway/chat/completions" \
-H "Authorization: Bearer $ACRUXCORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "support-model",
"prompt": {
"name": "support-reply",
"alias": "production",
"variables": {
"company": "Acme",
"customer_message": "My order #123 has not arrived yet."
}
}
}'

The response is OpenAI-shaped, so the endpoint drops into anything that already speaks OpenAI — including the official openai client, pointed at ACRUXCORE_BASE_URL + "/gateway" (the gateway guide shows that). The SDKs hand you the same payload with the text pulled out on content.

{
"id": "gen-...",
"model": "openai/gpt-4o-mini",
"object": "chat.completion",
"choices": [
{ "index": 0, "message": { "role": "assistant", "content": "I'm sorry to hear that your order hasn't arrived yet! ..." }, "finish_reason": "stop" }
],
"usage": { "prompt_tokens": 57, "completion_tokens": 32, "total_tokens": 89 }
}
The render cache

Both SDKs cache a render for 60 seconds, keyed by prompt name, alias and the variables you passed — so rendering the same prompt with a new question always re-renders, and only an identical repeat is served from memory. Change the window with cacheTtl / cache_ttl (milliseconds), or pass 0 to switch caching off entirely. The curl path renders server-side and has no client cache.

6. See it in Traces

Open Observability → Traces. Your call is at the top — click it to see the model, token counts, latency, and status. That's the full loop: a versioned prompt, routed through the gateway, recorded as a trace.

More of the SDK

Rendering a prompt and completing it are the two calls most apps need first. Both SDKs — @acruxcoreai/sdk for Node and acruxcore for Python — cover the rest of the platform, with the same method names in each language's style:

  • Streaming — call hub.gateway.stream() (Node) / hub.gateway.stream() (Python) and iterate the response token by token instead of awaiting it whole.
  • Tool-calling loop — declare a tool with acrux.tool and hand it to hub.gateway.runToolLoop / hub.gateway.run_tool_loop. The loop syncs the tool into the catalog, calls the model, runs your function, and repeats until the model stops asking. A catalog tool with an http executor runs on the platform instead, with no local code at all. Either way the whole run is one trace. See Build and attach a tool.
  • Read traces backhub.traces.get() / hub.traces.list() pull a trace's full span tree or a filtered list, without leaving your app.
  • Feedbackhub.traces.submit_feedback() / submitFeedback() and update_feedback() / updateFeedback() attach a rating, label, or comment to a trace or a single span.

See Chat, stream, and collect feedback with the SDK for all of it worked through end to end.

Where to next