Telnyx_Test
  1. Chat
Telnyx_Test
  • Bucket
    • ListBuckets
      GET
    • DeleteBucket
      DELETE
    • HeadBucket
      HEAD
    • CreateBucket
      PUT
  • IP Addresses
    • List all Access IP Addresses
      GET
    • Create new Access IP Address
      POST
    • Delete access IP address
      DELETE
    • Retrieve an access IP address
      GET
  • IP Ranges
    • List all Access IP Ranges
      GET
    • Create new Access IP Range
      POST
    • Delete access IP ranges
      DELETE
  • SIM Cards
    • Purchase eSIMs
      POST
    • Register SIM cards
      POST
    • List SIM card data usage notifications
      GET
    • Create a new SIM card data usage notification
      POST
    • Delete SIM card data usage notifications
      DELETE
    • Get a single SIM card data usage notification
      GET
    • Updates information for a SIM Card Data Usage Notification
      PATCH
    • Get all SIM cards
      GET
    • Request bulk setting SIM card public IPs.
      POST
    • Validate SIM cards registration codes
      POST
    • Deletes a SIM card
      DELETE
    • Get SIM card
      GET
    • Update a SIM card
      PATCH
    • Request a SIM card disable
      POST
    • Request a SIM card enable
      POST
    • Request removing a SIM card public IP
      POST
    • Request setting a SIM card public IP
      POST
    • Request setting a SIM card to standby
      POST
    • Get activation code for an eSIM
      GET
    • Get SIM card device details
      GET
    • Get SIM card public IP definition
      GET
    • List wireless connectivity logs
      GET
  • Addresses
    • List all addresses
    • Creates an address
    • Validate an address
    • Deletes an address
    • Retrieve an address
    • Accepts this address suggestion as a new emergency address for Operator Connect and finishes the uploads of the numbers associated with it to Microsoft.
  • Advanced Number Orders
    • List Advanced Orders
    • Create Advanced Order
    • Get Advanced Order
  • Assistants
    • List assistants
    • Create an assistant
    • Import assistants from external provider
    • Delete an assistant
    • Get an assistant
    • Update an assistant
    • List scheduled events
    • Create a scheduled event
    • Delete a scheduled event
    • Get a scheduled event
    • Get assistant texml
    • Test Assistant Tool
  • Audio
    • Transcribe speech to text
  • Chat
    • Create a chat completion
      POST
    • Get available models
      GET
    • Summarize file content
      POST
  • Clusters
    • List all clusters
    • Compute new clusters
    • Delete a cluster
    • Fetch a cluster
    • Fetch a cluster visualization
  • Conversations
    • List conversations
    • Create a conversation
    • Delete a conversation
    • Get a conversation
    • Update conversation metadata
    • Get insights for a conversation
    • Get conversation messages
  • Embeddings
    • Get Tasks by Status
    • Embed documents
    • List embedded buckets
    • Disable AI for an Embedded Bucket
    • Get file-level embedding statuses for a bucket
    • Search for documents
    • Embed URL content
    • Get an embedding task's status
  • Fine Tuning
    • List fine tuning jobs
    • Create a fine tuning job
    • Get a fine tuning job
    • Cancel a fine tuning job
  • Audit Logs
    • List Audit Logs
  • Authentication Providers
    • List all SSO authentication providers
    • Creates an authentication provider
    • Deletes an authentication provider
    • Retrieve an authentication provider
    • Update an authentication provider
  • Phone Number Search
    • List available phone number blocks
    • List available phone numbers
  • Billing
    • Get user balance details
  • Billing Groups
    • List all billing groups
    • Create a billing group
    • Delete a billing group
    • Get a billing group
    • Update a billing group
  • Brands
    • List Brands
    • Create Brand
    • Get Brand Feedback By Id
    • Delete Brand
    • Get Brand
    • Update Brand
    • Resend brand 2FA email
    • List External Vettings
    • Order Brand External Vetting
    • Import External Vetting Record
    • Revet Brand
  • SIM Card Actions
    • List bulk SIM card actions
    • Get bulk SIM card action details
    • List SIM card actions
    • Get SIM card action details
  • Bundles
    • Retrieve Bundles
    • Get Bundle By Id
  • User Bundles
    • Get User Bundles
    • Create User Bundles
    • Get Unused User Bundles
    • Deactivate User Bundle
    • Get User Bundle by Id
    • Get User Bundle Resources
  • Call Control Applications
    • List call control applications
    • Create a call control application
    • Delete a call control application
    • Retrieve a call control application
    • Update a call control application
  • Debugging
    • List call events
  • Call Commands
    • Dial
    • Start AI Assistant
    • Stop AI Assistant
    • Answer call
    • Bridge calls
    • Update client state
    • Enqueue call
    • Forking start
    • Forking stop
    • Gather
    • Gather stop
    • Gather using AI
    • Gather using audio
    • Gather using speak
    • Hangup call
    • Remove call from a queue
    • Play audio URL
    • Stop audio playback
    • Record pause
    • Record resume
    • Recording start
    • Recording stop
    • SIP Refer a call
    • Reject a call
    • Send DTMF
    • Send SIP info
    • SIPREC start
    • SIPREC stop
    • Speak text
    • Streaming start
    • Streaming stop
    • Noise Suppression Start (BETA)
    • Noise Suppression Stop (BETA)
    • Transcription start
    • Transcription stop
    • Transfer call
  • Call Information
    • Retrieve a call status
    • List all active calls for given connection
  • Campaign
    • List Campaigns
    • Accept Shared Campaign
    • Get Campaign Cost
    • Deactivate My Campaign
    • Get My Campaign
    • Update My Campaign
    • Get Campaign Mno Metadata
    • Get My Campaign Operation Status
    • Get My Osr Campaign Attributes
    • Get Sharing Status
    • Submit Campaign
    • Qualify By Usecase
  • Voice Channels
    • List your voice channels for non-US zones
    • Update voice channels for non-US Zones
    • List your voice channels for US Zone
    • Update voice channels for US Zone
    • List All Numbers using Channel Billing
    • List Numbers using Channel Billing for a specific Zone
  • Phone Number Orders
    • Retrieve all comments
    • Create a comment
    • Retrieve a comment
    • Mark a comment as read
    • Retrieve a list of phone numbers associated to orders
    • Retrieve a single phone number within a number order.
    • Update requirements for a single phone number within a number order.
    • List number orders
    • Create a number order
    • Retrieve a number order
    • Update a number order
    • List sub number orders
    • Retrieve a sub number order
    • Update a sub number order's requirements
    • Cancel a sub number order
    • Create a sub number orders report
    • Retrieve a sub number orders report
    • Download a sub number orders report
  • Conference Commands
    • List conferences
    • Create conference
    • List conference participants
    • Retrieve a conference
    • Hold conference participants
    • Join a conference
    • Leave a conference
    • Mute conference participants
    • Play audio to conference participants
    • Conference recording pause
    • Conference recording resume
    • Conference recording start
    • Conference recording stop
    • Speak text to conference participants
    • Stop audio being played on the conference
    • Unhold conference participants
    • Unmute conference participants
    • Update conference participant
  • Connections
    • List connections
    • Retrieve a connection
  • Country Coverage
    • Get country coverage
    • Get coverage for a specific country
  • Credential Connections
    • List credential connections
    • Create a credential connection
    • Delete a credential connection
    • Retrieve a credential connection
    • Update a credential connection
    • Check a Credential Connection Registration Status
  • Call Recordings
    • Delete a stored credential
    • Retrieve a stored credential
    • Create a custom storage credential
    • Update a stored credential
    • List all recording transcriptions
    • Delete a recording transcription
    • Retrieve a recording transcription
    • List all call recordings
    • Delete a list of call recordings
    • Delete a call recording
    • Retrieve a call recording
  • Customer Service Record
    • List customer service records
    • Create a customer service record
    • Verify CSR phone number coverage
    • Get a customer service record
  • Detail Records
    • Search detail records
  • Dialogflow Integration
    • Delete stored Dialogflow Connection
    • Retrieve stored Dialogflow Connection
    • Create a Dialogflow Connection
    • Update stored Dialogflow Connection
  • Documents
    • List all document links
    • List all documents
    • Upload a document
    • Delete a document
    • Retrieve a document
    • Update a document
    • Download a document
  • Dynamic Emergency Addresses
    • List dynamic emergency addresses
    • Create a dynamic emergency address.
    • Delete a dynamic emergency address
    • Get a dynamic emergency address
  • Dynamic Emergency Endpoints
    • List dynamic emergency endpoints
    • Create a dynamic emergency endpoint.
    • Delete a dynamic emergency endpoint
    • Get a dynamic emergency endpoint
  • Enum
    • Get Enum
  • External Connections
    • List all External Connections
    • Creates an External Connection
    • List all log messages
    • Dismiss a log message
    • Retrieve a log message
    • Deletes an External Connection
    • Retrieve an External Connection
    • Update an External Connection
    • List all civic addresses and locations
    • Retrieve a Civic Address
    • Update a location's static emergency address
    • List all phone numbers
    • Retrieve a phone number
    • Update a phone number
    • List all Releases
    • Retrieve a Release request
    • List all Upload requests
    • Creates an Upload request
    • Refresh the status of all Upload requests
    • Get the count of pending upload requests
    • Retrieve an Upload request
    • Retry an Upload request
    • Refresh Operator Connect integration
  • Programmable Fax Applications
    • List all Fax Applications
    • Creates a Fax Application
    • Deletes a Fax Application
    • Retrieve a Fax Application
    • Update a Fax Application
  • Programmable Fax Commands
    • View a list of faxes
    • Send a fax
    • Delete a fax
    • View a fax
    • Cancel a fax
    • Refresh a fax
  • FQDN Connections
    • List FQDN connections
    • Create an FQDN connection
    • Delete an FQDN connection
    • Retrieve an FQDN connection
    • Update an FQDN connection
  • FQDNs
    • List FQDNs
    • Create an FQDN
    • Delete an FQDN
    • Retrieve an FQDN
    • Update an FQDN
  • Global IPs
    • List all Global IP Allowed Ports
    • Global IP Assignment Health Check Metrics
    • List all Global IP assignments
    • Create a Global IP assignment
    • Delete a Global IP assignment
    • Retrieve a Global IP
    • Update a Global IP assignment
    • Global IP Assignment Usage Metrics
    • List all Global IP Health check types
    • List all Global IP health checks
    • Create a Global IP health check
    • Delete a Global IP health check
    • Retrieve a Global IP health check
    • Global IP Latency Metrics
    • List all Global IP Protocols
    • Global IP Usage Metrics
    • List all Global IPs
    • Create a Global IP
    • Delete a Global IP
    • Retrieve a Global IP
  • Integration Secrets
    • List integration secrets
    • Create a secret
    • Delete an integration secret
  • Inventory Level
    • Create an inventory coverage request
  • IP Connections
    • List Ip connections
    • Create an Ip connection
    • Delete an Ip connection
    • Retrieve an Ip connection
    • Update an Ip connection
  • IPs
    • List Ips
    • Create an Ip
    • Delete an Ip
    • Retrieve an Ip
    • Update an Ip
  • Reports
    • Create a ledger billing group report
    • Get a ledger billing group report
  • Managed Accounts
    • Lists accounts managed by the current user.
    • Create a new managed account.
    • Display information about allocatable global outbound channels for the current user.
    • Retrieve a managed account
    • Update a managed account
    • Disables a managed account
    • Enables a managed account
    • Update the amount of allocatable global outbound channels allocated to a specific managed account.
  • Media Storage API
    • List uploaded media
    • Upload media
    • Deletes stored media
    • Retrieve stored media
    • Update stored media
    • Download stored media
  • Messages
    • Send a message
    • Send a group MMS message
    • Send a long code message
    • Send a message using number pool
    • Send a short code message
    • Retrieve a message
  • Messaging Hosted Number
    • List messaging hosted number orders
    • Create a messaging hosted number order
    • Check eligibility of phone numbers for hosted messaging
    • Retrieve a messaging hosted number order
    • Upload file required for a messaging hosted number order
    • Validate the verification codes for the hosted numbers order
    • Create verification codes for the hosted numbers order
    • Delete a messaging hosted number
  • Number Configurations
    • Update the messaging profile of multiple phone numbers
    • Retrieve bulk update status
    • List phone numbers with messaging settings
    • Retrieve a phone number with messaging settings
    • Update the messaging profile and/or messaging product of a phone number
  • Advanced OptIn
    • OptOut
      • List opt-outs
      • List Auto-Response Settings
      • Create Auto-Reponse Setting
      • Delete Auto-Response Setting
      • Get Auto-Response Setting
      • Update Auto-Response Setting
  • Messaging Profiles
    • List messaging profile metrics
    • List messaging profiles
    • Create a messaging profile
    • Delete a messaging profile
    • Retrieve a messaging profile
    • Update a messaging profile
    • Retrieve messaging profile metrics
    • List phone numbers associated with a messaging profile
    • List short codes associated with a messaging profile
  • Messaging Tollfree Verification
    • List Verification Requests
    • Submit Verification Request
    • Delete Verification Request
    • Get Verification Request
    • Update Verification Request
  • Messaging URL Domains
    • List messaging URL domains
  • RCS messaging
    • Send an RCS message
    • List all RCS agents
    • Retrieve an RCS agent
    • Modify an RCS agent
  • Mobile Network Operators
    • List mobile network operators
  • Push Credentials
    • List mobile push credentials
    • Creates a new mobile push credential
    • Deletes a mobile push credential
    • Retrieves a mobile push credential
  • Coverage
    • List network coverage locations
  • Networks
    • List all Networks
    • Create a Network
    • Delete a Network
    • Retrieve a Network
    • Update a Network
    • Delete Default Gateway.
    • Get Default Gateway status.
    • Create Default Gateway.
    • List all Interfaces for a Network.
  • Notifications
    • List notification channels
    • Create a notification channel
    • Delete a notification channel
    • Get a notification channel
    • Update a notification channel
    • List all Notifications Events Conditions
    • List all Notifications Events
    • List all Notifications Profiles
    • Create a notification profile
    • Delete a notification profile
    • Get a notification profile
    • Update a notification profile
    • List notification settings
    • Add a Notification Setting
    • Delete a notification setting
    • Get a notification setting
  • Phone Number Block Orders
    • List number block orders
    • Create a number block order
    • Retrieve a number block order
  • Number Lookup
    • Lookup phone number data
  • Requirement Groups
    • Update requirement group for a phone number order
    • List requirement groups
    • Create a new requirement group
    • Delete a requirement group by ID
    • Get a single requirement group by ID
    • Update requirement values in requirement group
    • Submit a Requirement Group for Approval
    • Update requirement group for a sub number order
  • Phone Number Reservations
    • List number reservations
    • Create a number reservation
    • Retrieve a number reservation
    • Extend a number reservation
  • numbers features
    • Retrieve the features for a list of numbers
  • OTA updates
    • List OTA updates
    • Get OTA update
  • Outbound Voice Profiles
    • Get all outbound voice profiles
    • Create an outbound voice profile
    • Delete an outbound voice profile
    • Retrieve an outbound voice profile
    • Updates an existing outbound voice profile.
  • Shared Campaigns
    • Get Partner Campaigns Shared By User
    • Get Sharing Status
    • List Shared Campaigns
    • Get Single Shared Campaign
    • Update Single Shared Campaign
  • AutoRechargePreferences
    • List auto recharge preferences
    • Update auto recharge preferences
  • Bulk Phone Number Campaigns
    • Assign Messaging Profile To Campaign
    • Get Assignment Task Status
    • Get Phone Number Status
  • Phone Number Blocks Background Jobs
    • Lists the phone number blocks jobs
    • Deletes all numbers associated with a phone number block
    • Retrieves a phone number blocks job
  • Phone Number Campaigns
    • Retrieve All Phone Number Campaigns
    • Create New Phone Number Campaign
    • Delete Phone Number Campaign
    • Get Single Phone Number Campaign
    • Create New Phone Number Campaign
  • Phone Number Configurations
    • List phone numbers
    • Slim List phone numbers
    • List phone numbers with voice settings
    • Delete a phone number
    • Retrieve a phone number
    • Update a phone number
    • Change the bundle status for a phone number (set to being in a bundle or remove from a bundle)
    • Enable emergency for a phone number
    • Retrieve a phone number with voice settings
    • Update a phone number with voice settings
  • CSV Downloads
    • List CSV downloads
    • Create a CSV download
    • Retrieve a CSV download
  • Bulk Phone Number Operations
    • Lists the phone numbers jobs
    • Delete a batch of numbers
    • Update the emergency settings from a batch of numbers
    • Update a batch of numbers
    • Retrieve a phone numbers job
  • Voicemail
    • Get voicemail
    • Update voicemail
    • Create voicemail
  • Regulatory Requirements
    • Retrieve regulatory requirements for a list of phone numbers
    • Retrieve regulatory requirements
  • Phone Number Porting
    • Run a portability check
  • Porting Orders
    • List all porting events
    • Show a porting event
    • Republish a porting event
    • Preview the LOA configuration parameters
    • List LOA configurations
    • Create a LOA configuration
    • Delete a LOA configuration
    • Retrieve a LOA configuration
    • Update a LOA configuration
    • Preview a LOA configuration
    • List porting related reports
    • Create a porting related report
    • Retrieve a report
    • List all porting orders
    • Create a porting order
    • List all exception types
    • List all phone number configurations
    • Create a list of phone number configurations
    • Delete a porting order
    • Retrieve a porting order
    • Edit a porting order
    • Activate every number in a porting order asynchronously.
    • Cancel a porting order
    • Submit a porting order.
    • Share a porting order
    • List all porting activation jobs
    • Retrieve a porting activation job
    • Update a porting activation job
    • List additional documents
    • Create a list of additional documents
    • Delete an additional document
    • List allowed FOC dates
    • List all comments of a porting order
    • Create a comment for a porting order
    • Download a porting order loa template
    • List porting order requirements
    • Retrieve the associated V1 sub_request_id and port_request_id
    • List verification codes
    • Send the verification codes
    • Verify the verification code for a list of phone numbers
    • List all phone number blocks
    • Create a phone number block
    • Delete a phone number block
    • List all phone number extensions
    • Create a phone number extension
    • Delete a phone number extension
    • List all porting phone numbers
  • Number Portout
    • List portout requests
    • List all port-out events
    • Show a port-out event
    • Republish a port-out event
    • List eligible port-out rejection codes for a specific order
    • List port-out related reports
    • Create a port-out related report
    • Retrieve a report
    • Get a portout request
    • List all comments for a portout request
    • Create a comment on a portout request
    • List supporting documents on a portout request
    • Create a list of supporting documents on a portout request
    • Update Status
  • Private Wireless Gateways
    • Get all Private Wireless Gateways
    • Create a Private Wireless Gateway
    • Delete a Private Wireless Gateway
    • Get a Private Wireless Gateway
  • Public Internet Gateways
    • List all Public Internet Gateways
    • Create a Public Internet Gateway
    • Delete a Public Internet Gateway
    • Retrieve a Public Internet Gateway
  • Queue Commands
    • Retrieve a call queue
    • Retrieve calls from a queue
    • Retrieve a call from a queue
  • Regions
    • List all Regions
  • CDR Usage Reports
    • Generates and fetches CDR Usage Reports
  • MDR Usage Reports
    • Fetch all Messaging usage reports
    • Create MDR Usage Report
    • Generate and fetch MDR Usage Report
    • Delete MDR Usage Report
    • Retrieve messaging report
  • MDR Detail Reports
    • Fetch all Mdr records
  • WDR Detail Reports
    • Fetches all Wdr records
  • Requirement Types
    • List all requirement types
    • Retrieve a requirement type
  • Requirements
    • List all requirements
    • Retrieve a document requirement
  • Room Compositions
    • View a list of room compositions.
    • Create a room composition.
    • Delete a room composition.
    • View a room composition.
  • Room Participants
    • View a list of room participants.
    • View a room participant.
  • Room Recordings
    • Delete several room recordings in a bulk.
    • View a list of room recordings.
    • Delete a room recording.
    • View a room recording.
  • Room Sessions
    • View a list of room sessions.
    • View a room session.
    • End a room session.
    • Kick participants from a room session.
    • Mute participants in room session.
    • Unmute participants in room session.
    • View a list of room participants.
  • Rooms
    • View a list of rooms.
    • Create a room.
    • Delete a room.
    • View a room.
    • Update a room.
    • View a list of room sessions.
  • Rooms Client Tokens
    • Create Client Token to join a room.
    • Refresh Client Token to join a room.
  • Short Codes
    • List short codes
    • Retrieve a short code
    • Update short code
  • SIM Card Group Actions
    • List SIM card group actions
    • Get SIM card group action details
  • SIM Card Groups
    • Get all SIM card groups
    • Create a SIM card group
    • Delete a SIM card group
    • Get SIM card group
    • Update a SIM card group
    • Request Private Wireless Gateway removal from SIM card group
    • Request Private Wireless Gateway assignment for SIM card group
  • SIM Card Orders
    • Preview SIM card orders
    • Get all SIM card orders
    • Create a SIM card order
    • Get a single SIM card order
  • SIPREC Connectors
    • Create a SIPREC connector
    • Delete a SIPREC connector
    • Retrieve a SIPREC connector
    • Update a SIPREC connector
  • Bucket SSL Certificate
    • Remove SSL Certificate
    • Get Bucket SSL Certificate
    • Add SSL Certificate
  • Bucket Usage
    • Get API Usage
    • Get Bucket Usage
  • Presigned Object URLs
    • Create Presigned Object URL
  • Data Migration
    • List Migration Source coverage
    • List all Migration Sources
    • Create a Migration Source
    • Delete a Migration Source
    • Get a Migration Source
    • List all Migrations
    • Create a Migration
    • Get a Migration
    • Stop a Migration
  • Credentials
    • List all credentials
    • Create a credential
    • Delete a credential
    • Get a credential
    • Update a credential
  • Access Tokens
    • Create an Access Token.
  • TeXML REST Commands
    • Fetch multiple call resources
    • Initiate an outbound call
    • Fetch a call
    • Update call
    • Fetch recordings for a call
    • Request recording for a call
    • Update recording on a call
    • Request siprec session for a call
    • Updates siprec session for a call
    • Start streaming media from a call.
    • Update streaming on a call
    • List conference resources
    • Fetch a conference resource
    • Update a conference resource
    • List conference participants
    • Dial a new conference participant
    • Delete a conference participant
    • Get conference participant resource
    • Update a conference participant
    • List conference recordings
    • Fetch recordings for a conference
    • Fetch multiple recording resources
    • Delete recording resource
    • Fetch recording resource
    • List recording transcriptions
    • Delete a recording transcription
    • Fetch a recording transcription resource
    • (Deprecated) Initiate an outbound call
    • (Deprecated) Update call
    • Create a TeXML secret
  • TeXML Applications
    • List all TeXML Applications
    • Creates a TeXML Application
    • Deletes a TeXML Application
    • Retrieve a TeXML Application
    • Update a TeXML Application
  • Text to Speech Commands
    • Generate speech from text
    • List available text to speech voices
  • Usage Reports (BETA)
    • Get Telnyx product usage data (BETA)
    • Get Usage Reports query options (BETA)
  • UserAddresses
    • List all user addresses
    • Creates a user address
    • Retrieve a user address
  • User Tags
    • List User Tags
  • Verify
    • List verifications by phone number
    • Verify verification code by phone number
    • Trigger Call verification
    • Trigger Flash call verification
    • Trigger SMS verification
    • Retrieve verification
    • Verify verification code by ID
    • List all Verify profiles
    • Create a Verify profile
    • Retrieve Verify profile message templates
    • Delete Verify profile
    • Retrieve Verify profile
    • Update Verify profile
  • Verified Numbers
    • List all Verified Numbers
    • Request phone number verification
    • Delete a verified number
    • Retrieve a verified number
    • Submit verification code
  • Virtual Cross Connects
    • List all Virtual Cross Connects
    • Create a Virtual Cross Connect
    • Delete a Virtual Cross Connect
    • Retrieve a Virtual Cross Connect
    • Update the Virtual Cross Connect
    • List Virtual Cross Connect Cloud Coverage
  • Webhooks
    • List webhook deliveries
    • Find webhook_delivery details by ID
  • WireGuard Interfaces
    • List all WireGuard Interfaces
    • Create a WireGuard Interface
    • Delete a WireGuard Interface
    • Retrieve a WireGuard Interfaces
    • List all WireGuard Peers
    • Create a WireGuard Peer
    • Delete the WireGuard Peer
    • Retrieve the WireGuard Peer
    • Update the WireGuard Peer
    • Retrieve Wireguard config template for Peer
  • Reporting
    • Get all Wireless Detail Records (WDRs) Reports
    • Create a Wireless Detail Records (WDRs) Report
    • Delete a Wireless Detail Record (WDR) Report
    • Get a Wireless Detail Record (WDR) Report
  • Wireless Regions
    • Get all wireless regions
  • Object
    • ListObjectsV2
    • DeleteObjects
    • DeleteObject
    • GetObject
    • HeadObject
    • PutObject
  1. Chat

