telnyx 6.62.0 → 6.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.64.0 (2026-05-13)
4
+
5
+ Full Changelog: [v6.63.0...v6.64.0](https://github.com/team-telnyx/telnyx-node/compare/v6.63.0...v6.64.0)
6
+
7
+ ### Features
8
+
9
+ * Document AI call status callback overrides ([ca76a36](https://github.com/team-telnyx/telnyx-node/commit/ca76a369e14b3a15608ef74ed4d094eb99e7d9c0))
10
+
11
+ ## 6.63.0 (2026-05-11)
12
+
13
+ Full Changelog: [v6.62.0...v6.63.0](https://github.com/team-telnyx/telnyx-node/compare/v6.62.0...v6.63.0)
14
+
15
+ ### Features
16
+
17
+ * Document OpenAI responses conversation flow ([21116f6](https://github.com/team-telnyx/telnyx-node/commit/21116f6b969903a70e45c8bdb7c2843d0599c052))
18
+
3
19
  ## 6.62.0 (2026-05-11)
4
20
 
5
21
  Full Changelog: [v6.61.0...v6.62.0](https://github.com/team-telnyx/telnyx-node/compare/v6.61.0...v6.62.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telnyx",
3
- "version": "6.62.0",
3
+ "version": "6.64.0",
4
4
  "description": "Telnyx API SDK for global Voice, SMS, MMS, WhatsApp, Fax, Wireless IoT, SIP Trunking, and Call Control.",
5
5
  "author": "Telnyx <support@telnyx.com>",
6
6
  "types": "./index.d.ts",
@@ -42,12 +42,12 @@ export declare class AI extends APIResource {
42
42
  openai: OpenAIAPI.OpenAI;
43
43
  tools: ToolsAPI.Tools;
44
44
  /**
45
- * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. Chat with a language
46
- * model. This endpoint is consistent with the
47
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
45
+ * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. This endpoint is
46
+ * compatible with the
47
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
48
48
  * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
49
- * supported at the moment. Use 'conversation' parameter to leverage persistent
50
- * conversations feature.
49
+ * supported at the moment. Use the `conversation` parameter with a Telnyx
50
+ * Conversation ID to leverage persistent conversations.
51
51
  *
52
52
  * @deprecated
53
53
  */
@@ -42,12 +42,12 @@ export declare class AI extends APIResource {
42
42
  openai: OpenAIAPI.OpenAI;
43
43
  tools: ToolsAPI.Tools;
44
44
  /**
45
- * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. Chat with a language
46
- * model. This endpoint is consistent with the
47
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
45
+ * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. This endpoint is
46
+ * compatible with the
47
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
48
48
  * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
49
- * supported at the moment. Use 'conversation' parameter to leverage persistent
50
- * conversations feature.
49
+ * supported at the moment. Use the `conversation` parameter with a Telnyx
50
+ * Conversation ID to leverage persistent conversations.
51
51
  *
52
52
  * @deprecated
53
53
  */
@@ -48,12 +48,12 @@ class AI extends resource_1.APIResource {
48
48
  this.tools = new ToolsAPI.Tools(this._client);
49
49
  }
50
50
  /**
51
- * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. Chat with a language
52
- * model. This endpoint is consistent with the
53
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
51
+ * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. This endpoint is
52
+ * compatible with the
53
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
54
54
  * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
55
- * supported at the moment. Use 'conversation' parameter to leverage persistent
56
- * conversations feature.
55
+ * supported at the moment. Use the `conversation` parameter with a Telnyx
56
+ * Conversation ID to leverage persistent conversations.
57
57
  *
58
58
  * @deprecated
59
59
  */
@@ -44,12 +44,12 @@ export class AI extends APIResource {
44
44
  this.tools = new ToolsAPI.Tools(this._client);
45
45
  }
46
46
  /**
47
- * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. Chat with a language
48
- * model. This endpoint is consistent with the
49
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
47
+ * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. This endpoint is
48
+ * compatible with the
49
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
50
50
  * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
51
- * supported at the moment. Use 'conversation' parameter to leverage persistent
52
- * conversations feature.
51
+ * supported at the moment. Use the `conversation` parameter with a Telnyx
52
+ * Conversation ID to leverage persistent conversations.
53
53
  *
54
54
  * @deprecated
55
55
  */
@@ -10,20 +10,53 @@ export declare class OpenAI extends APIResource {
10
10
  embeddings: EmbeddingsAPI.Embeddings;
11
11
  chat: ChatAPI.Chat;
12
12
  /**
13
- * Chat with a language model. This endpoint is consistent with the
14
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
15
- * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
16
- * supported at the moment. Use 'conversation' parameter to leverage persistent
17
- * conversations feature.
13
+ * Create a response using Telnyx's OpenAI-compatible Responses API. This endpoint
14
+ * is compatible with the
15
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
16
+ * and may be used with the OpenAI JS or Python SDK by setting the base URL to
17
+ * `https://api.telnyx.com/v2/ai/openai`.
18
+ *
19
+ * The `conversation` parameter refers to a Telnyx Conversation rather than an
20
+ * OpenAI-hosted conversation object. To persist a thread across turns, first
21
+ * [create a conversation](https://developers.telnyx.com/api-reference/conversations/create-a-conversation)
22
+ * with `POST /ai/conversations`, then pass that conversation's `id` in the
23
+ * Responses request as `conversation`. The endpoint appends the new input,
24
+ * assistant output, reasoning, and tool-call messages to that conversation. Reuse
25
+ * the same `conversation` id on subsequent Responses requests, including
26
+ * tool-result followups, so the model receives the prior context.
27
+ *
28
+ * If `conversation` is omitted, the request is processed without persisting
29
+ * messages to a Telnyx conversation. Use the Conversations API to manage history:
30
+ * [list conversations](https://developers.telnyx.com/api-reference/conversations/list-conversations)
31
+ * (optionally filtered by metadata),
32
+ * [fetch messages](https://developers.telnyx.com/api-reference/conversations/get-conversation-messages)
33
+ * for a conversation, and optionally
34
+ * [add messages](https://developers.telnyx.com/api-reference/conversations/create-message)
35
+ * outside the Responses flow.
36
+ *
37
+ * You can attach arbitrary metadata when creating a conversation (for example to
38
+ * tag the conversation's source, channel, or user) and later filter by it when
39
+ * listing conversations.
18
40
  *
19
41
  * @example
20
42
  * ```ts
21
43
  * const response = await client.ai.openai.createResponse({
22
- * body: { model: 'bar', input: 'bar' },
44
+ * conversation: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
45
+ * input: [
46
+ * {
47
+ * role: 'user',
48
+ * content: [
49
+ * { type: 'input_text', text: 'Hello, world!' },
50
+ * ],
51
+ * },
52
+ * ],
53
+ * instructions: 'You are a friendly chatbot.',
54
+ * model: 'zai-org/GLM-5.1-FP8',
55
+ * stream: true,
23
56
  * });
24
57
  * ```
25
58
  */
26
- createResponse(params: OpenAICreateResponseParams, options?: RequestOptions): APIPromise<OpenAICreateResponseResponse>;
59
+ createResponse(body: OpenAICreateResponseParams, options?: RequestOptions): APIPromise<OpenAICreateResponseResponse>;
27
60
  /**
28
61
  * Lists every model currently available to your account on Telnyx Inference,
29
62
  * including SOTA open-source LLMs hosted on Telnyx GPUs (for example
@@ -56,9 +89,34 @@ export interface OpenAIListModelsResponse {
56
89
  object?: string;
57
90
  }
58
91
  export interface OpenAICreateResponseParams {
59
- body: {
60
- [key: string]: unknown;
61
- };
92
+ /**
93
+ * Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
94
+ * Telnyx stores this turn on that conversation and uses the conversation's prior
95
+ * messages as context. Reuse the same ID for subsequent turns and tool-result
96
+ * followups. Omit it for a non-persisted, stateless response.
97
+ */
98
+ conversation?: string;
99
+ /**
100
+ * The input items for this turn, using the OpenAI Responses API input format.
101
+ */
102
+ input?: unknown;
103
+ /**
104
+ * Optional system/developer instructions for the model. When used with a persisted
105
+ * `conversation`, send these on the first request that creates the thread;
106
+ * subsequent turns can rely on the stored history.
107
+ */
108
+ instructions?: string;
109
+ /**
110
+ * Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
111
+ * another model available from the Telnyx OpenAI-compatible models endpoint.
112
+ */
113
+ model?: string;
114
+ /**
115
+ * Set to `true` to stream Server-Sent Events, matching OpenAI's Responses
116
+ * streaming format.
117
+ */
118
+ stream?: boolean;
119
+ [k: string]: unknown;
62
120
  }
63
121
  export declare namespace OpenAI {
64
122
  export { type OpenAICreateResponseResponse as OpenAICreateResponseResponse, type OpenAIListModelsResponse as OpenAIListModelsResponse, type OpenAICreateResponseParams as OpenAICreateResponseParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"openai.d.mts","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,KAAK;OACV,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,0BAA0B,EAAE,4BAA4B,EAAE;OAClE,KAAK,aAAa;OAClB,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,oCAAoC,EACpC,UAAU,EACX;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAClF,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IAEpD;;;;;;;;;;;;;OAaG;IACH,cAAc,CACZ,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAK3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAA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ACZ,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -10,20 +10,53 @@ export declare class OpenAI extends APIResource {
10
10
  embeddings: EmbeddingsAPI.Embeddings;
11
11
  chat: ChatAPI.Chat;
12
12
  /**
13
- * Chat with a language model. This endpoint is consistent with the
14
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
15
- * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
16
- * supported at the moment. Use 'conversation' parameter to leverage persistent
17
- * conversations feature.
13
+ * Create a response using Telnyx's OpenAI-compatible Responses API. This endpoint
14
+ * is compatible with the
15
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
16
+ * and may be used with the OpenAI JS or Python SDK by setting the base URL to
17
+ * `https://api.telnyx.com/v2/ai/openai`.
18
+ *
19
+ * The `conversation` parameter refers to a Telnyx Conversation rather than an
20
+ * OpenAI-hosted conversation object. To persist a thread across turns, first
21
+ * [create a conversation](https://developers.telnyx.com/api-reference/conversations/create-a-conversation)
22
+ * with `POST /ai/conversations`, then pass that conversation's `id` in the
23
+ * Responses request as `conversation`. The endpoint appends the new input,
24
+ * assistant output, reasoning, and tool-call messages to that conversation. Reuse
25
+ * the same `conversation` id on subsequent Responses requests, including
26
+ * tool-result followups, so the model receives the prior context.
27
+ *
28
+ * If `conversation` is omitted, the request is processed without persisting
29
+ * messages to a Telnyx conversation. Use the Conversations API to manage history:
30
+ * [list conversations](https://developers.telnyx.com/api-reference/conversations/list-conversations)
31
+ * (optionally filtered by metadata),
32
+ * [fetch messages](https://developers.telnyx.com/api-reference/conversations/get-conversation-messages)
33
+ * for a conversation, and optionally
34
+ * [add messages](https://developers.telnyx.com/api-reference/conversations/create-message)
35
+ * outside the Responses flow.
36
+ *
37
+ * You can attach arbitrary metadata when creating a conversation (for example to
38
+ * tag the conversation's source, channel, or user) and later filter by it when
39
+ * listing conversations.
18
40
  *
19
41
  * @example
20
42
  * ```ts
21
43
  * const response = await client.ai.openai.createResponse({
22
- * body: { model: 'bar', input: 'bar' },
44
+ * conversation: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
45
+ * input: [
46
+ * {
47
+ * role: 'user',
48
+ * content: [
49
+ * { type: 'input_text', text: 'Hello, world!' },
50
+ * ],
51
+ * },
52
+ * ],
53
+ * instructions: 'You are a friendly chatbot.',
54
+ * model: 'zai-org/GLM-5.1-FP8',
55
+ * stream: true,
23
56
  * });
24
57
  * ```
25
58
  */
26
- createResponse(params: OpenAICreateResponseParams, options?: RequestOptions): APIPromise<OpenAICreateResponseResponse>;
59
+ createResponse(body: OpenAICreateResponseParams, options?: RequestOptions): APIPromise<OpenAICreateResponseResponse>;
27
60
  /**
28
61
  * Lists every model currently available to your account on Telnyx Inference,
29
62
  * including SOTA open-source LLMs hosted on Telnyx GPUs (for example
@@ -56,9 +89,34 @@ export interface OpenAIListModelsResponse {
56
89
  object?: string;
57
90
  }
58
91
  export interface OpenAICreateResponseParams {
59
- body: {
60
- [key: string]: unknown;
61
- };
92
+ /**
93
+ * Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
94
+ * Telnyx stores this turn on that conversation and uses the conversation's prior
95
+ * messages as context. Reuse the same ID for subsequent turns and tool-result
96
+ * followups. Omit it for a non-persisted, stateless response.
97
+ */
98
+ conversation?: string;
99
+ /**
100
+ * The input items for this turn, using the OpenAI Responses API input format.
101
+ */
102
+ input?: unknown;
103
+ /**
104
+ * Optional system/developer instructions for the model. When used with a persisted
105
+ * `conversation`, send these on the first request that creates the thread;
106
+ * subsequent turns can rely on the stored history.
107
+ */
108
+ instructions?: string;
109
+ /**
110
+ * Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
111
+ * another model available from the Telnyx OpenAI-compatible models endpoint.
112
+ */
113
+ model?: string;
114
+ /**
115
+ * Set to `true` to stream Server-Sent Events, matching OpenAI's Responses
116
+ * streaming format.
117
+ */
118
+ stream?: boolean;
119
+ [k: string]: unknown;
62
120
  }
63
121
  export declare namespace OpenAI {
64
122
  export { type OpenAICreateResponseResponse as OpenAICreateResponseResponse, type OpenAIListModelsResponse as OpenAIListModelsResponse, type OpenAICreateResponseParams as OpenAICreateResponseParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,KAAK;OACV,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,0BAA0B,EAAE,4BAA4B,EAAE;OAClE,KAAK,aAAa;OAClB,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,oCAAoC,EACpC,UAAU,EACX;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAClF,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IAEpD;;;;;;;;;;;;;OAaG;IACH,cAAc,CACZ,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAK3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAG3E;AAED,MAAM,MAAM,4BAA4B,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAEtE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAEjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAClC;AAKD,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO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AW,wBAAwB;IACvC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAEjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAKD,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -15,22 +15,54 @@ class OpenAI extends resource_1.APIResource {
15
15
  this.chat = new ChatAPI.Chat(this._client);
16
16
  }
17
17
  /**
18
- * Chat with a language model. This endpoint is consistent with the
19
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
20
- * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
21
- * supported at the moment. Use 'conversation' parameter to leverage persistent
22
- * conversations feature.
18
+ * Create a response using Telnyx's OpenAI-compatible Responses API. This endpoint
19
+ * is compatible with the
20
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
21
+ * and may be used with the OpenAI JS or Python SDK by setting the base URL to
22
+ * `https://api.telnyx.com/v2/ai/openai`.
23
+ *
24
+ * The `conversation` parameter refers to a Telnyx Conversation rather than an
25
+ * OpenAI-hosted conversation object. To persist a thread across turns, first
26
+ * [create a conversation](https://developers.telnyx.com/api-reference/conversations/create-a-conversation)
27
+ * with `POST /ai/conversations`, then pass that conversation's `id` in the
28
+ * Responses request as `conversation`. The endpoint appends the new input,
29
+ * assistant output, reasoning, and tool-call messages to that conversation. Reuse
30
+ * the same `conversation` id on subsequent Responses requests, including
31
+ * tool-result followups, so the model receives the prior context.
32
+ *
33
+ * If `conversation` is omitted, the request is processed without persisting
34
+ * messages to a Telnyx conversation. Use the Conversations API to manage history:
35
+ * [list conversations](https://developers.telnyx.com/api-reference/conversations/list-conversations)
36
+ * (optionally filtered by metadata),
37
+ * [fetch messages](https://developers.telnyx.com/api-reference/conversations/get-conversation-messages)
38
+ * for a conversation, and optionally
39
+ * [add messages](https://developers.telnyx.com/api-reference/conversations/create-message)
40
+ * outside the Responses flow.
41
+ *
42
+ * You can attach arbitrary metadata when creating a conversation (for example to
43
+ * tag the conversation's source, channel, or user) and later filter by it when
44
+ * listing conversations.
23
45
  *
24
46
  * @example
25
47
  * ```ts
26
48
  * const response = await client.ai.openai.createResponse({
27
- * body: { model: 'bar', input: 'bar' },
49
+ * conversation: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
50
+ * input: [
51
+ * {
52
+ * role: 'user',
53
+ * content: [
54
+ * { type: 'input_text', text: 'Hello, world!' },
55
+ * ],
56
+ * },
57
+ * ],
58
+ * instructions: 'You are a friendly chatbot.',
59
+ * model: 'zai-org/GLM-5.1-FP8',
60
+ * stream: true,
28
61
  * });
29
62
  * ```
30
63
  */
31
- createResponse(params, options) {
32
- const { body } = params;
33
- return this._client.post('/ai/openai/responses', { body: body, ...options });
64
+ createResponse(body, options) {
65
+ return this._client.post('/ai/openai/responses', { body, ...options });
34
66
  }
35
67
  /**
36
68
  * Lists every model currently available to your account on Telnyx Inference,
@@ -1 +1 @@
1
- {"version":3,"file":"openai.js","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,2DAAkC;AAClC,oCAAwF;AACxF,uEAA8C;AAC9C,gDAKsB;AAItB,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiDtD,CAAC;IA/CC;;;;;;;;;;;;;OAaG;IACH,cAAc,CACZ,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AAnDD,wBAmDC;AAcD,MAAM,CAAC,UAAU,GAAG,uBAAU,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAG,WAAI,CAAC"}
1
+ {"version":3,"file":"openai.js","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,2DAAkC;AAClC,oCAAwF;AACxF,uEAA8C;AAC9C,gDAKsB;AAItB,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiFtD,CAAC;IA/EC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,cAAc,CACZ,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AAnFD,wBAmFC;AA8CD,MAAM,CAAC,UAAU,GAAG,uBAAU,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAG,WAAI,CAAC"}
@@ -11,22 +11,54 @@ export class OpenAI extends APIResource {
11
11
  this.chat = new ChatAPI.Chat(this._client);
12
12
  }
13
13
  /**
14
- * Chat with a language model. This endpoint is consistent with the
15
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
16
- * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
17
- * supported at the moment. Use 'conversation' parameter to leverage persistent
18
- * conversations feature.
14
+ * Create a response using Telnyx's OpenAI-compatible Responses API. This endpoint
15
+ * is compatible with the
16
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
17
+ * and may be used with the OpenAI JS or Python SDK by setting the base URL to
18
+ * `https://api.telnyx.com/v2/ai/openai`.
19
+ *
20
+ * The `conversation` parameter refers to a Telnyx Conversation rather than an
21
+ * OpenAI-hosted conversation object. To persist a thread across turns, first
22
+ * [create a conversation](https://developers.telnyx.com/api-reference/conversations/create-a-conversation)
23
+ * with `POST /ai/conversations`, then pass that conversation's `id` in the
24
+ * Responses request as `conversation`. The endpoint appends the new input,
25
+ * assistant output, reasoning, and tool-call messages to that conversation. Reuse
26
+ * the same `conversation` id on subsequent Responses requests, including
27
+ * tool-result followups, so the model receives the prior context.
28
+ *
29
+ * If `conversation` is omitted, the request is processed without persisting
30
+ * messages to a Telnyx conversation. Use the Conversations API to manage history:
31
+ * [list conversations](https://developers.telnyx.com/api-reference/conversations/list-conversations)
32
+ * (optionally filtered by metadata),
33
+ * [fetch messages](https://developers.telnyx.com/api-reference/conversations/get-conversation-messages)
34
+ * for a conversation, and optionally
35
+ * [add messages](https://developers.telnyx.com/api-reference/conversations/create-message)
36
+ * outside the Responses flow.
37
+ *
38
+ * You can attach arbitrary metadata when creating a conversation (for example to
39
+ * tag the conversation's source, channel, or user) and later filter by it when
40
+ * listing conversations.
19
41
  *
20
42
  * @example
21
43
  * ```ts
22
44
  * const response = await client.ai.openai.createResponse({
23
- * body: { model: 'bar', input: 'bar' },
45
+ * conversation: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
46
+ * input: [
47
+ * {
48
+ * role: 'user',
49
+ * content: [
50
+ * { type: 'input_text', text: 'Hello, world!' },
51
+ * ],
52
+ * },
53
+ * ],
54
+ * instructions: 'You are a friendly chatbot.',
55
+ * model: 'zai-org/GLM-5.1-FP8',
56
+ * stream: true,
24
57
  * });
25
58
  * ```
26
59
  */
27
- createResponse(params, options) {
28
- const { body } = params;
29
- return this._client.post('/ai/openai/responses', { body: body, ...options });
60
+ createResponse(body, options) {
61
+ return this._client.post('/ai/openai/responses', { body, ...options });
30
62
  }
31
63
  /**
32
64
  * Lists every model currently available to your account on Telnyx Inference,
@@ -1 +1 @@
1
- {"version":3,"file":"openai.mjs","sourceRoot":"","sources":["../../../src/resources/ai/openai/openai.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,OAAO;OACZ,EAAE,IAAI,EAA4D;OAClE,KAAK,aAAa;OAClB,EAIL,UAAU,GACX;AAID,MAAM,OAAO,MAAO,SAAQ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OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,OAAwB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AA8CD,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC"}
@@ -14,6 +14,17 @@ export declare class Texml extends APIResource {
14
14
  * client state, and calls the dial API. The Twiml, Texml, and Url parameters are
15
15
  * not allowed and will result in a 422 error.
16
16
  *
17
+ * **Expected callback events:**
18
+ *
19
+ * Status callbacks: `initiated`, `ringing`, `answered`, one terminal status
20
+ * (`completed`, `no-answer`, `busy`, `canceled`, or `failed`), then `analyzed`
21
+ * after post-call processing completes.
22
+ *
23
+ * Conversation callbacks: `conversation_created` and `conversation_ended`.
24
+ *
25
+ * Recording, AMD, transcription, and deepfake detection callbacks are only sent
26
+ * when those features are enabled.
27
+ *
17
28
  * @example
18
29
  * ```ts
19
30
  * const response = await client.texml.initiateAICall(
@@ -105,15 +116,17 @@ export interface TexmlInitiateAICallParams {
105
116
  */
106
117
  CallerId?: string;
107
118
  /**
108
- * URL destination for Telnyx to send conversation callback events to.
119
+ * URL destination for Telnyx to send AI conversation callback events for this
120
+ * call. Events include `conversation_created` and `conversation_ended`.
109
121
  */
110
122
  ConversationCallback?: string;
111
123
  /**
112
- * HTTP request type used for `ConversationCallback`.
124
+ * HTTP request type used for `ConversationCallback` and `ConversationCallbacks`.
113
125
  */
114
126
  ConversationCallbackMethod?: 'GET' | 'POST';
115
127
  /**
116
- * An array of URL destinations for conversation callback events.
128
+ * Array of URL destinations for AI conversation callback events for this call.
129
+ * Events include `conversation_created` and `conversation_ended`.
117
130
  */
118
131
  ConversationCallbacks?: Array<string>;
119
132
  /**
@@ -205,22 +218,29 @@ export interface TexmlInitiateAICallParams {
205
218
  */
206
219
  SipRegion?: 'US' | 'Europe' | 'Canada' | 'Australia' | 'Middle East';
207
220
  /**
208
- * URL destination for Telnyx to send status callback events to for the call.
221
+ * URL destination for Telnyx to send status callback events for this AI call. When
222
+ * provided, this per-call value overrides the status callback URL configured on
223
+ * the TeXML application/connection.
209
224
  */
210
225
  StatusCallback?: string;
211
226
  /**
212
- * The call events for which Telnyx should send a webhook. Multiple events can be
213
- * defined when separated by a space. Valid values: initiated, ringing, answered,
214
- * completed.
227
+ * The status callback events for which Telnyx should send a webhook for this AI
228
+ * call. Multiple events can be defined when separated by a space. Valid values:
229
+ * initiated, ringing, answered, completed, no-answer, busy, canceled, failed,
230
+ * analyzed. When provided, this per-call value overrides the status callback
231
+ * events configured on the TeXML application/connection.
215
232
  */
216
233
  StatusCallbackEvent?: string;
217
234
  /**
218
- * HTTP request type used for `StatusCallback`.
235
+ * HTTP request type used for `StatusCallback` and `StatusCallbacks` for this AI
236
+ * call. When provided, this per-call value overrides the status callback method
237
+ * configured on the TeXML application/connection.
219
238
  */
220
239
  StatusCallbackMethod?: 'GET' | 'POST';
221
240
  /**
222
- * An array of URL destinations for Telnyx to send status callback events to for
223
- * the call.
241
+ * Array of URL destinations for Telnyx to send status callback events for this AI
242
+ * call. When provided, these per-call values override the status callback URL
243
+ * configured on the TeXML application/connection.
224
244
  */
225
245
  StatusCallbacks?: Array<string>;
226
246
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"texml.d.mts","sourceRoot":"","sources":["../../src/resources/texml/texml.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,mCAAmC,EACnC,qCAAqC,EACrC,uCAAuC,EACvC,yCAAyC,EACzC,QAAQ,EACR,iCAAiC,EACjC,8BAA8B,EAC/B;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,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AAK,EAAE,MAAM,CAAC;CACf;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,uCAAuC,IAAI,uCAAuC,GACxF,CAAC;CACH"}
@@ -14,6 +14,17 @@ export declare class Texml extends APIResource {
14
14
  * client state, and calls the dial API. The Twiml, Texml, and Url parameters are
15
15
  * not allowed and will result in a 422 error.
16
16
  *
17
+ * **Expected callback events:**
18
+ *
19
+ * Status callbacks: `initiated`, `ringing`, `answered`, one terminal status
20
+ * (`completed`, `no-answer`, `busy`, `canceled`, or `failed`), then `analyzed`
21
+ * after post-call processing completes.
22
+ *
23
+ * Conversation callbacks: `conversation_created` and `conversation_ended`.
24
+ *
25
+ * Recording, AMD, transcription, and deepfake detection callbacks are only sent
26
+ * when those features are enabled.
27
+ *
17
28
  * @example
18
29
  * ```ts
19
30
  * const response = await client.texml.initiateAICall(
@@ -105,15 +116,17 @@ export interface TexmlInitiateAICallParams {
105
116
  */
106
117
  CallerId?: string;
107
118
  /**
108
- * URL destination for Telnyx to send conversation callback events to.
119
+ * URL destination for Telnyx to send AI conversation callback events for this
120
+ * call. Events include `conversation_created` and `conversation_ended`.
109
121
  */
110
122
  ConversationCallback?: string;
111
123
  /**
112
- * HTTP request type used for `ConversationCallback`.
124
+ * HTTP request type used for `ConversationCallback` and `ConversationCallbacks`.
113
125
  */
114
126
  ConversationCallbackMethod?: 'GET' | 'POST';
115
127
  /**
116
- * An array of URL destinations for conversation callback events.
128
+ * Array of URL destinations for AI conversation callback events for this call.
129
+ * Events include `conversation_created` and `conversation_ended`.
117
130
  */
118
131
  ConversationCallbacks?: Array<string>;
119
132
  /**
@@ -205,22 +218,29 @@ export interface TexmlInitiateAICallParams {
205
218
  */
206
219
  SipRegion?: 'US' | 'Europe' | 'Canada' | 'Australia' | 'Middle East';
207
220
  /**
208
- * URL destination for Telnyx to send status callback events to for the call.
221
+ * URL destination for Telnyx to send status callback events for this AI call. When
222
+ * provided, this per-call value overrides the status callback URL configured on
223
+ * the TeXML application/connection.
209
224
  */
210
225
  StatusCallback?: string;
211
226
  /**
212
- * The call events for which Telnyx should send a webhook. Multiple events can be
213
- * defined when separated by a space. Valid values: initiated, ringing, answered,
214
- * completed.
227
+ * The status callback events for which Telnyx should send a webhook for this AI
228
+ * call. Multiple events can be defined when separated by a space. Valid values:
229
+ * initiated, ringing, answered, completed, no-answer, busy, canceled, failed,
230
+ * analyzed. When provided, this per-call value overrides the status callback
231
+ * events configured on the TeXML application/connection.
215
232
  */
216
233
  StatusCallbackEvent?: string;
217
234
  /**
218
- * HTTP request type used for `StatusCallback`.
235
+ * HTTP request type used for `StatusCallback` and `StatusCallbacks` for this AI
236
+ * call. When provided, this per-call value overrides the status callback method
237
+ * configured on the TeXML application/connection.
219
238
  */
220
239
  StatusCallbackMethod?: 'GET' | 'POST';
221
240
  /**
222
- * An array of URL destinations for Telnyx to send status callback events to for
223
- * the call.
241
+ * Array of URL destinations for Telnyx to send status callback events for this AI
242
+ * call. When provided, these per-call values override the status callback URL
243
+ * configured on the TeXML application/connection.
224
244
  */
225
245
  StatusCallbacks?: Array<string>;
226
246
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"texml.d.ts","sourceRoot":"","sources":["../../src/resources/texml/texml.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,mCAAmC,EACnC,qCA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I,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,uCAAuC,IAAI,uCAAuC,GACxF,CAAC;CACH"}
@@ -21,6 +21,17 @@ class Texml extends resource_1.APIResource {
21
21
  * client state, and calls the dial API. The Twiml, Texml, and Url parameters are
22
22
  * not allowed and will result in a 422 error.
23
23
  *
24
+ * **Expected callback events:**
25
+ *
26
+ * Status callbacks: `initiated`, `ringing`, `answered`, one terminal status
27
+ * (`completed`, `no-answer`, `busy`, `canceled`, or `failed`), then `analyzed`
28
+ * after post-call processing completes.
29
+ *
30
+ * Conversation callbacks: `conversation_created` and `conversation_ended`.
31
+ *
32
+ * Recording, AMD, transcription, and deepfake detection callbacks are only sent
33
+ * when those features are enabled.
34
+ *
24
35
  * @example
25
36
  * ```ts
26
37
  * const response = await client.texml.initiateAICall(
@@ -1 +1 @@
1
- {"version":3,"file":"texml.js","sourceRoot":"","sources":["../../src/resources/texml/texml.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,4EAAmD;AACnD,qDAQ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AG,MAAM,CAAC;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mBAAmB,YAAY,EAAE,EAAE;YAC9D,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE;YAC3C,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,IAAwB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AA9DD,sBA8DC;AAsRD,KAAK,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
@@ -17,6 +17,17 @@ export class Texml extends APIResource {
17
17
  * client state, and calls the dial API. The Twiml, Texml, and Url parameters are
18
18
  * not allowed and will result in a 422 error.
19
19
  *
20
+ * **Expected callback events:**
21
+ *
22
+ * Status callbacks: `initiated`, `ringing`, `answered`, one terminal status
23
+ * (`completed`, `no-answer`, `busy`, `canceled`, or `failed`), then `analyzed`
24
+ * after post-call processing completes.
25
+ *
26
+ * Conversation callbacks: `conversation_created` and `conversation_ended`.
27
+ *
28
+ * Recording, AMD, transcription, and deepfake detection callbacks are only sent
29
+ * when those features are enabled.
30
+ *
20
31
  * @example
21
32
  * ```ts
22
33
  * const response = await client.texml.initiateAICall(
@@ -1 +1 @@
1
- {"version":3,"file":"texml.mjs","sourceRoot":"","sources":["../../src/resources/texml/texml.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAKL,QAAQ,GAGT;OAGM,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAk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AAE,GAAG,IAAI,EAAE;YAC3C,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,IAAwB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAsRD,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
@@ -167,12 +167,12 @@ export class AI extends APIResource {
167
167
  tools: ToolsAPI.Tools = new ToolsAPI.Tools(this._client);
168
168
 
169
169
  /**
170
- * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. Chat with a language
171
- * model. This endpoint is consistent with the
172
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
170
+ * **Deprecated**: Use `POST /v2/ai/openai/responses` instead. This endpoint is
171
+ * compatible with the
172
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
173
173
  * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
174
- * supported at the moment. Use 'conversation' parameter to leverage persistent
175
- * conversations feature.
174
+ * supported at the moment. Use the `conversation` parameter with a Telnyx
175
+ * Conversation ID to leverage persistent conversations.
176
176
  *
177
177
  * @deprecated
178
178
  */
@@ -19,25 +19,57 @@ export class OpenAI extends APIResource {
19
19
  chat: ChatAPI.Chat = new ChatAPI.Chat(this._client);
20
20
 
21
21
  /**
22
- * Chat with a language model. This endpoint is consistent with the
23
- * [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)
24
- * and may be used with the OpenAI JS or Python SDK. Response id parameter is not
25
- * supported at the moment. Use 'conversation' parameter to leverage persistent
26
- * conversations feature.
22
+ * Create a response using Telnyx's OpenAI-compatible Responses API. This endpoint
23
+ * is compatible with the
24
+ * [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
25
+ * and may be used with the OpenAI JS or Python SDK by setting the base URL to
26
+ * `https://api.telnyx.com/v2/ai/openai`.
27
+ *
28
+ * The `conversation` parameter refers to a Telnyx Conversation rather than an
29
+ * OpenAI-hosted conversation object. To persist a thread across turns, first
30
+ * [create a conversation](https://developers.telnyx.com/api-reference/conversations/create-a-conversation)
31
+ * with `POST /ai/conversations`, then pass that conversation's `id` in the
32
+ * Responses request as `conversation`. The endpoint appends the new input,
33
+ * assistant output, reasoning, and tool-call messages to that conversation. Reuse
34
+ * the same `conversation` id on subsequent Responses requests, including
35
+ * tool-result followups, so the model receives the prior context.
36
+ *
37
+ * If `conversation` is omitted, the request is processed without persisting
38
+ * messages to a Telnyx conversation. Use the Conversations API to manage history:
39
+ * [list conversations](https://developers.telnyx.com/api-reference/conversations/list-conversations)
40
+ * (optionally filtered by metadata),
41
+ * [fetch messages](https://developers.telnyx.com/api-reference/conversations/get-conversation-messages)
42
+ * for a conversation, and optionally
43
+ * [add messages](https://developers.telnyx.com/api-reference/conversations/create-message)
44
+ * outside the Responses flow.
45
+ *
46
+ * You can attach arbitrary metadata when creating a conversation (for example to
47
+ * tag the conversation's source, channel, or user) and later filter by it when
48
+ * listing conversations.
27
49
  *
28
50
  * @example
29
51
  * ```ts
30
52
  * const response = await client.ai.openai.createResponse({
31
- * body: { model: 'bar', input: 'bar' },
53
+ * conversation: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
54
+ * input: [
55
+ * {
56
+ * role: 'user',
57
+ * content: [
58
+ * { type: 'input_text', text: 'Hello, world!' },
59
+ * ],
60
+ * },
61
+ * ],
62
+ * instructions: 'You are a friendly chatbot.',
63
+ * model: 'zai-org/GLM-5.1-FP8',
64
+ * stream: true,
32
65
  * });
33
66
  * ```
34
67
  */
35
68
  createResponse(
36
- params: OpenAICreateResponseParams,
69
+ body: OpenAICreateResponseParams,
37
70
  options?: RequestOptions,
38
71
  ): APIPromise<OpenAICreateResponseResponse> {
39
- const { body } = params;
40
- return this._client.post('/ai/openai/responses', { body: body, ...options });
72
+ return this._client.post('/ai/openai/responses', { body, ...options });
41
73
  }
42
74
 
43
75
  /**
@@ -76,7 +108,39 @@ export interface OpenAIListModelsResponse {
76
108
  }
77
109
 
78
110
  export interface OpenAICreateResponseParams {
79
- body: { [key: string]: unknown };
111
+ /**
112
+ * Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
113
+ * Telnyx stores this turn on that conversation and uses the conversation's prior
114
+ * messages as context. Reuse the same ID for subsequent turns and tool-result
115
+ * followups. Omit it for a non-persisted, stateless response.
116
+ */
117
+ conversation?: string;
118
+
119
+ /**
120
+ * The input items for this turn, using the OpenAI Responses API input format.
121
+ */
122
+ input?: unknown;
123
+
124
+ /**
125
+ * Optional system/developer instructions for the model. When used with a persisted
126
+ * `conversation`, send these on the first request that creates the thread;
127
+ * subsequent turns can rely on the stored history.
128
+ */
129
+ instructions?: string;
130
+
131
+ /**
132
+ * Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
133
+ * another model available from the Telnyx OpenAI-compatible models endpoint.
134
+ */
135
+ model?: string;
136
+
137
+ /**
138
+ * Set to `true` to stream Server-Sent Events, matching OpenAI's Responses
139
+ * streaming format.
140
+ */
141
+ stream?: boolean;
142
+
143
+ [k: string]: unknown;
80
144
  }
81
145
 
82
146
  OpenAI.Embeddings = Embeddings;
@@ -27,6 +27,17 @@ export class Texml extends APIResource {
27
27
  * client state, and calls the dial API. The Twiml, Texml, and Url parameters are
28
28
  * not allowed and will result in a 422 error.
29
29
  *
30
+ * **Expected callback events:**
31
+ *
32
+ * Status callbacks: `initiated`, `ringing`, `answered`, one terminal status
33
+ * (`completed`, `no-answer`, `busy`, `canceled`, or `failed`), then `analyzed`
34
+ * after post-call processing completes.
35
+ *
36
+ * Conversation callbacks: `conversation_created` and `conversation_ended`.
37
+ *
38
+ * Recording, AMD, transcription, and deepfake detection callbacks are only sent
39
+ * when those features are enabled.
40
+ *
30
41
  * @example
31
42
  * ```ts
32
43
  * const response = await client.texml.initiateAICall(
@@ -146,17 +157,19 @@ export interface TexmlInitiateAICallParams {
146
157
  CallerId?: string;
147
158
 
148
159
  /**
149
- * URL destination for Telnyx to send conversation callback events to.
160
+ * URL destination for Telnyx to send AI conversation callback events for this
161
+ * call. Events include `conversation_created` and `conversation_ended`.
150
162
  */
151
163
  ConversationCallback?: string;
152
164
 
153
165
  /**
154
- * HTTP request type used for `ConversationCallback`.
166
+ * HTTP request type used for `ConversationCallback` and `ConversationCallbacks`.
155
167
  */
156
168
  ConversationCallbackMethod?: 'GET' | 'POST';
157
169
 
158
170
  /**
159
- * An array of URL destinations for conversation callback events.
171
+ * Array of URL destinations for AI conversation callback events for this call.
172
+ * Events include `conversation_created` and `conversation_ended`.
160
173
  */
161
174
  ConversationCallbacks?: Array<string>;
162
175
 
@@ -269,25 +282,32 @@ export interface TexmlInitiateAICallParams {
269
282
  SipRegion?: 'US' | 'Europe' | 'Canada' | 'Australia' | 'Middle East';
270
283
 
271
284
  /**
272
- * URL destination for Telnyx to send status callback events to for the call.
285
+ * URL destination for Telnyx to send status callback events for this AI call. When
286
+ * provided, this per-call value overrides the status callback URL configured on
287
+ * the TeXML application/connection.
273
288
  */
274
289
  StatusCallback?: string;
275
290
 
276
291
  /**
277
- * The call events for which Telnyx should send a webhook. Multiple events can be
278
- * defined when separated by a space. Valid values: initiated, ringing, answered,
279
- * completed.
292
+ * The status callback events for which Telnyx should send a webhook for this AI
293
+ * call. Multiple events can be defined when separated by a space. Valid values:
294
+ * initiated, ringing, answered, completed, no-answer, busy, canceled, failed,
295
+ * analyzed. When provided, this per-call value overrides the status callback
296
+ * events configured on the TeXML application/connection.
280
297
  */
281
298
  StatusCallbackEvent?: string;
282
299
 
283
300
  /**
284
- * HTTP request type used for `StatusCallback`.
301
+ * HTTP request type used for `StatusCallback` and `StatusCallbacks` for this AI
302
+ * call. When provided, this per-call value overrides the status callback method
303
+ * configured on the TeXML application/connection.
285
304
  */
286
305
  StatusCallbackMethod?: 'GET' | 'POST';
287
306
 
288
307
  /**
289
- * An array of URL destinations for Telnyx to send status callback events to for
290
- * the call.
308
+ * Array of URL destinations for Telnyx to send status callback events for this AI
309
+ * call. When provided, these per-call values override the status callback URL
310
+ * configured on the TeXML application/connection.
291
311
  */
292
312
  StatusCallbacks?: Array<string>;
293
313
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.62.0'; // x-release-please-version
1
+ export const VERSION = '6.64.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.62.0";
1
+ export declare const VERSION = "6.64.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.62.0";
1
+ export declare const VERSION = "6.64.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '6.62.0'; // x-release-please-version
4
+ exports.VERSION = '6.64.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '6.62.0'; // x-release-please-version
1
+ export const VERSION = '6.64.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map