Thank you for helping make this resource better! This project thrives on community contributions — whether you're adding a new prompt, a code example in a language we don't have yet, or fixing a typo.
- Code of Conduct
- What we accept
- How to contribute
- Adding a prompt
- Adding a code example
- Style guide
- Running the examples locally
Be kind, constructive, and inclusive. We follow the Contributor Covenant v2.1.
| Type | Welcome? |
|---|---|
| New prompts for AI assistants | ✅ Yes |
| Code examples in any language | ✅ Yes |
| Corrections to existing examples | ✅ Yes |
| Improvements to schemas | ✅ Yes |
| New example categories (e.g., document translation) | ✅ Yes |
| Unverified or untested code | ❌ Please test first |
| Proprietary / non-MIT-compatible content | ❌ No |
-
Fork the repository and create a feature branch:
git checkout -b feat/add-ruby-translate-example
-
Make your changes following the style guide below.
-
Test any code you add (see Running the examples locally).
-
Open a Pull Request against
mainwith a clear title and description.
- Copy
_templates/prompt.template.mdintoprompts/. - Name the file after the DeepL feature it covers, e.g.
prompts/split-sentences.md. - Fill in every section of the template — don't leave placeholder text.
- The prompt itself must be self-contained: someone should be able to copy it into any AI assistant and get useful code without reading anything else.
- Pick the relevant feature directory under
examples/(or create a new one following the existing pattern). - Copy
_templates/example.readme.template.mdas theREADME.mdfor your new directory. - Add a
curls.shwith minimalcurlinvocations — these serve as the canonical HTTP reference. - For each runtime, create a subdirectory (
node/,python/,dotnet/,ruby/,go/, etc.) containing:- A dependency manifest (
package.json,requirements.txt,*.csproj,go.mod, …) - A single entry-point file (
index.js,main.py,Program.cs,main.go, …) - The example must read
DEEPL_API_KEYfrom the environment — never hardcode keys.
- A dependency manifest (
- Confirm your example runs cleanly from a fresh environment before opening a PR.
- Start with a one-sentence summary of what the prompt does.
- Include a "Context" section explaining when to use it.
- The prompt block must be fenced with
```promptso renderers highlight it correctly. - List known caveats (rate limits, language-pair restrictions, etc.).
- Use the official DeepL SDK where one exists for the language; fall back to raw HTTP otherwise.
- Detect the API tier from the key suffix (
:fx→ free tier host, otherwise paid tier host). - Print meaningful output — don't silently swallow results.
- Include error handling for at least
AuthorizationException/4xxresponses andQuotaExceededException/456. - Keep examples short: demonstrate one concept per file.
- The OpenAPI file follows OpenAPI 3.1.
- Keep it in sync with the latest public DeepL API documentation.
- Postman collection format must be v2.1.
cd examples/translate/node
npm install
DEEPL_API_KEY=your-key node index.jscd examples/translate/python
pip install -r requirements.txt
DEEPL_API_KEY=your-key python main.pycd examples/translate/dotnet
DEEPL_API_KEY=your-key dotnet runOpen a GitHub Discussion or file an issue with the question label.