Email generation service w/ DeepSeek API

API Documentation

Endpoint

POST /generate

Request

{
    "context": "string (required) - Context and instructions for email generation",
    "prompt": "string (required) - Specific instructions for the email content"
}

Response

{
    "status": "boolean - Indicates success/failure",
    "data": {
        "rawCompletion": "object - Full API response from DeepSeek",
        "generatedEmail": "string - The generated email content",
        "usage": "object - Token usage statistics"
    },
    "message": "string - Error message (if status is false)"
}

Headers

Content-Type: application/json

Example Request Body

{
    "context": "You're an email writing specialist, write an email about a subject which the user will provide, do not use placeholders, do not just provide a template, generate a full professional email",
    "prompt": "Write a professional email to a potential client about accepting their project and wanting to move forward with it"
}