Skip to main content
POST
/
v1
/
dev
/
user
/
conversations
/
from-segments
Create Conversation From Segments
curl --request POST \
  --url https://api.omi.me/v1/dev/user/conversations/from-segments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transcript_segments": [
    {
      "end": 123,
      "start": 123,
      "text": "<string>",
      "is_user": false,
      "person_id": "<string>",
      "speaker": "SPEAKER_00",
      "speaker_id": 123
    }
  ],
  "client_device_id": "<string>",
  "client_platform": "<string>",
  "client_session_id": "<string>",
  "finished_at": "2023-11-07T05:31:56Z",
  "geolocation": {
    "latitude": 123,
    "longitude": 123,
    "address": "<string>",
    "google_place_id": "<string>",
    "location_type": "<string>"
  },
  "language": "en",
  "source": "phone",
  "started_at": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://api.omi.me/v1/dev/user/conversations/from-segments"

payload = {
"transcript_segments": [
{
"end": 123,
"start": 123,
"text": "<string>",
"is_user": False,
"person_id": "<string>",
"speaker": "SPEAKER_00",
"speaker_id": 123
}
],
"client_device_id": "<string>",
"client_platform": "<string>",
"client_session_id": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"geolocation": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"google_place_id": "<string>",
"location_type": "<string>"
},
"language": "en",
"source": "phone",
"started_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transcript_segments: [
{
end: 123,
start: 123,
text: '<string>',
is_user: false,
person_id: '<string>',
speaker: 'SPEAKER_00',
speaker_id: 123
}
],
client_device_id: '<string>',
client_platform: '<string>',
client_session_id: '<string>',
finished_at: '2023-11-07T05:31:56Z',
geolocation: {
latitude: 123,
longitude: 123,
address: '<string>',
google_place_id: '<string>',
location_type: '<string>'
},
language: 'en',
source: 'phone',
started_at: '2023-11-07T05:31:56Z'
})
};

fetch('https://api.omi.me/v1/dev/user/conversations/from-segments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omi.me/v1/dev/user/conversations/from-segments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transcript_segments' => [
[
'end' => 123,
'start' => 123,
'text' => '<string>',
'is_user' => false,
'person_id' => '<string>',
'speaker' => 'SPEAKER_00',
'speaker_id' => 123
]
],
'client_device_id' => '<string>',
'client_platform' => '<string>',
'client_session_id' => '<string>',
'finished_at' => '2023-11-07T05:31:56Z',
'geolocation' => [
'latitude' => 123,
'longitude' => 123,
'address' => '<string>',
'google_place_id' => '<string>',
'location_type' => '<string>'
],
'language' => 'en',
'source' => 'phone',
'started_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.omi.me/v1/dev/user/conversations/from-segments"

payload := strings.NewReader("{\n \"transcript_segments\": [\n {\n \"end\": 123,\n \"start\": 123,\n \"text\": \"<string>\",\n \"is_user\": false,\n \"person_id\": \"<string>\",\n \"speaker\": \"SPEAKER_00\",\n \"speaker_id\": 123\n }\n ],\n \"client_device_id\": \"<string>\",\n \"client_platform\": \"<string>\",\n \"client_session_id\": \"<string>\",\n \"finished_at\": \"2023-11-07T05:31:56Z\",\n \"geolocation\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"google_place_id\": \"<string>\",\n \"location_type\": \"<string>\"\n },\n \"language\": \"en\",\n \"source\": \"phone\",\n \"started_at\": \"2023-11-07T05:31:56Z\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.omi.me/v1/dev/user/conversations/from-segments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transcript_segments\": [\n {\n \"end\": 123,\n \"start\": 123,\n \"text\": \"<string>\",\n \"is_user\": false,\n \"person_id\": \"<string>\",\n \"speaker\": \"SPEAKER_00\",\n \"speaker_id\": 123\n }\n ],\n \"client_device_id\": \"<string>\",\n \"client_platform\": \"<string>\",\n \"client_session_id\": \"<string>\",\n \"finished_at\": \"2023-11-07T05:31:56Z\",\n \"geolocation\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"google_place_id\": \"<string>\",\n \"location_type\": \"<string>\"\n },\n \"language\": \"en\",\n \"source\": \"phone\",\n \"started_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.omi.me/v1/dev/user/conversations/from-segments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transcript_segments\": [\n {\n \"end\": 123,\n \"start\": 123,\n \"text\": \"<string>\",\n \"is_user\": false,\n \"person_id\": \"<string>\",\n \"speaker\": \"SPEAKER_00\",\n \"speaker_id\": 123\n }\n ],\n \"client_device_id\": \"<string>\",\n \"client_platform\": \"<string>\",\n \"client_session_id\": \"<string>\",\n \"finished_at\": \"2023-11-07T05:31:56Z\",\n \"geolocation\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"google_place_id\": \"<string>\",\n \"location_type\": \"<string>\"\n },\n \"language\": \"en\",\n \"source\": \"phone\",\n \"started_at\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body
{
  "discarded": true,
  "id": "<string>",
  "status": "<string>"
}
{
"detail": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <firebase_id_token>.

Body

application/json
transcript_segments
CreateConversationTranscriptSegment · object[]
required

List of transcript segments with speaker and timing info

Required array length: 1 - 500 elements
client_device_id
string | null

Capture device id ({platform}_{hash})

client_platform
string | null

Client platform (ios/android/macos)

client_session_id
string | null

Stable client-generated session ID. When provided, retries return the same conversation ID.

Required string length: 1 - 200
finished_at
string<date-time> | null

When conversation finished (calculated from segments duration if not provided)

geolocation
Geolocation · object | null

Geolocation where conversation occurred

language
string | null
default:en

Language code (ISO 639-1, e.g., 'en', 'es', 'fr')

source
enum<string> | null
default:phone

Source of the conversation (e.g., omi, friend, openglass, phone, external_integration)

Available options:
friend,
omi,
fieldy,
bee,
plaud,
frame,
friend_com,
apple_watch,
phone,
phone_call,
desktop,
openglass,
screenpipe,
workflow,
sdcard,
external_integration,
limitless,
rayban_meta,
onboarding,
unknown
started_at
string<date-time> | null

When conversation started (defaults to now)

Response

Successful Response

discarded
boolean
required
id
string
required
status
string
required