{"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 Java 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 Java development environment with Java v8 or v11."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-import-the-sdk","__idx":2},"children":["Step 1: Import the SDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Begin by importing the SDK into your project using Maven:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"<dependency>\n  <groupId>ai.rev</groupId>\n  <artifactId>revai-java-sdk</artifactId>\n</dependency>\n","lang":"java"},"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":"java","header":{"controls":{"copy":{}}},"source":"String accessToken = \"<REVAI_ACCESS_TOKEN>\";\nString localPathToFile = \"<FILEPATH>\";\n\n// initialize the client with your access token\nApiClient apiClient = new ApiClient(accessToken);\n\n// submit a local file\nRevAiJob revAiJob = apiClient.submitJobLocalFile(localPathToFile);\n\n// check job status\nRevAiJob newlyRefreshedRevAiJob = apiClient.getJobDetails(revAiJob.getJobId());\n\n// retrieve transcript\n// as plain text\nString transcriptText = apiClient.getTranscriptText(revAiJob.getJobId());\n\n// or as an object\nRevAiTranscript revAiTranscript = apiClient.getTranscriptObject(revAiJob.getJobId());\n","lang":"java"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also submit a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk/java/code-samples#submit-a-remote-file-for-transcription"},"children":["remote file"]}," or an ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk/java/code-samples#submit-an-audio-stream-for-transcription"},"children":["audio stream"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The text output is a string containing just the text of your transcript. The object form of the transcript contains 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":"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 Node SDK. To learn more, refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/revdotcom/revai-java-sdk/blob/master/README.md"},"children":["SDK documentation"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk/java/code-samples"},"children":["code samples"]},"."]}]},"headings":[{"value":"Get Started","id":"get-started","depth":1},{"value":"Assumptions","id":"assumptions","depth":2},{"value":"Step 1: Import the SDK","id":"step-1-import-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":"Java SDK Get Started","toc":{"enable":true},"seo":{"title":"Get Started"}},"lastModified":"2026-02-24T14:47:49.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk/java/get-started","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}