OpenAPI Specification
openapi: 3.1.0
info:
contact:
email: support@telnyx.com
description: Telnyx provides global communications and connectivity APIs for developers — including SIP trunking, programmable voice, SMS, MMS, WhatsApp Business Messaging, Call Control, Fax, Wireless (IoT & eSIM), Phone Numbers (DID provisioning & porting), Emergency Services, and Network APIs for private interconnects and edge connectivity. Build, scale, and manage voice, messaging, and data networks with Telnyx's carrier-grade global infrastructure and API-first platform.
title: Telnyx Access Tokens Fine Tuning API
version: 2.0.0
x-endpoint-cost: light
servers:
- description: Version 2.0.0 of the Telnyx API
url: https://api.telnyx.com/v2
security:
- bearerAuth: []
tags:
- description: Customize LLMs for your unique needs
name: Fine Tuning
paths:
/ai/fine_tuning/jobs:
get:
description: Retrieve a list of all fine tuning jobs created by the user.
operationId: get_finetuningjob_public_finetuning_get
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/FineTuningJobsListData'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: List fine tuning jobs
tags:
- Fine Tuning
x-latency-category: responsive
post:
description: Create a new fine tuning job.
operationId: create_new_finetuningjob_public_finetuning_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFineTuningJobRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/FineTuningJob'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Create a fine tuning job
tags:
- Fine Tuning
x-latency-category: responsive
/ai/fine_tuning/jobs/{job_id}:
get:
description: Retrieve a fine tuning job by `job_id`.
operationId: get_finetuningjob_public_finetuning__job_id__get
parameters:
- in: path
name: job_id
required: true
schema:
title: Job Id
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/FineTuningJob'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Get a fine tuning job
tags:
- Fine Tuning
x-latency-category: responsive
/ai/fine_tuning/jobs/{job_id}/cancel:
post:
description: Cancel a fine tuning job.
operationId: cancel_new_finetuningjob_public_finetuning_post
parameters:
- in: path
name: job_id
required: true
schema:
title: Job Id
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/FineTuningJob'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Cancel a fine tuning job
tags:
- Fine Tuning
x-latency-category: responsive
components:
schemas:
FineTuningJob:
description: The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.
properties:
created_at:
description: The Unix timestamp (in seconds) for when the fine-tuning job was created.
type: integer
finished_at:
description: The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
type:
- integer
- 'null'
hyperparameters:
description: The hyperparameters used for the fine-tuning job.
properties:
n_epochs:
default: 3
description: The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
maximum: 10
minimum: 1
type: integer
required:
- n_epochs
type: object
id:
description: The name of the fine-tuned model that is being created.
type: string
model:
description: The base model that is being fine-tuned.
type: string
organization_id:
description: The organization that owns the fine-tuning job.
type: string
status:
description: The current status of the fine-tuning job.
enum:
- queued
- running
- succeeded
- failed
- cancelled
type: string
trained_tokens:
description: The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
type:
- integer
- 'null'
training_file:
description: The storage bucket or object used for training.
type: string
required:
- created_at
- finished_at
- hyperparameters
- id
- model
- organization_id
- status
- trained_tokens
- training_file
title: FineTuningJob
type: object
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
title: Location
type: array
msg:
title: Message
type: string
type:
title: Error Type
type: string
required:
- loc
- msg
- type
title: ValidationError
type: object
FineTuningJobsListData:
properties:
data:
items:
$ref: '#/components/schemas/FineTuningJob'
type: array
required:
- data
title: FineTuningJobListData
type: object
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
title: Detail
type: array
title: HTTPValidationError
type: object
CreateFineTuningJobRequest:
properties:
hyperparameters:
description: The hyperparameters used for the fine-tuning job.
properties:
n_epochs:
default: 3
description: The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. 'auto' decides the optimal number of epochs based on the size of the dataset. If setting the number manually, we support any number between 1 and 50 epochs.
maximum: 10
minimum: 1
type: integer
type: object
model:
description: The base model that is being fine-tuned.
type: string
suffix:
description: Optional suffix to append to the fine tuned model's name.
type: string
training_file:
description: The storage bucket or object used for training.
type: string
required:
- model
- training_file
title: CreateFineTuningJobRequest
type: object
securitySchemes:
bearerAuth:
scheme: bearer
type: http
branded-calling_bearerAuth:
description: API key passed as a Bearer token in the Authorization header
scheme: bearer
type: http
oauthClientAuth:
description: OAuth 2.0 authentication for Telnyx API and MCP integrations
flows:
authorizationCode:
authorizationUrl: https://api.telnyx.com/v2/oauth/authorize
refreshUrl: https://api.telnyx.com/v2/oauth/token
scopes:
admin: Administrative access to Telnyx resources
tokenUrl: https://api.telnyx.com/v2/oauth/token
clientCredentials:
scopes:
admin: Administrative access to Telnyx resources
tokenUrl: https://api.telnyx.com/v2/oauth/token
type: oauth2
outbound-voice-profiles_bearerAuth:
bearerFormat: JWT
scheme: bearer
type: http
pronunciation-dicts_bearerAuth:
description: Telnyx API v2 key. Obtain from https://portal.telnyx.com
scheme: bearer
type: http
stored-payment-transactions_bearerAuth:
bearerFormat: JWT
scheme: bearer
type: http