DeepSeek V4 Pro is a state-of-the-art large language model combining efficient sparse attention, strong reasoning, and integrated agent capabilities for robust long-context understanding and versatile AI applications.
DeepSeek V4 Pro 0813 は DeepSeek が開発したモデルです。Atlas Cloud(運営:Atlas Cloud AI LLC)は本モデルへのアクセスを提供するものであり、その所有者ではありません。すべての商標は各所有者に帰属します。
import os
from openai import OpenAI
client = OpenAI( api_key=os.getenv("ATLASCLOUD_API_KEY"), base_url="https://api.atlascloud.ai/v1")response = client.chat.completions.create( model="deepseek-ai/deepseek-v4-pro-0813", messages=[{"role":"user","content":"what is difference between http and https"}], max_tokens=81920, temperature=0.7)print(response.choices[0].message.content)
インストール
お使いの言語に必要なパッケージをインストールしてください。
bash
pip install requests
認証
すべての API リクエストには API キーによる認証が必要です。API キーは Atlas Cloud ダッシュボードから取得できます。
bash
exportATLASCLOUD_API_KEY="your-api-key-here"
HTTP ヘッダー
python
import os
API_KEY = os.environ.get("ATLASCLOUD_API_KEY")headers ={"Content-Type":"application/json","Authorization":f"Bearer {API_KEY}"}
API キーを安全に保管してください
API キーをクライアントサイドのコードや公開リポジトリに公開しないでください。代わりに環境変数またはバックエンドプロキシを使用してください。
リクエストを送信
import requests
url ="https://api.atlascloud.ai/v1/chat/completions"headers ={"Content-Type":"application/json","Authorization":"Bearer $ATLASCLOUD_API_KEY"}data ={"model":"deepseek-ai/deepseek-v4-pro-0813","messages":[{"role":"user","content":"what is difference between http and https"}],"max_tokens":81920,"temperature":0.7,"stream":False}response = requests.post(url, headers=headers, json=data)print(response.json())
入力 Schema
以下のパラメータがリクエストボディで使用できます。
合計: 14必須: 2任意: 12
modelstringrequired
The model ID to use for the completion.
Example: "deepseek-ai/deepseek-v4-pro-0813"
messagesarray[object]required
A list of messages comprising the conversation so far.
rolestringrequired
The role of the message author.
systemuserassistant
contentstringrequired
The content of the message.
temperaturenumber
Controls the variety of the model's responses. Lower values make output more predictable and deterministic, higher values more diverse and random.
Default: 1Min: 0Max: 2
top_pnumber
Nucleus sampling: limits the model's choices to the smallest set of tokens whose cumulative probability reaches top_p. It is recommended to adjust either this or temperature, not both.
Default: 1Min: 0Max: 1
top_kinteger
Limits the model's choice to the k most likely tokens at each step. Set to 0 or omit to disable.
Default: 0Min: 0
min_pnumber
Minimum probability threshold for a token to be considered, measured relative to the probability of the most likely token. Tokens below this threshold are filtered out.
Default: 0Min: 0Max: 1
frequency_penaltynumber
Penalizes tokens based on how frequently they have appeared in the text so far, reducing verbatim repetition. Negative values encourage token reuse.
Default: 0Min: -2Max: 2
presence_penaltynumber
Penalizes tokens that have already appeared in the text regardless of frequency, encouraging the model to introduce new topics.
Default: 0Min: -2Max: 2
repetition_penaltynumber
Multiplicative penalty applied to previously generated tokens. Values greater than 1 discourage repetition; 1 disables it.
Default: 1Min: 0Max: 2
stopstring | array[string]
One or more sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
seedinteger
Random seed for deterministic sampling. Repeated requests with the same seed and parameters should return the same result.
max_tokensinteger
The maximum number of tokens to generate in the completion. The maximum value is the model's context length minus the prompt length.
Min: 1
logit_biasobject
A map of token IDs to bias values from -100 to 100 that adjust the likelihood of those tokens appearing in the output.
streamboolean
If set to true, partial message deltas will be sent as server-sent events.
Default: false
リクエストボディの例
json
{"model":"deepseek-ai/deepseek-v4-pro-0813","messages":[{"role":"user","content":"what is difference between http and https"}],"max_tokens":81920,"temperature":0.7,"stream":false}
出力 Schema
API は ChatCompletion 互換のレスポンスを返します。
idstringrequired
Unique identifier for the completion.
objectstringrequired
Object type, always "chat.completion".
Default: "chat.completion"
createdintegerrequired
Unix timestamp of when the completion was created.
modelstringrequired
The model used for the completion.
choicesarray[object]required
List of completion choices.
indexintegerrequired
Index of the choice.
messageobjectrequired
The generated message.
finish_reasonstringrequired
The reason generation stopped.
stoplengthcontent_filter
usageobjectrequired
Token usage statistics.
prompt_tokensintegerrequired
Number of tokens in the prompt.
completion_tokensintegerrequired
Number of tokens in the completion.
total_tokensintegerrequired
Total tokens used.
レスポンス例
json
{"id":"chatcmpl-abc123","object":"chat.completion","created":1700000000,"model":"model-name","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How can I assist you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":10,"completion_tokens":20,"total_tokens":30}}
Atlas Cloud Skills
Atlas Cloud Skills は 400 以上の AI モデルを AI コーディングアシスタントに直接統合します。ワンコマンドでインストールし、自然言語で画像・動画生成や LLM との対話が可能です。