> For clean Markdown of any page, append `.md` to the page URL. > For a complete documentation index, see https://docs.sarvam.ai/llms.txt. > For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server. # How to pick a genre > Use genre to tune Sarvam Document Translation for your content category. `genre` tunes the translation prompt for the kind of content you're translating, vocabulary, tone, and terminology. | Parameter | Type | Values | Default | | --------- | ------ | ------------------------------------------------------------------------------------ | ------- | | `genre` | string | `NON_FICTION`, `ADULT_FICTION`, `CHILDREN_FICTION`, `RELIGIOUS`, `LEGAL`, `ACADEMIC` | - | > **Tip** > > Pick the genre that best matches your document type. `LEGAL` for contracts, `CHILDREN_FICTION` for children's books, `ACADEMIC` for research papers. ## Example #### Python ```python from sarvamai import SarvamAI client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY") job = client.document_translation.create( job_name="service-agreement-hi", source_language_code="en-IN", target_language_codes=["hi-IN"], original_filename="service-agreement.pdf", genre="LEGAL", ) ``` #### JavaScript ```javascript import { SarvamAIClient } from "sarvamai"; const client = new SarvamAIClient({ apiSubscriptionKey: "YOUR_SARVAM_API_KEY", }); const job = await client.documentTranslation.create({ job_name: "service-agreement-hi", source_language_code: "en-IN", target_language_codes: ["hi-IN"], original_filename: "service-agreement.pdf", genre: "LEGAL", }); ``` Request body equivalent: ```json { "job_name": "service-agreement-hi", "source_language_code": "en-IN", "target_language_codes": ["hi-IN"], "original_filename": "service-agreement.pdf", "genre": "LEGAL" } ``` ## Related * [Document Translation Overview](/api/api-guides-tutorials/doc-translation/overview) * [Set Style Guidelines](/api/api-guides-tutorials/doc-translation/how-to/style-guidelines) * [Use Cases](/api/api-guides-tutorials/doc-translation/use-cases) > Use genre to tune Sarvam Document Translation for your content category.