DeepSeek overview
Get started with @orcushq/deepseek, configure a DeepSeekWeb client, and explore model invocation, streaming, authentication, conversations, and structured output.
Installation
Install @orcushq/deepseek using your preferred package manager.
npm install @orcushq/deepseekAuthentication
@orcushq deepseek requires two authentication values to make requests to DeepSeek Web: the ds_session_id session cookie and the Authorization header. Obtain both values from your signed-in DeepSeek Web session, configure them through environment variables, and pass them to DeepSeekWeb as dsSessionId and authorization. Keep your credentials private and out of source control. See Authentication for setup instructions and Find required keys to learn how to obtain these values.
Quick start
Create a DeepSeekWeb client with your credentials and a supported model ID. Call invoke() with a prompt to receive the generated response and metadata.
import { DeepSeekWeb } from '@orcushq/deepseek' const model = new DeepSeekWeb({ model: 'deepseek-v3', dsSessionId: process.env.DEEPSEEK_SESSION_ID!, authorization: process.env.DEEPSEEK_AUTHORIZATION!,}) const response = await model.invoke( 'Explain closures in one sentence.',) console.log(response.content)console.log(response.finishReason)console.log(response.metadata.modelId)Available features
- Model invocation: Send a prompt and receive a generated response.
- Streaming: Receive generated output incrementally.
- Batch processing: Submit multiple inputs through the batch interface.
- Structured output: Request output that follows a defined schema.
- Tool calling: Use supported tool-calling functionality.
- Image input: Send images as part of a message where supported.