DeepSeek

DeepSeek is a Chinese AI company focused on building powerful open-source language models. Their models excel at coding, reasoning, and general-purpose tasks, offering strong performance at competitive pricing.

The sgcWebSockets library provides a Delphi component TsgcHTTP_API_DeepSeek to interact with the DeepSeek API.

DeepSeek API

The DeepSeek API provides access to DeepSeek models for building AI-powered applications. The API supports text generation, vision (image understanding), streaming, and model listing. The API follows an OpenAI-compatible format, making it easy to integrate.

Features

Configuration

The DeepSeek API uses API keys for authentication. Visit your API Keys page in the DeepSeek Platform to retrieve the API key you'll use in your requests.

Remember that your API key is a secret! Do not share it with others or expose it in any client-side code.

This API Key must be configured in the DeepSeekOptions.ApiKey property of the component.


DeepSeek := TsgcHTTP_API_DeepSeek.Create(nil);
DeepSeek.DeepSeekOptions.ApiKey := 'YOUR_API_KEY';

Messages

Send a structured list of input messages with text content, and the model will generate the next message in the conversation.

Vision

DeepSeek can understand images passed as base64-encoded content within messages.

Models

List the available DeepSeek models.