Index: /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/build.xml
===================================================================
--- /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/build.xml	(revision 35239)
+++ /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/build.xml	(revision 35240)
@@ -4,5 +4,4 @@
     <property name="build.home" value="${basedir}/build" />
     <property name="web.dir" value="${basedir}/src/main/webapp" />
-    <available property="ext.web.exists" file="${basedir}/web" type="dir" />
     
     <condition property="tomcat.dir" value="${gs3.tomcat.installed.path}" else="${basedir}/../../../packages/tomcat">
@@ -24,10 +23,17 @@
     
     <!-- Targets -->
+    <target name="file-checks" description="Ensures that required external files exist.">
+        <fail message="config.properties was not found. Please run ${basedir}/setup.sh">
+            <condition>
+                <not>
+                    <available file="${basedir}/config.properties"></available>
+                </not>
+            </condition>
+        </fail>
+     </target>
+
     <target name="usage" description="Print a help message">
         <echo message="  Execute 'ant -projecthelp' for a list of targets." />
         <echo message="  Execute 'ant -help' for Ant help." />
-        <echo>
-            To install the servlet for the Korero Maori 
-        </echo>
 	</target>
 	
@@ -46,23 +52,16 @@
             </classpath>
         </javac>
-
-        <copy file="${basedir}/log4j2.xml" todir="${build.classes}" />
-        
-        <!-- Package our classes into a jar -->
-        <!--<jar destfile="${build.home}/lib/gs3-koreromaori.jar">
-            <fileset dir="${build.home}">
-                <include name="org/atea/**" />
-            </fileset>
-            <manifest>
-                <attribute name="Built-By" value="${user.name}" />
-            </manifest>
-        </jar>-->
     </target>
     
-    <target name="package" depends="compile" description="Packages the Korero Maori interface into a war file">
+    <target name="package" depends="file-checks,compile" description="Packages the Korero Maori interface into a war file.">
         <echo message="Creating ${guild.home}/gs3-koreromaori.war" />
+
+        <!-- <copy file="${basedir}/config.properties" todir="${build.classes}" />
+        <echo message="Copied configuration file" /> -->
+        <copy file="${basedir}/log4j2.xml" todir="${build.classes}" />
         
         <war destfile="${build.home}/gs3-koreromaori.war" webxml="${web.dir}/WEB-INF/web.xml">
             <fileset dir="${web.dir}/webContent" includes="**" />
+            <fileset file="${basedir}/config.properties" />
         
             <lib dir="lib/java">
Index: /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/config.properties.in
===================================================================
--- /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/config.properties.in	(revision 35240)
+++ /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/config.properties.in	(revision 35240)
@@ -0,0 +1,4 @@
+# Config file for the Korero Maori ASR API proxy servlet
+
+tuhituhi.api.key=@tuhituhi.api.key@
+tuhituhi.api.endpoint=https://asr.koreromaori.io/transcribe_with_metadata
Index: /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/log4j2.xml
===================================================================
--- /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/log4j2.xml	(revision 35239)
+++ /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/log4j2.xml	(revision 35240)
@@ -2,5 +2,5 @@
 <Configuration status="warn" name="KoreroMaoriInterface" packages="">
   <Appenders>
-    <File name="FileOutput" fileName="../webapps/gs3-koreromaori/koreromaoriinterface.log" append="true">
+    <File name="FileOutput" fileName="../webapps/gs3-koreromaori/log.log" append="true">
       <PatternLayout>
         <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
Index: /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/setup.sh
===================================================================
--- /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/setup.sh	(revision 35240)
+++ /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/setup.sh	(revision 35240)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ ! -f config.properties ] ; then
+    read -p "Enter your Reo Tuhituhi API key: " key
+    echo "Generating config.properties from config.properties.in."
+    sed -e "s/@tuhituhi.api.key@/$key/g" config.properties.in > config.properties
+else
+    echo "config.properties already exists; no changes made."
+fi
Index: /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/TranscriptionServlet.java
===================================================================
--- /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/TranscriptionServlet.java	(revision 35239)
+++ /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/TranscriptionServlet.java	(revision 35240)
@@ -1,4 +1,5 @@
 package org.atea.nlptools.koreromaoriinterface;
 
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -7,4 +8,5 @@
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Properties;
 
 import javax.servlet.ServletException;
@@ -34,10 +36,29 @@
 
 	private final Gson jsonSerialiser;
-	private final ReoTuhituhiApiService transcriptionService;
+
+	private ReoTuhituhiApiService transcriptionService;
 
 	public TranscriptionServlet()
 	{
 		jsonSerialiser = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
-		this.transcriptionService = new ReoTuhituhiApiService(jsonSerialiser);
+	}
+
+	@Override
+	public void init() 
+	{
+		Properties prop = new Properties();
+
+		try {
+			FileInputStream fis = new FileInputStream("../webapps/gs3-koreromaori/config.properties");
+			prop.load(fis);
+			fis.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+
+		String apiEndpoint = prop.getProperty("tuhituhi.api.endpoint");
+		String apiKey = prop.getProperty("tuhituhi.api.key");
+		
+		this.transcriptionService = new ReoTuhituhiApiService(jsonSerialiser, apiEndpoint, apiKey);
 	}
 
Index: /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/services/ReoTuhituhiApiService.java
===================================================================
--- /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/services/ReoTuhituhiApiService.java	(revision 35239)
+++ /gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriinterface/services/ReoTuhituhiApiService.java	(revision 35240)
@@ -25,8 +25,12 @@
     private final ExecutorService threadPool;
     private final Gson jsonSerialiser;
+    private final String apiEndpoint;
+    private final String apiKey;
 
-    public ReoTuhituhiApiService(Gson jsonSerialiser)
+    public ReoTuhituhiApiService(Gson jsonSerialiser, String apiEndpoint, String apiKey)
     {
         this.jsonSerialiser = jsonSerialiser;
+        this.apiEndpoint = apiEndpoint;
+        this.apiKey = apiKey;
 
         threadPool = java.util.concurrent.Executors.newFixedThreadPool(3);
@@ -87,9 +91,7 @@
         throws Exception
     {
-        // TODO: Use servlet param for URL
-        // TODO: Use servlet param for API key
         String jsonResponse = HttpRequestService
-            .post("https://asr.koreromaori.io/transcribe_with_metadata")
-            .authorization("Basic ")
+            .post(apiEndpoint)
+            .authorization("Basic " + apiKey)
             .send(audioStream)
             .body();
