## TL;DR

Community member StevenLi-phoenix pointed to the docs: use https://api.deepseek.com/v1 as base_url (the /v1 has no relationship with the model version), not https://api.deepseek.com.

## Steps

1. Community member StevenLi-phoenix pointed to the docs: use https://api.deepseek.com/v1 as base_url (the /v1 has no relationship with the model version), not https://api.deepseek.com.

## When to use

You are seeing this: Issue deepseek-ai/awesome-deepseek-integration#57 (closed, 3 comments): API error via OpenAI-compat clients (Cline etc.): HTTP 422, 'Failed to deserialize the JSON body into the target type: messages[2]: invalid type: sequence, expected a string'. Use this skill when you run into "An error has occurred with OpenAI API".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://api.deepseek.com/v1

- https://api.deepseek.com
