Versions in this module Expand all Collapse all v1 v1.1.0 Oct 23, 2026 v1.0.1 Oct 14, 2026 v1.0.0 Oct 13, 2026 Changes in this version + func Bool(v bool) *bool + type Account struct + BalanceSeconds int + CardOnFile bool + CreditsExpireAt *time.Time + DataRegion string + HeldSeconds int + Limits UploadLimits + PurchasesRemainingInWindow *int + Raw json.RawMessage + type AgentAccount struct + Balance Balance + Raw json.RawMessage + Scopes []string + Token string + UserID string + func AgentClaim(ctx context.Context, signupID, claimSecret string, opts ...Option) (*AgentAccount, error) + func (a AgentAccount) Format(f fmt.State, _ rune) + func (a AgentAccount) GoString() string + func (a AgentAccount) String() string + type AgentInfo struct + ContactURL string + Name string + Platform string + type AgentService struct + func (a AgentService) RotateToken(ctx context.Context) (*RotatedToken, error) + type AgentSignupRequest struct + AcceptTerms string + Agent AgentInfo + DataRegion string + DryRun bool + Email string + Pack string + type AgentSignupResult struct + CheckoutURL string + ClaimSecret string + ExpiresAt time.Time + Price Money + Raw json.RawMessage + SignupID string + func AgentSignup(ctx context.Context, req AgentSignupRequest, opts ...Option) (*AgentSignupResult, error) + func (r AgentSignupResult) Format(f fmt.State, _ rune) + func (r AgentSignupResult) GoString() string + func (r AgentSignupResult) String() string + type Balance struct + ExpiresAt *time.Time + HeldSeconds int + Minutes int + PurchasesRemaining *int + Raw json.RawMessage + Seconds int + type BillingService struct + func (b BillingService) AddCardURL(ctx context.Context) (string, error) + func (b BillingService) Buy(ctx context.Context, pack string, opts *BuyOptions) (*Purchase, error) + func (b BillingService) Cards(ctx context.Context) (*Cards, error) + func (b BillingService) Holds(ctx context.Context) iter.Seq2[Hold, error] + func (b BillingService) Ledger(ctx context.Context) iter.Seq2[LedgerEntry, error] + func (b BillingService) Packs(ctx context.Context) ([]Pack, error) + func (b BillingService) SetDefaultCard(ctx context.Context, cardID string) error + func (b BillingService) Transactions(ctx context.Context) iter.Seq2[Transaction, error] + type BuyOptions struct + AcknowledgeNoRefund bool + IdempotencyKey string + type Card struct + Brand string + Email string + ExpMonth int + ExpYear int + FastCheckoutEligible bool + ID string + IsDefault bool + Last4 string + Raw json.RawMessage + Type string + type Cards struct + Cards []Card + DefaultID string + Raw json.RawMessage + type Client struct + Agent AgentService + Billing BillingService + Jobs JobsService + Transcripts TranscriptsService + func New(opts ...Option) (*Client, error) + func (c *Client) LogValue() slog.Value + func (c Client) API() *generated.ClientWithResponses + func (c Client) Account(ctx context.Context) (*Account, error) + func (c Client) Balance(ctx context.Context) (*Balance, error) + func (c Client) Buy(ctx context.Context, pack string, opts *BuyOptions) (*Purchase, error) + func (c Client) Format(f fmt.State, _ rune) + func (c Client) GoString() string + func (c Client) Resume(ctx context.Context, token string, opts *ResumeOptions) (result *Transcript, err error) + func (c Client) String() string + func (c Client) Transcribe(ctx context.Context, path string, opts *TranscribeOptions) (*Transcript, error) + func (c Client) TranscribeReader(ctx context.Context, r io.ReaderAt, size int64, opts *TranscribeOptions) (*Transcript, error) + func (c Client) TranscribeStream(ctx context.Context, r io.Reader, size int64, opts *TranscribeOptions) (*Transcript, error) + type Clock interface + Now func() time.Time + Sleep func(ctx context.Context, d time.Duration) error + type DeletedTranscript struct + Cause string + CreatedAt time.Time + DeletedAt time.Time + DurationSeconds int + ID string + Raw json.RawMessage + Receipt map[string]any + Title string + type Error struct + Code string + Details map[string]any + FailureKind string + Hint string + IdempotencyKey string + JobError string + JobID string + Kind ErrorKind + Message string + NumericCode int + ResumeToken string + RetryAfter time.Duration + Status int + func (e *Error) Error() string + func (e *Error) LogValue() slog.Value + func (e *Error) ReceivedToken() string + func (e *Error) Unwrap() error + type ErrorKind int + const KindAPI + const KindAbort + const KindAuthentication + const KindConfiguration + const KindConflict + const KindDailyLimit + const KindFileLimit + const KindInsufficientBalance + const KindJobFailed + const KindNetwork + const KindNotFound + const KindOutcomeUnknown + const KindPaymentMethodRequired + const KindPermissionDenied + const KindPreflight + const KindRateLimit + const KindResumeMismatch + const KindUnexpected + const KindUnsupportedMedia + const KindUpload + const KindValidation + const KindWaitTimeout + func (k ErrorKind) IsAPI() bool + func (k ErrorKind) IsPreflight() bool + func (k ErrorKind) String() string + type FormatOptions struct + Captions *bool + Language string + type Hold struct + CreatedAt time.Time + ID string + Kind string + Raw json.RawMessage + Seconds int + type Job struct + ActualSeconds *int + BillableSeconds *int + CreatedAt time.Time + DeclaredSeconds *int + Error string + FailureKind string + ID string + Mode string + Options JobOptions + Raw json.RawMessage + RetryOf string + State string + TranscriptID string + VerifiedSeconds *int + type JobListOptions struct + Active bool + type JobOptions struct + AutoGenerateInsights *bool + Keyterms bool + LanguageCode string + MedicalMode bool + Multichannel bool + Prompt bool + Raw json.RawMessage + SpeakerDetection bool + TranslationTargets []string + type JobsService struct + func (j JobsService) Get(ctx context.Context, id string) (*Job, error) + func (j JobsService) List(ctx context.Context, opts *JobListOptions) iter.Seq2[Job, error] + func (j JobsService) Wait(ctx context.Context, id string, opts *WaitOptions) (*Job, error) + type LedgerEntry struct + CreatedAt time.Time + DeltaSeconds int + ID int + JobID string + Kind string + Note string + Raw json.RawMessage + type ListOptions struct + PageSize int + type Money struct + Amount int + Currency string + Formatted string + type Option func(*config) error + func WithBaseURL(baseURL string) Option + func WithClock(clock Clock) Option + func WithHTTPClient(client *http.Client) Option + func WithLogLevel(level string) Option + func WithLogger(logger *slog.Logger) Option + func WithMaxRetries(retries int) Option + func WithTimeout(timeout time.Duration) Option + func WithToken(token string) Option + type Pack struct + Available bool + BonusMinutes int + ID string + Minutes int + Price Money + Raw json.RawMessage + Seconds int + type Page struct + Items []T + NextCursor string + type PageOptions struct + Cursor string + PageSize int + type Progress struct + BytesSent int64 + BytesTotal int64 + Percent int + Stage ProgressStage + State string + type ProgressStage string + const StageProcessing + const StageUploading + type Purchase struct + Minutes int + Raw json.RawMessage + Seconds int + type ResumeOptions struct + Concurrency int + OnProgress func(Progress) + Path string + Reader io.ReaderAt + Size int64 + Stream io.Reader + WaitTimeout time.Duration + type RotatedToken struct + ExpiresAt *time.Time + Raw json.RawMessage + Scopes []string + Token string + TokenID string + func (r RotatedToken) Format(f fmt.State, _ rune) + func (r RotatedToken) GoString() string + func (r RotatedToken) String() string + type TextOptions struct + Language string + Merge *bool + Speakers *bool + Timestamps bool + type Transaction struct + AmountCents int + AmountRefundedCents int + CreatedAt time.Time + Currency string + ID int + InitiatedVia string + PaymentMethodBrand string + PaymentMethodLast4 string + PaymentMethodType string + Raw json.RawMessage + ReceiptNumber string + Seconds int + Status string + type TranscribeOptions struct + AutoInsights *bool + Concurrency int + DurationSeconds float64 + IdempotencyKey string + Keyterms []string + Language string + MatterCode string + Medical bool + Multichannel bool + OnProgress func(Progress) + OnResumeToken func(token string) + Prompt string + Speakers *bool + Title string + TranslateTo []string + WaitTimeout time.Duration + type Transcript struct + AutoDeleteAt *time.Time + Cleaned []Utterance + CreatedAt time.Time + DurationSeconds int + Edited bool + ID string + Language string + Languages []string + Raw json.RawMessage + Speakers map[string]string + Tags []string + Title string + UpdatedAt time.Time + Utterances []Utterance + func (t *Transcript) SRT(opts *FormatOptions) string + func (t *Transcript) Text(opts *TextOptions) string + func (t *Transcript) UnmarshalJSON(data []byte) error + func (t *Transcript) UtterancesFor(language string) []Utterance + func (t *Transcript) VTT(opts *FormatOptions) string + func (t Transcript) MarshalJSON() ([]byte, error) + type TranscriptSummary struct + AutoDeleteAt *time.Time + CreatedAt time.Time + DurationSeconds int + ID string + Language string + Raw json.RawMessage + Tags []string + Title string + type TranscriptsService struct + func (t TranscriptsService) Deleted(ctx context.Context) iter.Seq2[DeletedTranscript, error] + func (t TranscriptsService) Get(ctx context.Context, id string) (*Transcript, error) + func (t TranscriptsService) List(ctx context.Context, opts *ListOptions) iter.Seq2[TranscriptSummary, error] + func (t TranscriptsService) Page(ctx context.Context, opts *PageOptions) (*Page[TranscriptSummary], error) + type UploadLimits struct + ActiveJobs int + MaxActiveJobs int + MaxDailySeconds int + Raw json.RawMessage + UsedTodaySeconds int + type Utterance struct + EndMs int + Raw json.RawMessage + Speaker string + SpeakerName string + StartMs int + Text string + type WaitOptions struct + OnProgress func(Progress) + WaitTimeout time.Duration