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

> ## Agent Instructions
> The Deepshi API is an OpenAI-compatible gateway. Base URL: https://api.deepshi.ai/v1. API keys start with sk-bf- and go in the Authorization: Bearer header. Prefer the official OpenAI SDKs pointed at the Deepshi base URL. Model ids are clean with no provider prefix (e.g. deepshi-3.0, claude-opus-4.8, gpt-5.5). Chat and image requests are synchronous; video and music requests are asynchronous job APIs (create, then poll). Every synchronous response carries usage.cost.total_cost in USD. Do not reference the internal /api/* admin plane or virtual keys.

# Quickstart

> Go from zero to your first completion in a few minutes.

This guide takes you from a fresh account to your first response from the Deepshi API.

## Prerequisites

* A [Deepshi account](https://deepshi.ai/) with credits.
* An API key (you'll create one below).
* `curl`, or Python / Node.js if you prefer an SDK.

## 1. Create an API key

1. Sign in at [deepshi.ai](https://deepshi.ai/).
2. Open the **API keys** section of your dashboard.
3. Click **Create key**, give it a name, and copy the value.

Your key is shown **only once**, so store it somewhere safe. See [Authentication](/get-started/authentication) for details.

<Warning>
  Treat your key like a password. Anyone with it can spend your credits. Never
  commit it to source control or expose it in client-side code.
</Warning>

## 2. Make your first call

The API is OpenAI-compatible. The base URL is `https://api.deepshi.ai/v1` and you authenticate with a bearer token.

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.deepshi.ai/v1/chat/completions \
    -H "Authorization: Bearer $DEEPSHI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "deepshi-3.0",
      "messages": [
        { "role": "user", "content": "Say hello in one sentence." }
      ]
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.deepshi.ai/v1",
      api_key="YOUR_DEEPSHI_API_KEY",  # your Deepshi key
  )

  resp = client.chat.completions.create(
      model="deepshi-3.0",
      messages=[{"role": "user", "content": "Say hello in one sentence."}],
  )

  print(resp.choices[0].message.content)
  ```

  ```javascript JavaScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "https://api.deepshi.ai/v1",
    apiKey: process.env.DEEPSHI_API_KEY, // your Deepshi key
  });

  const resp = await client.chat.completions.create({
    model: "deepshi-3.0",
    messages: [{ role: "user", content: "Say hello in one sentence." }],
  });

  console.log(resp.choices[0].message.content);
  ```
</CodeGroup>

You'll get back a standard OpenAI chat completion object:

```json theme={null}
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1748000000,
  "model": "deepshi-3.0",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Hello there!" },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 4,
    "total_tokens": 16,
    "cost": { "total_cost": 0.000018 }
  }
}
```

The `usage.cost.total_cost` field is the exact USD amount this request deducted from your balance. See [Credits & billing](/get-started/pricing-credits).

## 3. Pick a model

Swap the `model` field to call any model in the catalog: Deepshi's own models for highly uncensored responses, or a frontier model from a provider like OpenAI or Anthropic. The catalog covers text, image, video, and music models. See [Models](/models/overview) for the full list, and fetch the live catalog any time:

```bash theme={null}
curl https://api.deepshi.ai/v1/models \
  -H "Authorization: Bearer $DEEPSHI_API_KEY"
```

## Next steps

<CardGroup cols={2}>
  <Card title="Stream responses" icon="bolt" href="/capabilities/text-and-chat#streaming">
    Render tokens as they're generated.
  </Card>

  <Card title="Call tools" icon="wrench" href="/capabilities/tool-calling">
    Let the model call your functions.
  </Card>

  <Card title="Reasoning" icon="brain" href="/capabilities/reasoning">
    Use models that think before they answer.
  </Card>

  <Card title="Generate images" icon="image" href="/capabilities/image-generation">
    Create images from a text prompt.
  </Card>

  <Card title="Handle errors" icon="triangle-exclamation" href="/resources/errors">
    Understand status codes and retries.
  </Card>
</CardGroup>
