MorseSign inOpen Morse

DeepSeek API key, how to get one and call every DeepSeek model with it

The Morse teamPublished Facts checked 6 min read

A DeepSeek API key is the secret your code sends with each request so a server will run a DeepSeek model for you and bill the right account. DeepSeek issues keys for its own platform, and its API docs explain how to apply for one.

The same DeepSeek models also run on a Morse key: one key starting with sk_morse_ reaches every DeepSeek model in the catalog, abliterated builds included, through an OpenAI-compatible API at https://inference.trymorse.ai/v1. You make it in the console, keep it in an environment variable, and pass a DeepSeek model id. This guide covers the Morse route. We followed the steps in Morse's API docs and ran the call below on December 3, 2026.

How does a DeepSeek API key work?

The key rides in the Authorization header of every request as a Bearer token. The server reads it, checks it belongs to a live account, runs the model named in the body, and charges that account for the tokens. Three values make up a working setup:

  1. The key, sk_morse_..., which you copy once from the console.
  2. The base URL, https://inference.trymorse.ai/v1. Any client built for OpenAI's chat completions format takes it as base_url.
  3. The model id, such as deepseek/deepseek-v4.1-flash. Changing this one string moves a request from one DeepSeek model to another.

Morse also accepts the key in an x-api-key header, the way Anthropic's SDK sends it. Each key ends in a short checksum, so a secret scanner can flag one that slipped into a repository. A missing, unknown, or revoked key gets 401 invalid_api_key back.

How do I get a DeepSeek API key on Morse?

You make it in the console, and it takes five steps. From the quickstart:

  1. Open console.trymorse.ai and sign in. Making a key needs a verified email.
  2. Choose Create key, give the key a name you'll recognize later, such as the app it belongs to, and choose Create.
  3. Copy the key straight away. The console shows it once, and Morse stores only a hash of it.
  4. Add credits on the console's credits page. A key pays from them, and a call from an account with no balance returns 402 insufficient_balance.
  5. Put the key in your shell's environment, not in your code:
export MORSE_API_KEY="sk_morse_..."

Every sample on this page reads it from there. That keeps the secret out of commits, screenshots, and shared notebooks, and you can swap a key by changing one variable.

How do you call a DeepSeek model with the key?

With any OpenAI SDK: point base_url at Morse, read the key from the environment, and name the model. This is the call we ran on December 3, 2026, against the abliterated 1017 build, with a TEE floor so the request had to run in attested hardware:

import os
import time

from openai import OpenAI

client = OpenAI(
    base_url="https://inference.trymorse.ai/v1",
    api_key=os.environ["MORSE_API_KEY"],
)

start = time.monotonic()
reply = client.chat.completions.create(
    model="deepseek/deepseek-v4.1-flash-1017-abliterated",
    reasoning_effort="none",
    max_tokens=150,
    extra_body={"provider": {"min_privacy": "tee"}},
    messages=[{
        "role": "user",
        "content": "In two sentences, what is a prompt injection attack on an AI agent?",
    }],
)
print(round(time.monotonic() - start, 2), "s")
print(reply.usage)
print(reply.choices[0].message.content)

It came back in 1.16 seconds, counting the round trip from our machine. The usage block read 19 prompt tokens and 72 completion tokens, none of them spent on reasoning, because reasoning_effort was none. The reply's first sentence, word for word:

A prompt injection attack is when malicious instructions are hidden in content an AI agent processes (like a webpage, email, or document), causing the agent to treat them as legitimate commands and deviate from its intended task.

Its second sentence named what that leads to: leaking data, taking unauthorized actions, or ignoring the original instructions by overriding the system prompt.

That's one short call, not a benchmark. For real work, raise max_tokens and pick an effort to match the task. The DeepSeek V4 Pro guide has a longer call with a JSON schema.

Which DeepSeek models does one key reach?

All of them, with no extra setup per model. The same key calls each DeepSeek id in Morse's catalog: two abliterated builds and the stock releases.

The two abliterated builds

These are DeepSeek V4.1 Flash with the refusal direction removed from the weights. Our abliterated model explainer covers how that works, and the DeepSeek Uncensored hub sets the two side by side.

  • deepseek/deepseek-v4.1-flash-1017-abliterated, DeepSeek V4.1 Flash 1017 Uncensored. Built on the October 17 update. Its privacy tiers are TEE, Private, so it's the one to use behind a tee floor.
  • deepseek-ai/deepseek-v4.1-flash-uncensored, DeepSeek V4.1 Flash Uncensored. Built on the first V4.1 Flash release. Its privacy tier is Private. Its own walkthrough is the V4.1 Flash Uncensored guide.

The stock DeepSeek models

