# Aftercore — Client setup and compatibility

Observed: 2026-09-14T02:36:51.333Z. This document describes the current Aftercore deployment. Prices and public supply below come from its backend.

OpenAI clients use https://aftercore.io/v1; native Anthropic clients use https://aftercore.io. Authentication is an application key in Authorization: Bearer or native x-api-key. Never supply keys in URLs. Gemini, benefits endpoints and unverified transports remain unavailable.

Each example sends an Idempotency-Key and the observed X-Aftercore-Price-Version. A changed tariff rejects before spending is reserved. Set AFTERCORE_REQUEST_ID to retain an identity while investigating a failure; a recorded identity returns 409 rather than replaying a response. Every fresh identity can create a new charge.

Optional AFTERCORE_SESSION adds X-Aftercore-Session for the same eligible seat under this key/model/scope. It expires after 30 idle minutes; rotation preserves it. A pinned ineligible seat fails before dispatch. This is routing affinity, not provider conversation storage: send full context each time.

## claude-haiku-4-5-20251001

1 eligible public sources at this observation. The following is a generated template; it does not establish client acceptance by itself. Keep automatic retries disabled.

```javascript
// Each run purchases a new request unless you reuse AFTERCORE_REQUEST_ID. Inspect Usage before retrying.
import { randomUUID } from 'node:crypto';
import Anthropic from '@anthropic-ai/sdk';
const headers = { 'Idempotency-Key': process.env.AFTERCORE_REQUEST_ID || randomUUID(), 'X-Aftercore-Price-Version': "bdaabb79-1def-47b5-be99-60d94413bc40", ...(process.env.AFTERCORE_SESSION ? { 'X-Aftercore-Session': process.env.AFTERCORE_SESSION } : {}) };
const client = new Anthropic({ apiKey: process.env.AFTERCORE_API_KEY, baseURL: "https://aftercore.io", maxRetries: 0 });
const stream = await client.messages.create({
  "model": "claude-haiku-4-5-20251001",
  "max_tokens": 32,
  "stream": true,
  "messages": [
    {
      "role": "user",
      "content": "Say hello in one short sentence."
    }
  ]
}, { headers });
for await (const event of stream) {
  if (event.type === 'content_block_delta' && event.delta.type === 'text_delta') process.stdout.write(event.delta.text);
}
```

Downloads: [Node](https://aftercore.io/api/client-config?model=claude-haiku-4-5-20251001&protocol=messages&language=node), [Python](https://aftercore.io/api/client-config?model=claude-haiku-4-5-20251001&protocol=messages&language=python), [bash](https://aftercore.io/api/client-config?model=claude-haiku-4-5-20251001&protocol=messages&language=curl).

## gpt-5.6-sol

0 eligible public sources at this observation. The following is a generated template; it does not establish client acceptance by itself. Keep automatic retries disabled.

```javascript
// Each run purchases a new request unless you reuse AFTERCORE_REQUEST_ID. Inspect Usage before retrying.
import { randomUUID } from 'node:crypto';
import OpenAI from 'openai';
const headers = { 'Idempotency-Key': process.env.AFTERCORE_REQUEST_ID || randomUUID(), 'X-Aftercore-Price-Version': "1f23ae48-a4a4-4ff8-bf61-cc5c8f5120fa", ...(process.env.AFTERCORE_SESSION ? { 'X-Aftercore-Session': process.env.AFTERCORE_SESSION } : {}) };
const client = new OpenAI({ apiKey: process.env.AFTERCORE_API_KEY, baseURL: "https://aftercore.io/v1", maxRetries: 0 });
const stream = await client.responses.create({
  "model": "gpt-5.6-sol",
  "stream": true,
  "store": false,
  "max_output_tokens": 32,
  "input": "Say hello in one short sentence."
}, { headers });
for await (const event of stream) {
  if (event.type === 'response.output_text.delta') process.stdout.write(event.delta);
}
```

Downloads: [Node](https://aftercore.io/api/client-config?model=gpt-5.6-sol&protocol=responses&language=node), [Python](https://aftercore.io/api/client-config?model=gpt-5.6-sol&protocol=responses&language=python), [bash](https://aftercore.io/api/client-config?model=gpt-5.6-sol&protocol=responses&language=curl).

## grok-4.6

0 eligible public sources at this observation. The following is a generated template; it does not establish client acceptance by itself. Keep automatic retries disabled.

```javascript
// Each run purchases a new request unless you reuse AFTERCORE_REQUEST_ID. Inspect Usage before retrying.
import { randomUUID } from 'node:crypto';
import OpenAI from 'openai';
const headers = { 'Idempotency-Key': process.env.AFTERCORE_REQUEST_ID || randomUUID(), 'X-Aftercore-Price-Version': "54ac8163-7f8b-4c48-a9bf-72bf8d9b5465", ...(process.env.AFTERCORE_SESSION ? { 'X-Aftercore-Session': process.env.AFTERCORE_SESSION } : {}) };
const client = new OpenAI({ apiKey: process.env.AFTERCORE_API_KEY, baseURL: "https://aftercore.io/v1", maxRetries: 0 });
const stream = await client.responses.create({
  "model": "grok-4.6",
  "stream": true,
  "store": false,
  "max_output_tokens": 32,
  "input": "Say hello in one short sentence."
}, { headers });
for await (const event of stream) {
  if (event.type === 'response.output_text.delta') process.stdout.write(event.delta);
}
```

Downloads: [Node](https://aftercore.io/api/client-config?model=grok-4.6&protocol=responses&language=node), [Python](https://aftercore.io/api/client-config?model=grok-4.6&protocol=responses&language=python), [bash](https://aftercore.io/api/client-config?model=grok-4.6&protocol=responses&language=curl).
