{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial"]},"type":"markdown"},"seo":{"title":"Get Started","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"get-started","__idx":0},"children":["Get Started"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This short tutorial will teach you the basics of using the Rev AI Python SDK. It demonstrates how to produce a transcript of an audio file submitted by you using the SDK."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"assumptions","__idx":1},"children":["Assumptions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial assumes that:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You have a Rev AI account and access token. If not, ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.rev.ai/auth/signup"},"children":["sign up for a free account"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/get-started#step-1-get-your-access-token"},"children":["generate an access token"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You have a properly configured Python 2.7+ or Python 3.4+ development environment with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pip"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-install-the-sdk","__idx":2},"children":["Step 1: Install the SDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Begin by installing the SDK:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"pip install --upgrade rev_ai\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-submit-a-file-for-transcription-and-retrieve-the-result","__idx":3},"children":["Step 2: Submit a file for transcription and retrieve the result"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example demonstrates how to submit a local audio file for transcription."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To use this example, replace the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<FILEPATH>"]}," placeholder with the path to the file you wish to transcribe and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<REVAI_ACCESS_TOKEN>"]}," placeholder with your Rev AI account's access token."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from rev_ai import apiclient\n\ntoken = \"<REVAI_ACCESS_TOKEN>\"\nfilePath = \"<FILEPATH>\"\n\n# create your client\nclient = apiclient.RevAiAPIClient(token)\n\n# send a local file\njob = client.submit_job_local_file(filePath)\n\n# check job status\njob_details = client.get_job_details(job.id)\n\n# retrieve transcript as text\ntranscript_text = client.get_transcript_text(job.id)\n\n# retrieve transcript as JSON\ntranscript_json = client.get_transcript_json(job.id)\n\n# retrieve transcript as a Python object\ntranscript_object = client.get_transcript_object(job.id)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also submit a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk/python/code-samples#submit-a-remote-file-for-transcription"},"children":["remote file"]}," ."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The text output is a string containing just the text of your transcript. The object and JSON forms of the transcript contain all the information outlined in the response of the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api/asynchronous"},"children":["transcript retrieval endpoint of the Asynchronous Speech-to-Text API"]}," when using the JSON response schema."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Any of these outputs can also be retrieved as a stream for easy file writing:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"text_stream = client.get_transcript_text_as_stream(job.id)\njson_stream = client.get_transcript_json_as_stream(job.id)\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In these cases, the SDK returns the raw HTTP response. The output can be retrieved via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response.content"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response.iter_lines()"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response.iter_content()"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":4},"children":["Next steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should now have a basic understanding of how to use the Python SDK. To learn more, refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/revdotcom/revai-python-sdk/blob/master/README.md"},"children":["SDK documentation"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk/python/code-samples"},"children":["code samples"]},"."]}]},"headings":[{"value":"Get Started","id":"get-started","depth":1},{"value":"Assumptions","id":"assumptions","depth":2},{"value":"Step 1: Install the SDK","id":"step-1-install-the-sdk","depth":2},{"value":"Step 2: Submit a file for transcription and retrieve the result","id":"step-2-submit-a-file-for-transcription-and-retrieve-the-result","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Python SDK Get Started","toc":{"enable":true},"seo":{"title":"Get Started"}},"lastModified":"2026-02-24T14:47:49.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk/python/get-started","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}