> ## Documentation Index
> Fetch the complete documentation index at: https://docs.niteshift.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Model access and billing

> Give Claude Code and Codex model access with API keys, or bill Claude usage to your company's Claude organization.

Every task runs Claude Code or Codex. Each agent needs model access. Niteshift uses credentials you
provide. Model usage is billed to your Anthropic or OpenAI account.

Members add their own credentials in **Settings → Connections → Model providers**. Organization
admins add shared credentials in **Settings → Members**, under **Shared keys**. A member's own
credentials always come first. Shared credentials are used for members who have none of their own,
while **Use as fallback** is on.

## Claude Code

### API key

Add an Anthropic API key as your own credential, or as the shared key on the **Claude** card.
Anthropic bills the account that owns the key.

### Organization billing

An organization admin can link your company's Claude organization to Niteshift. Claude usage from
Niteshift tasks is then billed to that Claude organization, under its existing account with
Anthropic.

#### Link your Claude organization

**1. Open the Claude card**

In **Settings → Members**, find the Claude card under **Shared keys**. Only Niteshift
organization admins can link.

**2. Link**

Click **Link your Claude organization** and approve the request in the Claude window that opens.
The person approving must be an Owner, Admin, or Billing admin of the Claude organization.
Anthropic must bill that organization directly. A Claude organization billed through a cloud
marketplace can't link.

**3. Turn on Use as fallback**

The card shows **Linked**. Turn on **Use as fallback** so members without their own credentials
use the link. Until it's on, only the organization's service accounts use it.

The link belongs to the whole Niteshift organization. Any Niteshift organization admin can relink or
unlink it. A Claude organization can be linked to only one Niteshift organization at a time.

#### Using the shared key or the link

The Claude card holds one organization credential: a shared Anthropic key or a linked Claude
organization. To link, remove the shared key first. To add a shared key, unlink first. Members' own
Claude credentials take priority over the link.

#### Unlink

Unlink from the Claude card's menu in Niteshift, or from
[Linked platforms](https://platform.claude.com/linked-platforms) in the Claude Console. Unlinking in
Niteshift also ends the link at Anthropic. If Niteshift can't reach Anthropic, it stops billing the
organization and asks you to finish in Linked platforms. Anthropic emails the Claude organization's
admins when a link ends.

#### Problems

The Claude card shows the link's status. Tasks that can't bill stop with Anthropic's billing error.

| Status | What to do |
| - | - |
| **Spend limit reached** | Check the spend limits for Niteshift in Linked platforms. |
| **Billing unavailable** | Check the Claude organization's balance and account in Linked platforms. |
| **Not linked** | The Claude organization no longer allows billing through Niteshift. Click **Relink**. |
| **Relink required** | The link expired or was ended at Anthropic. Click **Relink**. |
| **Link expires** *(date)* | Links last up to a year. The card shows this about two weeks before expiry. Click **Relink** to renew it. |

#### Anthropic's terms for linked usage

Anthropic decides how linked usage is billed and handled. As of this writing:

* Claude promotional credits may not apply to linked usage. Keep a paid balance on the Claude
  organization.
* Claude organization settings such as a BAA, customer-managed encryption keys, and custom data
  retention may not apply to usage billed through the link. Check with Anthropic before relying on
  them.

## Codex

Add an OpenAI API key as your own credential, or as the shared key on the **Codex** card. OpenAI
bills the account that owns the key. OpenAI has no organization billing link.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.