Create a chat completion

POST
/ai/chat/completions
Chat
Chat with a language model. This endpoint is consistent with the OpenAI Chat Completions API and may be used with the OpenAI JS or Python SDK.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/ai/chat/completions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "messages": [
        {
            "content": "You are a friendly chatbot.",
            "role": "system"
        },
        {
            "content": "Hello, world!",
            "role": "user"
        }
    ]
}'
Response Response Example
200 - Example 1
null

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
api_key_ref
string 
optional
If you are using an external inference provider like xAI or OpenAI, this field allows you to pass along a reference to your API key. After creating an integration secret for you API key, pass the secret's identifier in this field.
best_of
integer 
optional
This is used with use_beam_search to determine how many candidate beams to explore.
early_stopping
boolean 
optional
This is used with use_beam_search. If true, generation stops as soon as there are best_of complete candidates; if false, a heuristic is applied and the generation stops when is it very unlikely to find better candidates.
Default:
false
frequency_penalty
number 
optional
Higher values will penalize the model from repeating the same output tokens.
Default:
0
guided_choice
array[string]
optional
If specified, the output will be exactly one of the choices.
guided_json
object 
optional
Must be a valid JSON schema. If specified, the output will follow the JSON schema.
guided_regex
string 
optional
If specified, the output will follow the regex pattern.
length_penalty
number 
optional
This is used with use_beam_search to prefer shorter or longer completions.
Default:
1
logprobs
boolean 
optional
Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
Default:
false
max_tokens
integer 
optional
Maximum number of completion tokens the model should generate.
messages
array[object (ChatCompletionSystemMessageParam) {2}] 
required
A list of the previous chat messages for context.
Example:
[{"content":"You are a friendly chatbot.","role":"system"},{"content":"Hello, world!","role":"user"}]
content
required
role
enum<string> 
required
Allowed values:
systemuserassistanttool
min_p
number 
optional
This is an alternative to top_p that many prefer. Must be in [0, 1].
model
string 
optional
The language model to chat with. If you are optimizing for speed + price, try meta-llama/Meta-Llama-3.1-8B-Instruct. For quality, try meta-llama/Meta-Llama-3.1-70B-Instruct. Or explore our LLM Library.
Default:
meta-llama/Meta-Llama-3.1-8B-Instruct
n
number 
optional
This will return multiple choices for you instead of a single chat completion.
presence_penalty
number 
optional
Higher values will penalize the model from repeating the same output tokens.
Default:
0
response_format
object (ChatCompletionResponseFormatParam) 
optional
Use this is you want to guarantee a JSON output without defining a schema. For control over the schema, use guided_json.
type
enum<string> 
required
Allowed values:
textjson_object
stream
boolean 
optional
Whether or not to stream data-only server-sent events as they become available.
Default:
false
temperature
number 
optional
Adjusts the "creativity" of the model. Lower values make the model more deterministic and repetitive, while higher values make the model more random and creative.
Default:
0.1
tool_choice
enum<string> 
optional
Allowed values:
noneautorequired
tools
array [oneOf] 
optional
The function tool type follows the same schema as the OpenAI Chat Completions API. The retrieval tool type is unique to Telnyx. You may pass a list of embedded storage buckets for retrieval-augmented generation.
object (Function) 
optional
object (Retrieval) 
optional
top_logprobs
integer 
optional
This is used with logprobs. An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability.
top_p
number 
optional
An alternative or complement to temperature. This adjusts how many of the top possibilities to consider.
use_beam_search
boolean 
optional
Setting this to true will allow the model to explore more completion options. This is not supported by OpenAI.
Default:
false
Examples

Responses

🟢200OK
application/json
Successful Response
Body
No schema defined
🟠422Parameter Error
Modified at 2025-06-16 19:14:41
Previous
Transcribe speech to text
Next
Get available models
Built with