You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api.go
+16-46Lines changed: 16 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -9,65 +9,35 @@ import (
9
9
"net/http"
10
10
)
11
11
12
-
typeCreateSessionRequeststruct {
13
-
ClientSession
14
-
15
-
// The Realtime model used for this session.
16
-
Modelstring`json:"model"`
17
-
}
18
-
19
12
typeClientSecretstruct {
20
13
// Ephemeral key usable in client environments to authenticate connections to the Realtime API. Use this in client-side environments rather than a standard API token, which should only be used server-side.
21
14
Valuestring`json:"value"`
22
15
// Timestamp for when the token expires. Currently, all tokens expire after one minute.
23
16
ExpiresAtint64`json:"expires_at"`
24
17
}
25
18
26
-
typeCreateSessionResponsestruct {
27
-
ServerSession
19
+
typeExpiresAfterstruct {
20
+
// The anchor point for the client secret expiration, meaning that seconds will be added to the created_at time of the client secret to produce an expiration timestamp. Only created_at is currently supported.
21
+
Anchorstring`json:"anchor,omitzero"`
28
22
29
-
// Ephemeral key returned by the API.
30
-
ClientSecretClientSecret`json:"client_secret"`
23
+
// The number of seconds from the anchor point to the expiration. Select a value between 10 and 7200 (2 hours). This default to 600 seconds (10 minutes) if not specified.
24
+
Secondsint`json:"seconds,omitzero"`
31
25
}
32
26
33
-
// CreateTranscriptionSessionRequest is the request for creating a transcription session.
34
-
typeCreateTranscriptionSessionRequeststruct {
35
-
// The set of items to include in the transcription.
36
-
Include []string`json:"include,omitempty"`
37
-
// The format of input audio. Options are "pcm16", "g711_ulaw", or "g711_alaw".
// Configuration for the client secret expiration. Expiration refers to the time after which a client secret will no longer be valid for creating sessions. The session itself may continue after that time once started. A secret can be used to create multiple sessions until it expires.
0 commit comments