Galactre
USD

Choose how catalog prices and estimates appear. Checkout and account records remain in IDR.

Open Chat

GALACTRE / API ACCESS

The right access.
For the way you build.

Explore Galactre as a guest, use your account or understand what another application needs. Keep identity, permissions and credentials clear from the first request.

GT LunarStatus unavailable
Guest chatEnabled in configuration
Server API keysSelf-service not available

Configuration is checked when this page loads. Access, quota and service health are checked again when you send a request.

01 / THREE DIFFERENT BOUNDARIES

Choose how you connect.

A public conversation, an account session and a server integration have different requirements. Select a path to see what applies.

A first conversation, without an account.

Use a limited GT Lunar conversation in the same browser. No API key is required. The service creates an eligible guest session and enforces its configured allowance.

Open guest chat
  1. 01

    Use a page on the Galactre origin with same-origin credentials.

  2. 02

    Read chat_available, guest, limits and csrf_token from the session endpoint.

  3. 03

    Use Lunar and honor the message length, reset and expiry returned for that session.

  4. 04

    Supply only relevant text you are authorized to share. Guest access grants no private workspace or billing permissions.

Guest availability is checked at request time. A public catalog does not guarantee a session has remaining quota.

02 / PERMISSION BOUNDARIES

Authentication is a start.
Authorization is specific.

Access follows the current identity, operation and service policy. A valid session or a known model ID does not grant every permission.

Current public chat and workspace access
CapabilityGuestSigned-in accountWhat to check
Read model catalogPublicPublicAvailability and published specifications; no execution permission.
Generate textLunar, within limitsPermitted available modelsSession, CSRF, model availability and service policy are checked.
Read or delete historyOwn guest sessionOwn accountConversation IDs do not bypass ownership checks.
Credits and invoicesSign-in requiredAuthenticated billingCredit purchases do not unlock unavailable model capabilities.
Administrative configurationNo accessSeparate authorizationAn ordinary account session does not grant administrator permissions.
Knowledge and bounded toolsSign-in requiredSelected sources and toolsCalculator, current time and authorized private text retrieval; files, shell and deployments are not released.

This matrix describes the current release. Server API key issuance is not a third active access tier.

03 / SET UP A BROWSER SESSION

Discover access
before sending a message.

The example reads session state from Galactre. Copying it does not run it, send a message, create an API key or make a purchase.

  1. 01

    Stay on the Galactre origin

    Use the origin serving your Galactre page. Production traffic requires HTTPS. Relative /api/v1 paths keep the request with that service.

  2. 02

    Discover current access

    Read the session endpoint with same-origin credentials. Inspect chat_available and authenticated/guest instead of inferring access from a cached UI label.

  3. 03

    Protect the mutation

    Use the returned csrf_token in X-CSRF-Token for POST requests. Keep it in memory and out of URLs, analytics, logs and public examples.

  4. 04

    Recheck after a change

    Refresh session state after sign-in, expiry or an access error. A token from an earlier session should not be reused blindly.

JAVASCRIPT / SAME-ORIGIN SESSION DISCOVERY
// Run only on a page served by Galactre. Calling this reads session state.
async function discoverGalactreAccess() {
  const response = await fetch('/api/v1/chat/session', {
    credentials: 'same-origin', cache: 'no-store'
  });
  const session = await response.json();
  if (!response.ok || !session.chat_available || !session.csrf_token) {
    throw new Error('GT chat is temporarily unavailable.');
  }
  // Keep this value in memory. Never print it or put it in a URL.
  return {
    authenticated: session.authenticated,
    guest: session.guest,
    limits: session.limits,
    mutationHeaders: { 'X-CSRF-Token': session.csrf_token }
  };
}
// This example does not send a message or purchase credits.

04 / CREDENTIALS ARE NOT INTERCHANGEABLE

Understand each reference.

Keep secrets in their intended boundary. Public snippets, URLs and model prompts should never contain real credentials.

Server credential

API key

An expiring, model-scoped credential for server integrations. Create, rotate or revoke your keys in this page after signing in. Plaintext appears once; a model ID alone does not grant access.

Browser identity

Session cookie

The browser carries its server-managed session with same-origin requests. Keep it out of application configuration and shared scripts. Its presence alone does not prove model or billing access.

Mutation protection

CSRF token

A session-bound value sent in X-CSRF-Token. It is not a provider credential, long-lived API key or permission to access another identity. Renew session state when the check fails.

Owned resource reference

Conversation ID

Identifies saved chat history. Every read, continuation and deletion still checks ownership. Treat IDs and saved text as private to their current guest/account context.

05 / ACCESS TROUBLESHOOTING

Find the boundary.
Resolve the right issue.

Reading the error is more useful than repeatedly resubmitting. Preserve any unsent draft and distinguish denied access from an uncertain execution.

HTTP errors and retry guidance
I can read models but cannot send a message

The model catalog is public. Generation additionally requires an eligible session, a current CSRF token, an available permitted model and remaining allowance. Check the session response and actual error.

I signed in but a guest conversation disappeared

Account and guest histories are separate. A guest conversation belongs to its original browser session and expiry. Signing in does not automatically move it into account history.

The API says unauthorized or forbidden

Check the operation: billing requires login, administration requires separate authorization and guest chat is restricted. Refresh the session through the normal flow and inspect the response rather than swapping credentials.

The CSRF/session check failed

Fetch current session state from the Galactre origin with same-origin credentials. Reuse its current CSRF token only with that session. Inspect any earlier generation outcome before resending.

My request is rate limited

Respect Retry-After and the reported reset. Limits may apply to the session, IP and public service together. Creating another local label or refreshing the page does not grant additional allowance.

A different website cannot reuse this example

The example is intentionally a same-origin browser contract. Do not bypass cookie, origin or CSRF protections. Another backend uses an expiring server key from API Access with the separate responses endpoint.

06 / QUESTIONS, ANSWERED

Clear access.
Predictable integration.

Does choosing an exact version change my access?

No. Family defaults and exact release IDs use the same session, CSRF, allowance and permission checks. Guest access remains limited to available Lunar releases. A pinned ID never substitutes for authorization; retired or suspended releases are unavailable.

Do I need an API key to use GT Chat?

No browser API key is needed for eligible guest or signed-in chat. The browser uses a server session and CSRF protection. Guest chat has separate limits and currently supports Lunar.

Can I generate a server API key on this page?

Yes, after signing in. Create expiring keys for selected GT families, copy each key once, then rotate or revoke it from API Access. Fresh IAMC authorization and your account balance are checked for server requests.

Does a Galactre account give me administrator access?

No. Account authentication and administrative authorization are separate. Your account can only use operations permitted by its current service policy and ownership.

Does buying credits change access permissions?

No. A verified purchase records credit according to billing policy. It does not bypass session checks, grant administrative permissions or enable planned models and tools.

Can I safely publish the session example?

The example contains no credentials. Do not add real cookies, tokens, private conversation IDs or user messages to a public snippet. Copying the example does not run it.

Where can I find the complete request format?

The Developers page documents the current routes, fields, completed responses, history operations, errors and limits. Quickstart provides first prompts and a copyable generation example.

YOUR NEXT STEP

Explore Galactre.
Build on a clear contract.