# Deepseek V3.X

### DeepSeek V3.1

Thinking can be turned on and off by specifying the `thinking` parameter as a dictionary item in the `chat_template_kwargs` parameter of the body. It must be set to `true` or `false` not `"True"` or `"true"` .

Python + OpenAI Library:

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

client = OpenAI(
    base_url="https://api.parasail.io/v1",
    api_key=os.environ["PARASAIL_API_KEY"]
)

chat_completion = client.chat.completions.create(
    model="parasail-deepseek-31",
    messages=[{"role": "user", "content": "What is the capital of New York?"}],
    extra_body={
        "chat_template_kwargs": {"thinking": True},  # or False, for no-think mode
    }
)

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

CURL:

{% code overflow="wrap" %}

```sh
curl -X POST https://api.parasail.io/v1/chat/completions \
    -H "Authorization: Bearer $PARASAIL_API_KEY" \
    -H "content-type: application/json" \
    -d '{"model": "parasail-deepseek-31", "chat_template_kwargs": {"thinking": false}, "messages": [{"role": "user", "content": "What is the capital of New York?"}]}'
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parasail.io/parasail-docs/serverless-and-models/model-specific-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
