Documentation menu

Getting started

Quickstart

Translate a text and hold a translated call with a free test key, in about five minutes.

This walks through the API with a test key. Test keys are free: text gets a stand-in translation, and calls connect without interpretation. Everything else works as it does live.

1. Create a test key#

In Spiiksi, open API & integrations → API keys, name the key, choose Test and Create key. Copy the key (it starts with spk_test_); it is shown once.

Shell
export SPIIKSI_KEY=spk_test_...
curl https://api.spiiksi.fi/v1/account -H "Authorization: Bearer $SPIIKSI_KEY"
JSON
{"org_id": "…", "org_name": "Acme Bikes", "mode": "test",
 "scopes": ["account:read", "calls:read", "calls:write", "…"], "currency": "EUR", …}

2. Translate a text#

Shell
curl https://api.spiiksi.fi/v1/translate \
  -H "Authorization: Bearer $SPIIKSI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hei, laskuni on väärin", "target": "en"}'

A test key answers with a stand-in that tags the text with its target, [en] Hei, laskuni on väärin, and charges nothing. A live key returns the real translation and the language it detected.

3. Start a call#

Shell
curl https://api.spiiksi.fi/v1/calls \
  -H "Authorization: Bearer $SPIIKSI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_language": "en", "customer_language": "es", "video": true}'
JSON
{"id": "6f0c…", "status": "open", "livemode": false,
 "agent_url": "https://spiiksi.fi/call/6f0c…#k=…",
 "customer_url": "https://spiiksi.fi/call/6f0c…#k=…", …}

Open agent_url in one browser window and customer_url in another (a private window, or another device). Start the call in both. In test mode each side hears the other's own voice; with a live key each hears the other interpreted.

4. End it#

Shell
curl -X POST https://api.spiiksi.fi/v1/calls/$CALL_ID/end -H "Authorization: Bearer $SPIIKSI_KEY"

Both pages say the call has ended.

Next#