These run as DeepSeek published them. Newest families first:

  • deepseek/deepseek-v4-pro-0813 is DeepSeek V4 Pro, the official V4 Pro release, for long agent runs and hard debugging.
  • deepseek/deepseek-v4-pro is DeepSeek V4 Pro 0423, the April preview, kept for code written against it.
  • deepseek/deepseek-v4.1-flash-1017 is DeepSeek V4.1 Flash 1017, the October update of Flash, with the privacy tiers TEE, Private.
  • deepseek/deepseek-v4.1-flash is DeepSeek V4.1 Flash, the first V4.1 Flash, which reads images.
  • deepseek/deepseek-v4-flash-0731 is DeepSeek V4 Flash 0731, the July Flash.
  • deepseek/deepseek-v4-flash is DeepSeek V4 Flash 0423, the first V4 Flash.
  • deepseek/deepseek-v4-flash-vision-exp is DeepSeek V4 Flash Vision Exp, an experimental Flash that takes images.
  • deepseek/deepseek-v3.2, deepseek/deepseek-v3.1, and deepseek/deepseek-v3 are DeepSeek V3.2, DeepSeek V3.1, and DeepSeek V3, the V3 line.
  • deepseek/deepseek-r1-0528 is DeepSeek R1 0528, the May 2025 update of DeepSeek's first reasoning line.

Each model's page under /inference/models lists its context, longest reply, effort values, and price. GET /v1/models with your key returns the same ids, so a script can check one before it calls it.

Where does a DeepSeek request run?

On the tier you allow. Most DeepSeek models on Morse run on Private, under zero-data-retention terms with the provider. Both 1017 releases have the privacy tiers TEE, Private, and the enclave tier is opt-in, so a request goes there only when you set a floor.

You can set the floor two ways. Per request, add "provider": {"min_privacy": "tee"} to the body, as the script above does. Per key, pick a privacy floor when you make it in the console, and every request that key sends inherits it, including ones from tools you can't edit. Either way, Morse serves the request at that tier or above, never lower. A model with no endpoint at the floor returns 400 privacy_floor_unmet before any charge. For the abliterated 1017 build: It runs in attested hardware enclaves, under zero-data-retention terms.

The privacy tiers page explains what each tier protects and what it doesn't.

How do you keep a DeepSeek key safe?

Treat it like a password, since anyone holding it can spend your credits. Keep it on a server or your own machine, never in code that ships to a browser or a phone. Then narrow what each key can do:

LimitWhat it stopsWhat a refused call gets
Spend limitA runaway loop or a leaked key draining the account. Resets daily, weekly, monthly, or never.402 key_spend_limit_reached
ExpiryA key outliving the project it was made for401 api_key_expired
Allowed IPsCalls from anywhere but your servers, up to 100 addresses or ranges403 ip_not_allowed
Privacy floorRequests landing on a tier you didn't intend400 privacy_floor_unmet

To check a key without spending anything, call GET /v1/key. It returns the key's name, prefix, limits, and what is left to spend, and never the secret itself. If a key leaks, revoke it on the console's API keys page. A revoke takes effect at once and can't be undone, so make the replacement first if a service depends on it.

Can I use the key in Claude Code, Cursor, or Codex?

Yes, and each tool has its own setup guide, so this page won't repeat them. Our post on uncensored models in Claude Code, Cursor, and Codex walks through all three with the DeepSeek builds. The docs have a page per tool: Claude Code, Cursor, Codex, Cline, and Aider, among others. Give each tool its own key, with a spend limit, so you can tell their usage apart and revoke one without touching the rest.

What are the abliterated DeepSeek builds for?

Work that a stock model tends to refuse partway through. Morse serves its uncensored models for four jobs: cybersecurity, agent security, AI and ML research, and training data. In practice that means reading attack logs and writing detections, writing the injections your own agent has to survive, studying how a model behaves once its refusal direction is gone, and producing labeled examples a classifier needs. The DeepSeek Uncensored hub has a longer tested call on a server log.

Where do I start?

Make a key on the Morse API page, export it, and run the script above with whichever DeepSeek id fits the job. If you'd rather talk to DeepSeek in a chat window than call it from code, open Morse and pick a model from the menu.

Common questions

Can I use a key from DeepSeek's own platform with Morse?

No. Morse answers only to its own keys, which start with sk_morse_. A key DeepSeek issues works on DeepSeek's platform, and a Morse key works on Morse's base URL.

Why does my new key return 402?

A key pays from your account's credits, so a key on an account with no balance gets 402 insufficient_balance. A key with a spend limit that has been used up gets 402 key_spend_limit_reached instead. Add credits in the console, or raise the key's limit.

How many API keys can I make?

An account can hold 25 active keys and make 50 in a day. One key per app or tool makes a leak cheap to fix: revoke that key and the others keep working.

Does the same key reach the abliterated DeepSeek builds?

Yes. DeepSeek V4.1 Flash Uncensored and DeepSeek V4.1 Flash 1017 Uncensored answer to the same key as the stock models. Only the model id changes.

Ask what you actually want to ask.

80+ models, uncensored ones included, plus images. Every chat is encrypted and stays on your device. Free to start.

Start a private chat

Read next