# Quickstart

> Create a DigitSpace API key and send your first request with curl, the OpenAI SDK or the Anthropic SDK. Two minutes, no new library.

Source: https://digitspace.ai/docs/quickstart · Last checked: 2026-10-31

## 1. Create an account and a key

[Sign up](https://digitspace.ai/signup) and verify your email. The welcome screen creates your first API key and shows it once, so copy it then. You can create more keys at any time under **API keys** in the dashboard.

Keep the key on your server, in an environment variable:

```bash
export DIGITSPACE_API_KEY="your-key"
```

> **Warning:** Never put a key in a browser, a mobile app or a public repository. Anyone who has it can spend your credits. If one leaks, open **API keys**, choose **Roll secret**, and the old secret stops working at once.

## 2. Pay for requests

Requests run on **credits** or on **your own provider keys**.

- **Credits:** top up from $10 under **Billing**. You pay each provider's price for the tokens you use, plus a 5% fee on each top-up.
- **Your own keys:** add an OpenAI, Anthropic, Google or other key under **Provider keys**. The provider bills you directly and DigitSpace charges nothing for those requests.

[Credits or your own keys](/docs/concepts#credits-or-your-own-keys) explains how a project chooses between them.

## 3. Send a request

Send `"model": "auto"` and DigitSpace picks a model that can handle the request at the lowest price for the project's quality level. Or name a model, such as `gpt-6-luna`; the [models page](/models) lists every ID.

curl:

```bash
curl https://api.digitspace.ai/v1/chat/completions \
  -H "Authorization: Bearer $DIGITSPACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{ "role": "user", "content": "Say hello in three languages." }]
  }'
```

Python:

```python
# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DIGITSPACE_API_KEY"],
    base_url="https://api.digitspace.ai/v1",
)

reply = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Say hello in three languages."}],
)
print(reply.choices[0].message.content)
```

TypeScript:

```ts
// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.DIGITSPACE_API_KEY,
  baseURL: "https://api.digitspace.ai/v1",
});

const reply = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Say hello in three languages." }],
});
console.log(reply.choices[0].message.content);
```

Anthropic SDK:

```python
# pip install anthropic
import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ["DIGITSPACE_API_KEY"],
    base_url="https://api.digitspace.ai",
)

message = client.messages.create(
    model="auto",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Say hello in three languages."}],
)
print(message.content[0].text)
```

The answer comes back in the format you sent. Its `model` field repeats what you asked for (`auto` here). The `x-digitspace-provider` response header names the provider that answered.

## 4. See what happened

Open **Activity** in the dashboard. Each request shows the model and provider that served it, the tokens, how long it took and what it cost. Open one to see why that provider was chosen and which others were considered.

## Next

- [Key concepts](/docs/concepts): organisations, projects and keys.
- [Streaming](/docs/api/streaming): show the answer as it's written.
- [Choosing a model](/docs/routing/models): pin a model or a provider.
- [Errors](/docs/reference/errors): what can go wrong and what to do.
