Documentation
¶
Overview ¶
Package avatarapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewCreateApiKeyRequest(server string, body CreateApiKeyJSONRequestBody) (*http.Request, error)
- func NewCreateApiKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateAvatarCandidatesRequest(server string, avatarId AvatarIdPath, ...) (*http.Request, error)
- func NewCreateAvatarCandidatesRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateAvatarRequest(server string, body CreateAvatarJSONRequestBody) (*http.Request, error)
- func NewCreateAvatarRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateAvatarSessionRequest(server string, avatarId AvatarIdPath, params *CreateAvatarSessionParams, ...) (*http.Request, error)
- func NewCreateAvatarSessionRequestWithBody(server string, avatarId AvatarIdPath, params *CreateAvatarSessionParams, ...) (*http.Request, error)
- func NewCreateSpeechSessionRequest(server string, body CreateSpeechSessionJSONRequestBody) (*http.Request, error)
- func NewCreateSpeechSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateUploadRequest(server string, body CreateUploadJSONRequestBody) (*http.Request, error)
- func NewCreateUploadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteAvatarConductorRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewDeleteAvatarRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewDeleteAvatarThumbnailRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewDeleteAvatarVersionRequest(server string, avatarId AvatarIdPath, versionId string) (*http.Request, error)
- func NewDesignVoiceRequest(server string, params *DesignVoiceParams, body DesignVoiceJSONRequestBody) (*http.Request, error)
- func NewDesignVoiceRequestWithBody(server string, params *DesignVoiceParams, contentType string, body io.Reader) (*http.Request, error)
- func NewEndAvatarSessionRequest(server string, id AvatarSessionIdPath) (*http.Request, error)
- func NewEndSpeechSessionRequest(server string, sessionId SpeechSessionPathId) (*http.Request, error)
- func NewEnhancePortraitRequest(server string, params *EnhancePortraitParams, ...) (*http.Request, error)
- func NewEnhancePortraitRequestWithBody(server string, params *EnhancePortraitParams, contentType string, ...) (*http.Request, error)
- func NewGenerateClipRequest(server string, params *GenerateClipParams, body GenerateClipJSONRequestBody) (*http.Request, error)
- func NewGenerateClipRequestWithBody(server string, params *GenerateClipParams, contentType string, body io.Reader) (*http.Request, error)
- func NewGeneratePortraitsRequest(server string, params *GeneratePortraitsParams, ...) (*http.Request, error)
- func NewGeneratePortraitsRequestWithBody(server string, params *GeneratePortraitsParams, contentType string, ...) (*http.Request, error)
- func NewGetAccountBalanceRequest(server string) (*http.Request, error)
- func NewGetAccountEarningsRequest(server string) (*http.Request, error)
- func NewGetAccountRequest(server string) (*http.Request, error)
- func NewGetAvatarAppearanceRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewGetAvatarConductorRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewGetAvatarKnowledgeRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewGetAvatarMonetizationRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewGetAvatarRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewGetAvatarSessionRequest(server string, id AvatarSessionIdPath) (*http.Request, error)
- func NewGetAvatarSponsorRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewGetAvatarVoiceRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
- func NewGetCurrentApiKeyRequest(server string) (*http.Request, error)
- func NewGetSpeechSessionRequest(server string, sessionId SpeechSessionPathId) (*http.Request, error)
- func NewGetUploadRequest(server string, uploadId UploadIdPath) (*http.Request, error)
- func NewGrantAvatarSponsorRequest(server string, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, ...) (*http.Request, error)
- func NewGrantAvatarSponsorRequestWithBody(server string, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, ...) (*http.Request, error)
- func NewListApiKeysRequest(server string) (*http.Request, error)
- func NewListAvatarCandidatesRequest(server string, avatarId AvatarIdPath, params *ListAvatarCandidatesParams) (*http.Request, error)
- func NewListAvatarsRequest(server string, params *ListAvatarsParams) (*http.Request, error)
- func NewRedeemAccountCodeRequest(server string, body RedeemAccountCodeJSONRequestBody) (*http.Request, error)
- func NewRedeemAccountCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewReplaceAvatarAppearanceRequest(server string, avatarId AvatarIdPath, ...) (*http.Request, error)
- func NewReplaceAvatarAppearanceRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewReplaceAvatarKnowledgeRequest(server string, avatarId AvatarIdPath, ...) (*http.Request, error)
- func NewReplaceAvatarKnowledgeRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewReplaceAvatarThumbnailRequest(server string, avatarId AvatarIdPath, ...) (*http.Request, error)
- func NewReplaceAvatarThumbnailRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewReplaceAvatarVoiceRequest(server string, avatarId AvatarIdPath, body ReplaceAvatarVoiceJSONRequestBody) (*http.Request, error)
- func NewReplaceAvatarVoiceRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewRevokeApiKeyRequest(server string, apiKeyId ApiKeyIdPath) (*http.Request, error)
- func NewRotateApiKeyRequest(server string, apiKeyId ApiKeyIdPath) (*http.Request, error)
- func NewSelectAvatarCandidateRequest(server string, avatarId AvatarIdPath, ...) (*http.Request, error)
- func NewSelectAvatarCandidateRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewSetAvatarConductorRequest(server string, avatarId AvatarIdPath, body SetAvatarConductorJSONRequestBody) (*http.Request, error)
- func NewSetAvatarConductorRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewStartEmbedSessionRequest(server string, body StartEmbedSessionJSONRequestBody) (*http.Request, error)
- func NewStartEmbedSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateApiKeyRequest(server string, apiKeyId ApiKeyIdPath, body UpdateApiKeyJSONRequestBody) (*http.Request, error)
- func NewUpdateApiKeyRequestWithBody(server string, apiKeyId ApiKeyIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateAvatarRequest(server string, avatarId AvatarIdPath, body UpdateAvatarJSONRequestBody) (*http.Request, error)
- func NewUpdateAvatarRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateAvatarSponsorRequest(server string, avatarId AvatarIdPath, body UpdateAvatarSponsorJSONRequestBody) (*http.Request, error)
- func NewUpdateAvatarSponsorRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewWithdrawAvatarSponsorRequest(server string, avatarId AvatarIdPath, ...) (*http.Request, error)
- func NewWithdrawAvatarSponsorRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
- type Account
- type AccountAmbiguous
- type AccountBalance
- type AccountBalanceWallet
- type AccountEarnings
- type AccountLimits
- type AccountLinks
- type AccountPayouts
- type AccountPayoutsStatus
- type AccountPlan
- type AccountPricing
- type AccountV2Access
- type ApiErrorResponse
- type ApiKey
- type ApiKeyCreateRequest
- type ApiKeyCreateRequestScopes
- type ApiKeyCreateRequestSpendCapWindow
- type ApiKeyIdPath
- type ApiKeyList
- type ApiKeyScopes
- type ApiKeySecret
- type ApiKeySpendCap
- type ApiKeySpendCapWindow
- type ApiKeyUpdateRequest
- type ApiKeyUpdateRequestScopes
- type ApiKeyUpdateRequestSpendCapWindow
- type AppTool
- type AppToolOptions
- type AppTools
- type AspectRatio
- type AssetRef
- type AssetRefString
- type AssetRefs
- type AvatarAppearanceJsonRequest
- type AvatarCreateJsonRequest
- type AvatarCreateJsonRequestEngine
- type AvatarCreateJsonRequestSchemaVersion
- type AvatarCreateJsonRequestSeedSelection
- type AvatarCreateJsonRequestVisibility
- type AvatarCreateResponse
- type AvatarCreateResponseMissingInputs
- type AvatarCreateResponseStatus
- type AvatarDetail
- type AvatarDetailAspectRatio
- type AvatarDetailLatestFailureStage
- type AvatarDetailMissingInputs
- type AvatarDetailSeedSelection
- type AvatarDetailStatus
- type AvatarDetailVisibility
- type AvatarEngine
- type AvatarIdPath
- type AvatarKind
- type AvatarKnowledge
- type AvatarKnowledgeFile
- type AvatarKnowledgeFileLink
- type AvatarKnowledgeJsonRequest
- type AvatarKnowledgeSummary
- type AvatarLinks
- type AvatarListResponse
- type AvatarMonetization
- type AvatarMonetizationEdit
- type AvatarPartResponse
- type AvatarPartResponseStatus
- type AvatarPersona
- type AvatarPersonaConversationalHabits
- type AvatarPersonaEdit
- type AvatarPersonaEditConversationalHabits
- type AvatarProfile
- type AvatarProfileThumbnailSource
- type AvatarSessionCreateRequest
- type AvatarSessionCreateResponse
- type AvatarSessionCreateResponseBillingMode
- type AvatarSessionCreateResponseStatus
- type AvatarSessionEndResponse
- type AvatarSessionEndResponseStatus
- type AvatarSessionIdPath
- type AvatarSessionStatusResponse
- type AvatarSessionStatusResponseBillingMode
- type AvatarSessionStatusResponseEndReason
- type AvatarSessionStatusResponseKind
- type AvatarSessionStatusResponseStatus
- type AvatarShareSocialLinks
- type AvatarShareSocialLinksType
- type AvatarShareSubtitle
- type AvatarShareTags
- type AvatarShareTitle
- type AvatarSocialLink
- type AvatarSourceFile
- type AvatarSponsor
- type AvatarSponsorPatch
- type AvatarSponsorPatchExhaustedBehavior
- type AvatarSponsorSettingsExhaustedBehavior
- type AvatarStall
- type AvatarStallStage
- type AvatarStatementType
- type AvatarStudioChoices
- type AvatarSummary
- type AvatarSummaryMissingInputs
- type AvatarSummaryStatus
- type AvatarSummaryVisibility
- type AvatarThumbnailJsonRequest
- type AvatarUpdateRequest
- type AvatarUpdateRequestConversationalHabits
- type AvatarUpdateRequestLanguage
- type AvatarUpdateRequestVisibility
- type AvatarVoice
- type AvatarVoiceJsonRequest
- type AvatarVoiceSettings
- type BlackoutRecovery
- type BlackoutRecoveryDetection
- type BlackoutRecoveryEffective
- type BlackoutRecoveryEffectiveDetection
- type BuildStage
- type BuildStageStatus
- type Candidate
- type CandidateCreateRequest
- type CandidateListResponse
- type CandidateListResponseSeedSelection
- type CandidateSelectRequest
- type CandidateStatus
- type CandidateVersion
- type CaptureQuota
- type Client
- func (c *Client) CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateAvatar(ctx context.Context, body CreateAvatarJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateAvatarCandidates(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) CreateAvatarCandidatesWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateAvatarSession(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, ...) (*http.Response, error)
- func (c *Client) CreateAvatarSessionWithBody(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, ...) (*http.Response, error)
- func (c *Client) CreateAvatarWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateSpeechSession(ctx context.Context, body CreateSpeechSessionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateSpeechSessionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteAvatar(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteAvatarConductor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteAvatarThumbnail(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteAvatarVersion(ctx context.Context, avatarId AvatarIdPath, versionId string, ...) (*http.Response, error)
- func (c *Client) DesignVoice(ctx context.Context, params *DesignVoiceParams, ...) (*http.Response, error)
- func (c *Client) DesignVoiceWithBody(ctx context.Context, params *DesignVoiceParams, contentType string, ...) (*http.Response, error)
- func (c *Client) EndAvatarSession(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) EndSpeechSession(ctx context.Context, sessionId SpeechSessionPathId, ...) (*http.Response, error)
- func (c *Client) EnhancePortrait(ctx context.Context, params *EnhancePortraitParams, ...) (*http.Response, error)
- func (c *Client) EnhancePortraitWithBody(ctx context.Context, params *EnhancePortraitParams, contentType string, ...) (*http.Response, error)
- func (c *Client) GenerateClip(ctx context.Context, params *GenerateClipParams, ...) (*http.Response, error)
- func (c *Client) GenerateClipWithBody(ctx context.Context, params *GenerateClipParams, contentType string, ...) (*http.Response, error)
- func (c *Client) GeneratePortraits(ctx context.Context, params *GeneratePortraitsParams, ...) (*http.Response, error)
- func (c *Client) GeneratePortraitsWithBody(ctx context.Context, params *GeneratePortraitsParams, contentType string, ...) (*http.Response, error)
- func (c *Client) GetAccount(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAccountBalance(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAccountEarnings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvatar(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvatarAppearance(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvatarConductor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvatarKnowledge(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvatarMonetization(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvatarSession(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvatarVoice(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCurrentApiKey(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSpeechSession(ctx context.Context, sessionId SpeechSessionPathId, ...) (*http.Response, error)
- func (c *Client) GetUpload(ctx context.Context, uploadId UploadIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GrantAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, ...) (*http.Response, error)
- func (c *Client) GrantAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, ...) (*http.Response, error)
- func (c *Client) ListApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListAvatarCandidates(ctx context.Context, avatarId AvatarIdPath, params *ListAvatarCandidatesParams, ...) (*http.Response, error)
- func (c *Client) ListAvatars(ctx context.Context, params *ListAvatarsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RedeemAccountCode(ctx context.Context, body RedeemAccountCodeJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RedeemAccountCodeWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ReplaceAvatarAppearance(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) ReplaceAvatarAppearanceWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ReplaceAvatarKnowledge(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) ReplaceAvatarKnowledgeWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ReplaceAvatarThumbnail(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) ReplaceAvatarThumbnailWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ReplaceAvatarVoice(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) ReplaceAvatarVoiceWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) RevokeApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RotateApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SelectAvatarCandidate(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) SelectAvatarCandidateWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SetAvatarConductor(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) SetAvatarConductorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) StartEmbedSession(ctx context.Context, body StartEmbedSessionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) StartEmbedSessionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, body UpdateApiKeyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateApiKeyWithBody(ctx context.Context, apiKeyId ApiKeyIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateAvatar(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) UpdateAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateAvatarWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) WithdrawAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, ...) (*http.Response, error)
- func (c *Client) WithdrawAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateApiKeyResponse, error)
- func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, ...) (*CreateApiKeyResponse, error)
- func (c *ClientWithResponses) CreateAvatarCandidatesWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*CreateAvatarCandidatesResponse, error)
- func (c *ClientWithResponses) CreateAvatarCandidatesWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*CreateAvatarCandidatesResponse, error)
- func (c *ClientWithResponses) CreateAvatarSessionWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, ...) (*CreateAvatarSessionResponse, error)deprecated
- func (c *ClientWithResponses) CreateAvatarSessionWithResponse(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, ...) (*CreateAvatarSessionResponse, error)
- func (c *ClientWithResponses) CreateAvatarWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateAvatarResponse, error)
- func (c *ClientWithResponses) CreateAvatarWithResponse(ctx context.Context, body CreateAvatarJSONRequestBody, ...) (*CreateAvatarResponse, error)
- func (c *ClientWithResponses) CreateSpeechSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateSpeechSessionResponse, error)
- func (c *ClientWithResponses) CreateSpeechSessionWithResponse(ctx context.Context, body CreateSpeechSessionJSONRequestBody, ...) (*CreateSpeechSessionResponse, error)
- func (c *ClientWithResponses) CreateUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateUploadResponse, error)
- func (c *ClientWithResponses) CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, ...) (*CreateUploadResponse, error)
- func (c *ClientWithResponses) DeleteAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarConductorResponse, error)
- func (c *ClientWithResponses) DeleteAvatarThumbnailWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarThumbnailResponse, error)
- func (c *ClientWithResponses) DeleteAvatarVersionWithResponse(ctx context.Context, avatarId AvatarIdPath, versionId string, ...) (*DeleteAvatarVersionResponse, error)
- func (c *ClientWithResponses) DeleteAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarResponse, error)
- func (c *ClientWithResponses) DesignVoiceWithBodyWithResponse(ctx context.Context, params *DesignVoiceParams, contentType string, ...) (*DesignVoiceResponse, error)
- func (c *ClientWithResponses) DesignVoiceWithResponse(ctx context.Context, params *DesignVoiceParams, ...) (*DesignVoiceResponse, error)
- func (c *ClientWithResponses) EndAvatarSessionWithResponse(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*EndAvatarSessionResponse, error)
- func (c *ClientWithResponses) EndSpeechSessionWithResponse(ctx context.Context, sessionId SpeechSessionPathId, ...) (*EndSpeechSessionResponse, error)
- func (c *ClientWithResponses) EnhancePortraitWithBodyWithResponse(ctx context.Context, params *EnhancePortraitParams, contentType string, ...) (*EnhancePortraitResponse, error)
- func (c *ClientWithResponses) EnhancePortraitWithResponse(ctx context.Context, params *EnhancePortraitParams, ...) (*EnhancePortraitResponse, error)
- func (c *ClientWithResponses) GenerateClipWithBodyWithResponse(ctx context.Context, params *GenerateClipParams, contentType string, ...) (*GenerateClipResponse, error)
- func (c *ClientWithResponses) GenerateClipWithResponse(ctx context.Context, params *GenerateClipParams, ...) (*GenerateClipResponse, error)
- func (c *ClientWithResponses) GeneratePortraitsWithBodyWithResponse(ctx context.Context, params *GeneratePortraitsParams, contentType string, ...) (*GeneratePortraitsResponse, error)
- func (c *ClientWithResponses) GeneratePortraitsWithResponse(ctx context.Context, params *GeneratePortraitsParams, ...) (*GeneratePortraitsResponse, error)
- func (c *ClientWithResponses) GetAccountBalanceWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountBalanceResponse, error)
- func (c *ClientWithResponses) GetAccountEarningsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountEarningsResponse, error)
- func (c *ClientWithResponses) GetAccountWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountResponse, error)
- func (c *ClientWithResponses) GetAvatarAppearanceWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarAppearanceResponse, error)
- func (c *ClientWithResponses) GetAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarConductorResponse, error)
- func (c *ClientWithResponses) GetAvatarKnowledgeWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarKnowledgeResponse, error)
- func (c *ClientWithResponses) GetAvatarMonetizationWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarMonetizationResponse, error)
- func (c *ClientWithResponses) GetAvatarSessionWithResponse(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*GetAvatarSessionResponse, error)
- func (c *ClientWithResponses) GetAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarSponsorResponse, error)
- func (c *ClientWithResponses) GetAvatarVoiceWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarVoiceResponse, error)
- func (c *ClientWithResponses) GetAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarResponse, error)
- func (c *ClientWithResponses) GetCurrentApiKeyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentApiKeyResponse, error)
- func (c *ClientWithResponses) GetSpeechSessionWithResponse(ctx context.Context, sessionId SpeechSessionPathId, ...) (*GetSpeechSessionResponse, error)
- func (c *ClientWithResponses) GetUploadWithResponse(ctx context.Context, uploadId UploadIdPath, reqEditors ...RequestEditorFn) (*GetUploadResponse, error)
- func (c *ClientWithResponses) GrantAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, ...) (*GrantAvatarSponsorResponse, error)
- func (c *ClientWithResponses) GrantAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, ...) (*GrantAvatarSponsorResponse, error)
- func (c *ClientWithResponses) ListApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error)
- func (c *ClientWithResponses) ListAvatarCandidatesWithResponse(ctx context.Context, avatarId AvatarIdPath, params *ListAvatarCandidatesParams, ...) (*ListAvatarCandidatesResponse, error)
- func (c *ClientWithResponses) ListAvatarsWithResponse(ctx context.Context, params *ListAvatarsParams, reqEditors ...RequestEditorFn) (*ListAvatarsResponse, error)
- func (c *ClientWithResponses) RedeemAccountCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RedeemAccountCodeResponse, error)
- func (c *ClientWithResponses) RedeemAccountCodeWithResponse(ctx context.Context, body RedeemAccountCodeJSONRequestBody, ...) (*RedeemAccountCodeResponse, error)
- func (c *ClientWithResponses) ReplaceAvatarAppearanceWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*ReplaceAvatarAppearanceResponse, error)
- func (c *ClientWithResponses) ReplaceAvatarAppearanceWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*ReplaceAvatarAppearanceResponse, error)
- func (c *ClientWithResponses) ReplaceAvatarKnowledgeWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*ReplaceAvatarKnowledgeResponse, error)
- func (c *ClientWithResponses) ReplaceAvatarKnowledgeWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*ReplaceAvatarKnowledgeResponse, error)
- func (c *ClientWithResponses) ReplaceAvatarThumbnailWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*ReplaceAvatarThumbnailResponse, error)
- func (c *ClientWithResponses) ReplaceAvatarThumbnailWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*ReplaceAvatarThumbnailResponse, error)
- func (c *ClientWithResponses) ReplaceAvatarVoiceWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*ReplaceAvatarVoiceResponse, error)
- func (c *ClientWithResponses) ReplaceAvatarVoiceWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*ReplaceAvatarVoiceResponse, error)
- func (c *ClientWithResponses) RevokeApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*RevokeApiKeyResponse, error)
- func (c *ClientWithResponses) RotateApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*RotateApiKeyResponse, error)
- func (c *ClientWithResponses) SelectAvatarCandidateWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*SelectAvatarCandidateResponse, error)
- func (c *ClientWithResponses) SelectAvatarCandidateWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*SelectAvatarCandidateResponse, error)
- func (c *ClientWithResponses) SetAvatarConductorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*SetAvatarConductorResponse, error)
- func (c *ClientWithResponses) SetAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*SetAvatarConductorResponse, error)
- func (c *ClientWithResponses) StartEmbedSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*StartEmbedSessionResponse, error)deprecated
- func (c *ClientWithResponses) StartEmbedSessionWithResponse(ctx context.Context, body StartEmbedSessionJSONRequestBody, ...) (*StartEmbedSessionResponse, error)
- func (c *ClientWithResponses) UpdateApiKeyWithBodyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, contentType string, body io.Reader, ...) (*UpdateApiKeyResponse, error)
- func (c *ClientWithResponses) UpdateApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, body UpdateApiKeyJSONRequestBody, ...) (*UpdateApiKeyResponse, error)
- func (c *ClientWithResponses) UpdateAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*UpdateAvatarSponsorResponse, error)
- func (c *ClientWithResponses) UpdateAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*UpdateAvatarSponsorResponse, error)
- func (c *ClientWithResponses) UpdateAvatarWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*UpdateAvatarResponse, error)
- func (c *ClientWithResponses) UpdateAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarJSONRequestBody, ...) (*UpdateAvatarResponse, error)
- func (c *ClientWithResponses) WithdrawAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, ...) (*WithdrawAvatarSponsorResponse, error)
- func (c *ClientWithResponses) WithdrawAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, ...) (*WithdrawAvatarSponsorResponse, error)
- type ClientWithResponsesInterface
- type ClipResolution
- type CodeRedemption
- type CodeRedemptionV2Access
- type Conductor
- type ConductorEdge
- type ConductorGraph
- type ConductorNode
- type ConductorRequest
- type ConductorSummary
- type CreateApiKeyJSONRequestBody
- type CreateApiKeyResponse
- func (r CreateApiKeyResponse) ContentType() string
- func (r CreateApiKeyResponse) GetBody() []byte
- func (r CreateApiKeyResponse) GetJSON201() *ApiKeySecret
- func (r CreateApiKeyResponse) GetJSON400() *ApiErrorResponse
- func (r CreateApiKeyResponse) GetJSON403() *ApiErrorResponse
- func (r CreateApiKeyResponse) GetJSON404() *ApiErrorResponse
- func (r CreateApiKeyResponse) GetJSON409() *AccountAmbiguous
- func (r CreateApiKeyResponse) GetJSON422() *FrameworkErrorResponse
- func (r CreateApiKeyResponse) Status() string
- func (r CreateApiKeyResponse) StatusCode() int
- type CreateAvatarCandidatesJSONRequestBody
- type CreateAvatarCandidatesResponse
- func (r CreateAvatarCandidatesResponse) ContentType() string
- func (r CreateAvatarCandidatesResponse) GetBody() []byte
- func (r CreateAvatarCandidatesResponse) GetJSON202() *CandidateListResponse
- func (r CreateAvatarCandidatesResponse) GetJSON429() *RateLimited
- func (r CreateAvatarCandidatesResponse) Status() string
- func (r CreateAvatarCandidatesResponse) StatusCode() int
- type CreateAvatarCandidatesResponse202Headers
- type CreateAvatarCandidatesResponse429Headers
- type CreateAvatarJSONRequestBody
- type CreateAvatarMultipartBody
- type CreateAvatarMultipartRequestBody
- type CreateAvatarResponse
- func (r CreateAvatarResponse) ContentType() string
- func (r CreateAvatarResponse) GetBody() []byte
- func (r CreateAvatarResponse) GetJSON201() *AvatarCreateResponse
- func (r CreateAvatarResponse) GetJSON202() *AvatarCreateResponse
- func (r CreateAvatarResponse) GetJSON400() *ApiErrorResponse
- func (r CreateAvatarResponse) GetJSON403() *ApiErrorResponse
- func (r CreateAvatarResponse) GetJSON409() *ApiErrorResponse
- func (r CreateAvatarResponse) GetJSON429() *RateLimited
- func (r CreateAvatarResponse) GetJSON503() *ApiErrorResponse
- func (r CreateAvatarResponse) Status() string
- func (r CreateAvatarResponse) StatusCode() int
- type CreateAvatarResponse202Headers
- type CreateAvatarResponse429Headers
- type CreateAvatarSessionJSONRequestBodydeprecated
- type CreateAvatarSessionParams
- type CreateAvatarSessionParamsWaitFor
- type CreateAvatarSessionResponse
- func (r CreateAvatarSessionResponse) ContentType() string
- func (r CreateAvatarSessionResponse) GetBody() []byte
- func (r CreateAvatarSessionResponse) GetJSON202() *AvatarSessionCreateResponse
- func (r CreateAvatarSessionResponse) GetJSON400() *ApiErrorResponse
- func (r CreateAvatarSessionResponse) GetJSON402() *PaymentRequiredResponse
- func (r CreateAvatarSessionResponse) GetJSON403() *ApiErrorResponse
- func (r CreateAvatarSessionResponse) GetJSON409() *ApiErrorResponse
- func (r CreateAvatarSessionResponse) GetJSON422() *FrameworkErrorResponse
- func (r CreateAvatarSessionResponse) GetJSON502() *ApiErrorResponse
- func (r CreateAvatarSessionResponse) GetJSON503() *ApiErrorResponse
- func (r CreateAvatarSessionResponse) Status() string
- func (r CreateAvatarSessionResponse) StatusCode() int
- type CreateAvatarSessionResponse503Headers
- type CreateSpeechSession422JSONResponseBody
- func (t CreateSpeechSession422JSONResponseBody) AsApiErrorResponse() (ApiErrorResponse, error)
- func (t CreateSpeechSession422JSONResponseBody) AsFrameworkErrorResponse() (FrameworkErrorResponse, error)
- func (t *CreateSpeechSession422JSONResponseBody) FromApiErrorResponse(v ApiErrorResponse) error
- func (t *CreateSpeechSession422JSONResponseBody) FromFrameworkErrorResponse(v FrameworkErrorResponse) error
- func (t CreateSpeechSession422JSONResponseBody) MarshalJSON() ([]byte, error)
- func (t *CreateSpeechSession422JSONResponseBody) MergeApiErrorResponse(v ApiErrorResponse) error
- func (t *CreateSpeechSession422JSONResponseBody) MergeFrameworkErrorResponse(v FrameworkErrorResponse) error
- func (t *CreateSpeechSession422JSONResponseBody) UnmarshalJSON(b []byte) error
- type CreateSpeechSessionJSONRequestBody
- type CreateSpeechSessionResponse
- func (r CreateSpeechSessionResponse) ContentType() string
- func (r CreateSpeechSessionResponse) GetBody() []byte
- func (r CreateSpeechSessionResponse) GetJSON201() *SpeechSessionCreateResponse
- func (r CreateSpeechSessionResponse) GetJSON402() *PaymentRequiredResponse
- func (r CreateSpeechSessionResponse) GetJSON403() *ApiErrorResponse
- func (r CreateSpeechSessionResponse) GetJSON409() *AccountAmbiguous
- func (r CreateSpeechSessionResponse) GetJSON422() *CreateSpeechSession422JSONResponseBody
- func (r CreateSpeechSessionResponse) GetJSON503() *ApiErrorResponse
- func (r CreateSpeechSessionResponse) Status() string
- func (r CreateSpeechSessionResponse) StatusCode() int
- type CreateUploadJSONRequestBody
- type CreateUploadResponse
- func (r CreateUploadResponse) ContentType() string
- func (r CreateUploadResponse) GetBody() []byte
- func (r CreateUploadResponse) GetJSON201() *UploadCreateResponse
- func (r CreateUploadResponse) GetJSON400() *ApiErrorResponse
- func (r CreateUploadResponse) GetJSON403() *ApiErrorResponse
- func (r CreateUploadResponse) GetJSON409() *AccountAmbiguous
- func (r CreateUploadResponse) GetJSON429() *ApiErrorResponse
- func (r CreateUploadResponse) GetJSON503() *ApiErrorResponse
- func (r CreateUploadResponse) Status() string
- func (r CreateUploadResponse) StatusCode() int
- type CreditExpiry
- type CurrentCaller
- type CurrentCallerKind
- type DeleteAvatarConductorResponse
- type DeleteAvatarResponse
- type DeleteAvatarThumbnailResponse
- func (r DeleteAvatarThumbnailResponse) ContentType() string
- func (r DeleteAvatarThumbnailResponse) GetBody() []byte
- func (r DeleteAvatarThumbnailResponse) GetJSON200() *AvatarDetail
- func (r DeleteAvatarThumbnailResponse) GetJSON409() *ProfileRefusal
- func (r DeleteAvatarThumbnailResponse) Status() string
- func (r DeleteAvatarThumbnailResponse) StatusCode() int
- type DeleteAvatarVersionResponse
- type DesignVoiceJSONRequestBody
- type DesignVoiceParams
- type DesignVoiceRequest
- type DesignVoiceRequestLanguage
- type DesignVoiceResponse
- func (r DesignVoiceResponse) ContentType() string
- func (r DesignVoiceResponse) GetBody() []byte
- func (r DesignVoiceResponse) GetJSON200() *DesignedVoicesResponse
- func (r DesignVoiceResponse) GetJSON400() *GenerationBadRequest
- func (r DesignVoiceResponse) GetJSON402() *GenerationPaymentRequired
- func (r DesignVoiceResponse) GetJSON403() *GenerationForbidden
- func (r DesignVoiceResponse) GetJSON409() *GenerationConflict
- func (r DesignVoiceResponse) GetJSON429() *GenerationRateLimited
- func (r DesignVoiceResponse) GetJSON502() *GenerationProviderFailed
- func (r DesignVoiceResponse) GetJSON503() *GenerationUnavailable
- func (r DesignVoiceResponse) Status() string
- func (r DesignVoiceResponse) StatusCode() int
- type DesignVoiceResponse409Headers
- type DesignVoiceResponse429Headers
- type DesignedVoice
- type DesignedVoicesResponse
- type DesignedVoicesResponseLanguage
- type EmbedSessionStartRequest
- type EmbedSessionStartResponse
- type EmbedSessionStartResponseBillingMode
- type EndAvatarSessionResponse
- func (r EndAvatarSessionResponse) ContentType() string
- func (r EndAvatarSessionResponse) GetBody() []byte
- func (r EndAvatarSessionResponse) GetJSON200() *AvatarSessionEndResponse
- func (r EndAvatarSessionResponse) GetJSON403() *ApiErrorResponse
- func (r EndAvatarSessionResponse) GetJSON404() *ApiErrorResponse
- func (r EndAvatarSessionResponse) GetJSON409() *AccountAmbiguous
- func (r EndAvatarSessionResponse) GetJSON500() *ApiErrorResponse
- func (r EndAvatarSessionResponse) GetJSON503() *ApiErrorResponse
- func (r EndAvatarSessionResponse) Status() string
- func (r EndAvatarSessionResponse) StatusCode() int
- type EndAvatarSessionResponse503Headers
- type EndSpeechSessionResponse
- func (r EndSpeechSessionResponse) ContentType() string
- func (r EndSpeechSessionResponse) GetBody() []byte
- func (r EndSpeechSessionResponse) GetJSON200() *SpeechSessionEndResponse
- func (r EndSpeechSessionResponse) GetJSON403() *ApiErrorResponse
- func (r EndSpeechSessionResponse) GetJSON404() *ApiErrorResponse
- func (r EndSpeechSessionResponse) GetJSON409() *AccountAmbiguous
- func (r EndSpeechSessionResponse) GetJSON500() *ApiErrorResponse
- func (r EndSpeechSessionResponse) GetJSON503() *ApiErrorResponse
- func (r EndSpeechSessionResponse) Status() string
- func (r EndSpeechSessionResponse) StatusCode() int
- type EnhancePortraitJSONRequestBody
- type EnhancePortraitParams
- type EnhancePortraitRequest
- type EnhancePortraitRequestEngine
- type EnhancePortraitResponse
- func (r EnhancePortraitResponse) ContentType() string
- func (r EnhancePortraitResponse) GetBody() []byte
- func (r EnhancePortraitResponse) GetJSON200() *GeneratedPortraitsResponse
- func (r EnhancePortraitResponse) GetJSON400() *GenerationBadRequest
- func (r EnhancePortraitResponse) GetJSON402() *GenerationPaymentRequired
- func (r EnhancePortraitResponse) GetJSON403() *ApiErrorResponse
- func (r EnhancePortraitResponse) GetJSON404() *ApiErrorResponse
- func (r EnhancePortraitResponse) GetJSON409() *GenerationConflict
- func (r EnhancePortraitResponse) GetJSON429() *GenerationRateLimited
- func (r EnhancePortraitResponse) GetJSON502() *GenerationProviderFailed
- func (r EnhancePortraitResponse) GetJSON503() *GenerationUnavailable
- func (r EnhancePortraitResponse) Status() string
- func (r EnhancePortraitResponse) StatusCode() int
- type EnhancePortraitResponse409Headers
- type EnhancePortraitResponse429Headers
- type FrameworkErrorResponse
- type GenerateClipJSONRequestBody
- type GenerateClipParams
- type GenerateClipRequest
- type GenerateClipResponse
- func (r GenerateClipResponse) ContentType() string
- func (r GenerateClipResponse) GetBody() []byte
- func (r GenerateClipResponse) GetJSON200() *GeneratedClipResponse
- func (r GenerateClipResponse) GetJSON400() *GenerationBadRequest
- func (r GenerateClipResponse) GetJSON402() *GenerationPaymentRequired
- func (r GenerateClipResponse) GetJSON403() *GenerationForbidden
- func (r GenerateClipResponse) GetJSON409() *GenerationConflict
- func (r GenerateClipResponse) GetJSON429() *GenerationRateLimited
- func (r GenerateClipResponse) GetJSON502() *GenerationProviderFailed
- func (r GenerateClipResponse) GetJSON503() *GenerationUnavailable
- func (r GenerateClipResponse) Status() string
- func (r GenerateClipResponse) StatusCode() int
- type GenerateClipResponse409Headers
- type GenerateClipResponse429Headers
- type GeneratePortraitsJSONRequestBody
- type GeneratePortraitsParams
- type GeneratePortraitsRequest
- type GeneratePortraitsRequestEngine
- type GeneratePortraitsResponse
- func (r GeneratePortraitsResponse) ContentType() string
- func (r GeneratePortraitsResponse) GetBody() []byte
- func (r GeneratePortraitsResponse) GetJSON200() *GeneratedPortraitsResponse
- func (r GeneratePortraitsResponse) GetJSON400() *GenerationBadRequest
- func (r GeneratePortraitsResponse) GetJSON402() *GenerationPaymentRequired
- func (r GeneratePortraitsResponse) GetJSON403() *GenerationForbidden
- func (r GeneratePortraitsResponse) GetJSON409() *GenerationConflict
- func (r GeneratePortraitsResponse) GetJSON429() *GenerationRateLimited
- func (r GeneratePortraitsResponse) GetJSON502() *GenerationProviderFailed
- func (r GeneratePortraitsResponse) GetJSON503() *GenerationUnavailable
- func (r GeneratePortraitsResponse) Status() string
- func (r GeneratePortraitsResponse) StatusCode() int
- type GeneratePortraitsResponse409Headers
- type GeneratePortraitsResponse429Headers
- type GeneratedClip
- type GeneratedClipResponse
- type GeneratedPortrait
- type GeneratedPortraitsResponse
- type GenerationBadRequest
- type GenerationConflict
- type GenerationForbidden
- type GenerationIdempotencyKey
- type GenerationPaymentRequired
- type GenerationPricing
- type GenerationProviderFailed
- type GenerationRateLimited
- type GenerationUnavailable
- type GetAccountBalanceResponse
- func (r GetAccountBalanceResponse) ContentType() string
- func (r GetAccountBalanceResponse) GetBody() []byte
- func (r GetAccountBalanceResponse) GetJSON200() *AccountBalance
- func (r GetAccountBalanceResponse) GetJSON403() *ApiErrorResponse
- func (r GetAccountBalanceResponse) GetJSON409() *AccountAmbiguous
- func (r GetAccountBalanceResponse) Status() string
- func (r GetAccountBalanceResponse) StatusCode() int
- type GetAccountEarningsResponse
- func (r GetAccountEarningsResponse) ContentType() string
- func (r GetAccountEarningsResponse) GetBody() []byte
- func (r GetAccountEarningsResponse) GetJSON200() *AccountEarnings
- func (r GetAccountEarningsResponse) GetJSON403() *ApiErrorResponse
- func (r GetAccountEarningsResponse) GetJSON409() *AccountAmbiguous
- func (r GetAccountEarningsResponse) Status() string
- func (r GetAccountEarningsResponse) StatusCode() int
- type GetAccountResponse
- func (r GetAccountResponse) ContentType() string
- func (r GetAccountResponse) GetBody() []byte
- func (r GetAccountResponse) GetJSON200() *Account
- func (r GetAccountResponse) GetJSON403() *ApiErrorResponse
- func (r GetAccountResponse) GetJSON409() *AccountAmbiguous
- func (r GetAccountResponse) Status() string
- func (r GetAccountResponse) StatusCode() int
- type GetAvatarAppearanceResponse
- func (r GetAvatarAppearanceResponse) ContentType() string
- func (r GetAvatarAppearanceResponse) GetBody() []byte
- func (r GetAvatarAppearanceResponse) GetJSON200() *AvatarSourceFile
- func (r GetAvatarAppearanceResponse) GetJSON409() *AccountAmbiguous
- func (r GetAvatarAppearanceResponse) Status() string
- func (r GetAvatarAppearanceResponse) StatusCode() int
- type GetAvatarConductorResponse
- type GetAvatarKnowledgeResponse
- func (r GetAvatarKnowledgeResponse) ContentType() string
- func (r GetAvatarKnowledgeResponse) GetBody() []byte
- func (r GetAvatarKnowledgeResponse) GetJSON200() *AvatarKnowledge
- func (r GetAvatarKnowledgeResponse) GetJSON409() *AccountAmbiguous
- func (r GetAvatarKnowledgeResponse) Status() string
- func (r GetAvatarKnowledgeResponse) StatusCode() int
- type GetAvatarMonetizationResponse
- func (r GetAvatarMonetizationResponse) ContentType() string
- func (r GetAvatarMonetizationResponse) GetBody() []byte
- func (r GetAvatarMonetizationResponse) GetJSON200() *AvatarMonetization
- func (r GetAvatarMonetizationResponse) GetJSON409() *AccountAmbiguous
- func (r GetAvatarMonetizationResponse) Status() string
- func (r GetAvatarMonetizationResponse) StatusCode() int
- type GetAvatarResponse
- type GetAvatarSessionResponse
- func (r GetAvatarSessionResponse) ContentType() string
- func (r GetAvatarSessionResponse) GetBody() []byte
- func (r GetAvatarSessionResponse) GetJSON200() *AvatarSessionStatusResponse
- func (r GetAvatarSessionResponse) GetJSON403() *ApiErrorResponse
- func (r GetAvatarSessionResponse) GetJSON404() *ApiErrorResponse
- func (r GetAvatarSessionResponse) GetJSON409() *AccountAmbiguous
- func (r GetAvatarSessionResponse) Status() string
- func (r GetAvatarSessionResponse) StatusCode() int
- type GetAvatarSponsorResponse
- type GetAvatarVoiceResponse
- func (r GetAvatarVoiceResponse) ContentType() string
- func (r GetAvatarVoiceResponse) GetBody() []byte
- func (r GetAvatarVoiceResponse) GetJSON200() *AvatarVoice
- func (r GetAvatarVoiceResponse) GetJSON409() *AccountAmbiguous
- func (r GetAvatarVoiceResponse) Status() string
- func (r GetAvatarVoiceResponse) StatusCode() int
- type GetCurrentApiKeyResponse
- func (r GetCurrentApiKeyResponse) ContentType() string
- func (r GetCurrentApiKeyResponse) GetBody() []byte
- func (r GetCurrentApiKeyResponse) GetJSON200() *CurrentCaller
- func (r GetCurrentApiKeyResponse) GetJSON403() *ApiErrorResponse
- func (r GetCurrentApiKeyResponse) GetJSON409() *AccountAmbiguous
- func (r GetCurrentApiKeyResponse) Status() string
- func (r GetCurrentApiKeyResponse) StatusCode() int
- type GetSpeechSessionResponse
- func (r GetSpeechSessionResponse) ContentType() string
- func (r GetSpeechSessionResponse) GetBody() []byte
- func (r GetSpeechSessionResponse) GetJSON200() *SpeechSessionStatusResponse
- func (r GetSpeechSessionResponse) GetJSON403() *ApiErrorResponse
- func (r GetSpeechSessionResponse) GetJSON404() *ApiErrorResponse
- func (r GetSpeechSessionResponse) GetJSON409() *AccountAmbiguous
- func (r GetSpeechSessionResponse) GetJSON503() *ApiErrorResponse
- func (r GetSpeechSessionResponse) Status() string
- func (r GetSpeechSessionResponse) StatusCode() int
- type GetUploadResponse
- func (r GetUploadResponse) ContentType() string
- func (r GetUploadResponse) GetBody() []byte
- func (r GetUploadResponse) GetJSON200() *Upload
- func (r GetUploadResponse) GetJSON403() *ApiErrorResponse
- func (r GetUploadResponse) GetJSON404() *ApiErrorResponse
- func (r GetUploadResponse) GetJSON409() *AccountAmbiguous
- func (r GetUploadResponse) GetJSON503() *ApiErrorResponse
- func (r GetUploadResponse) Status() string
- func (r GetUploadResponse) StatusCode() int
- type GrantAvatarSponsorJSONRequestBody
- type GrantAvatarSponsorParams
- type GrantAvatarSponsorResponse
- func (r GrantAvatarSponsorResponse) ContentType() string
- func (r GrantAvatarSponsorResponse) GetBody() []byte
- func (r GrantAvatarSponsorResponse) GetJSON200() *SponsorGrantResponse
- func (r GrantAvatarSponsorResponse) GetJSON402() *ApiErrorResponse
- func (r GrantAvatarSponsorResponse) GetJSON409() *ApiErrorResponse
- func (r GrantAvatarSponsorResponse) Status() string
- func (r GrantAvatarSponsorResponse) StatusCode() int
- type HttpRequestDoer
- type KnowledgeAssetRef
- type ListApiKeysResponse
- func (r ListApiKeysResponse) ContentType() string
- func (r ListApiKeysResponse) GetBody() []byte
- func (r ListApiKeysResponse) GetJSON200() *ApiKeyList
- func (r ListApiKeysResponse) GetJSON403() *ApiErrorResponse
- func (r ListApiKeysResponse) GetJSON409() *AccountAmbiguous
- func (r ListApiKeysResponse) Status() string
- func (r ListApiKeysResponse) StatusCode() int
- type ListAvatarCandidatesParams
- type ListAvatarCandidatesParamsVersions
- type ListAvatarCandidatesResponse
- type ListAvatarCandidatesResponse200Headers
- type ListAvatarsParams
- type ListAvatarsResponse
- func (r ListAvatarsResponse) ContentType() string
- func (r ListAvatarsResponse) GetBody() []byte
- func (r ListAvatarsResponse) GetJSON200() *AvatarListResponse
- func (r ListAvatarsResponse) GetJSON403() *ApiErrorResponse
- func (r ListAvatarsResponse) GetJSON409() *AccountAmbiguous
- func (r ListAvatarsResponse) Status() string
- func (r ListAvatarsResponse) StatusCode() int
- type PaymentRequiredResponse
- type PaymentRequiredResponseError
- type PlanRef
- type ProfileRefusal
- type RateLimited
- type RateLimitedResponse
- type RateLimitedResponseError
- type RateLimitedResponseReason
- type RedeemAccountCodeJSONRequestBody
- type RedeemAccountCodeResponse
- func (r RedeemAccountCodeResponse) ContentType() string
- func (r RedeemAccountCodeResponse) GetBody() []byte
- func (r RedeemAccountCodeResponse) GetJSON200() *CodeRedemption
- func (r RedeemAccountCodeResponse) GetJSON400() *ApiErrorResponse
- func (r RedeemAccountCodeResponse) GetJSON403() *ApiErrorResponse
- func (r RedeemAccountCodeResponse) GetJSON404() *ApiErrorResponse
- func (r RedeemAccountCodeResponse) GetJSON409() *ApiErrorResponse
- func (r RedeemAccountCodeResponse) GetJSON503() *ApiErrorResponse
- func (r RedeemAccountCodeResponse) Status() string
- func (r RedeemAccountCodeResponse) StatusCode() int
- type RedeemCodeRequest
- type RenderResolution
- type ReplaceAvatarAppearanceJSONRequestBody
- type ReplaceAvatarAppearanceMultipartBody
- type ReplaceAvatarAppearanceMultipartRequestBody
- type ReplaceAvatarAppearanceResponse
- func (r ReplaceAvatarAppearanceResponse) ContentType() string
- func (r ReplaceAvatarAppearanceResponse) GetBody() []byte
- func (r ReplaceAvatarAppearanceResponse) GetJSON200() *AvatarPartResponse
- func (r ReplaceAvatarAppearanceResponse) Status() string
- func (r ReplaceAvatarAppearanceResponse) StatusCode() int
- type ReplaceAvatarKnowledgeJSONRequestBody
- type ReplaceAvatarKnowledgeMultipartBody
- type ReplaceAvatarKnowledgeMultipartRequestBody
- type ReplaceAvatarKnowledgeResponse
- func (r ReplaceAvatarKnowledgeResponse) ContentType() string
- func (r ReplaceAvatarKnowledgeResponse) GetBody() []byte
- func (r ReplaceAvatarKnowledgeResponse) GetJSON200() *AvatarPartResponse
- func (r ReplaceAvatarKnowledgeResponse) Status() string
- func (r ReplaceAvatarKnowledgeResponse) StatusCode() int
- type ReplaceAvatarThumbnailJSONRequestBody
- type ReplaceAvatarThumbnailMultipartBody
- type ReplaceAvatarThumbnailMultipartRequestBody
- type ReplaceAvatarThumbnailResponse
- type ReplaceAvatarVoiceJSONRequestBody
- type ReplaceAvatarVoiceMultipartBody
- type ReplaceAvatarVoiceMultipartRequestBody
- type ReplaceAvatarVoiceResponse
- type RequestEditorFn
- type RevokeApiKeyResponse
- func (r RevokeApiKeyResponse) ContentType() string
- func (r RevokeApiKeyResponse) GetBody() []byte
- func (r RevokeApiKeyResponse) GetJSON200() *ApiKey
- func (r RevokeApiKeyResponse) GetJSON403() *ApiErrorResponse
- func (r RevokeApiKeyResponse) GetJSON404() *ApiErrorResponse
- func (r RevokeApiKeyResponse) GetJSON409() *AccountAmbiguous
- func (r RevokeApiKeyResponse) Status() string
- func (r RevokeApiKeyResponse) StatusCode() int
- type RotateApiKeyResponse
- func (r RotateApiKeyResponse) ContentType() string
- func (r RotateApiKeyResponse) GetBody() []byte
- func (r RotateApiKeyResponse) GetJSON200() *ApiKeySecret
- func (r RotateApiKeyResponse) GetJSON403() *ApiErrorResponse
- func (r RotateApiKeyResponse) GetJSON404() *ApiErrorResponse
- func (r RotateApiKeyResponse) GetJSON409() *ApiErrorResponse
- func (r RotateApiKeyResponse) Status() string
- func (r RotateApiKeyResponse) StatusCode() int
- type RuntimeSeed
- type SelectAvatarCandidateJSONRequestBody
- type SelectAvatarCandidateResponse
- type SessionLinks
- type SetAvatarConductorJSONRequestBody
- type SetAvatarConductorResponse
- type SpeechSessionCreateRequest
- type SpeechSessionCreateResponse
- type SpeechSessionCreateResponseBillingMode
- type SpeechSessionEndResponse
- type SpeechSessionEndResponseStatus
- type SpeechSessionIdPath
- type SpeechSessionPathId
- type SpeechSessionPinnedSettings
- type SpeechSessionPinnedSettingsDelegationType
- type SpeechSessionStatusResponse
- type SpeechSessionStatusResponseBillingMode
- type SpeechSessionStatusResponseStatus
- type SponsorGrantRequest
- type SponsorGrantResponse
- type SponsorWithdrawRequest
- type SponsorWithdrawResponse
- type StartEmbedSessionJSONRequestBodydeprecated
- type StartEmbedSessionResponse
- func (r StartEmbedSessionResponse) ContentType() string
- func (r StartEmbedSessionResponse) GetBody() []byte
- func (r StartEmbedSessionResponse) GetJSON201() *EmbedSessionStartResponse
- func (r StartEmbedSessionResponse) GetJSON400() *ApiErrorResponse
- func (r StartEmbedSessionResponse) GetJSON402() *PaymentRequiredResponse
- func (r StartEmbedSessionResponse) GetJSON409() *ApiErrorResponse
- func (r StartEmbedSessionResponse) GetJSON422() *FrameworkErrorResponse
- func (r StartEmbedSessionResponse) GetJSON503() *ApiErrorResponse
- func (r StartEmbedSessionResponse) Status() string
- func (r StartEmbedSessionResponse) StatusCode() int
- type StartEmbedSessionResponse503Headers
- type TtsProvider
- type UpdateApiKeyJSONRequestBody
- type UpdateApiKeyResponse
- func (r UpdateApiKeyResponse) ContentType() string
- func (r UpdateApiKeyResponse) GetBody() []byte
- func (r UpdateApiKeyResponse) GetJSON200() *ApiKey
- func (r UpdateApiKeyResponse) GetJSON400() *ApiErrorResponse
- func (r UpdateApiKeyResponse) GetJSON403() *ApiErrorResponse
- func (r UpdateApiKeyResponse) GetJSON404() *ApiErrorResponse
- func (r UpdateApiKeyResponse) GetJSON409() *ApiErrorResponse
- func (r UpdateApiKeyResponse) Status() string
- func (r UpdateApiKeyResponse) StatusCode() int
- type UpdateAvatarJSONRequestBody
- type UpdateAvatarResponse
- func (r UpdateAvatarResponse) ContentType() string
- func (r UpdateAvatarResponse) GetBody() []byte
- func (r UpdateAvatarResponse) GetJSON200() *AvatarDetail
- func (r UpdateAvatarResponse) GetJSON409() *ProfileRefusal
- func (r UpdateAvatarResponse) Status() string
- func (r UpdateAvatarResponse) StatusCode() int
- type UpdateAvatarSponsorJSONRequestBody
- type UpdateAvatarSponsorResponse
- type Upload
- type UploadCreateRequest
- type UploadCreateResponse
- type UploadCreateResponseStatus
- type UploadIdPath
- type UploadKind
- type UploadStatus
- type UploadableAssetRef
- type VersionDeleteResponse
- type WithdrawAvatarSponsorJSONRequestBody
- type WithdrawAvatarSponsorResponse
- func (r WithdrawAvatarSponsorResponse) ContentType() string
- func (r WithdrawAvatarSponsorResponse) GetBody() []byte
- func (r WithdrawAvatarSponsorResponse) GetJSON200() *SponsorWithdrawResponse
- func (r WithdrawAvatarSponsorResponse) GetJSON409() *ApiErrorResponse
- func (r WithdrawAvatarSponsorResponse) Status() string
- func (r WithdrawAvatarSponsorResponse) StatusCode() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateApiKeyRequest ¶
func NewCreateApiKeyRequest(server string, body CreateApiKeyJSONRequestBody) (*http.Request, error)
NewCreateApiKeyRequest calls the generic CreateApiKey builder with application/json body
func NewCreateApiKeyRequestWithBody ¶
func NewCreateApiKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateApiKeyRequestWithBody constructs an http.Request for the CreateApiKey method, with any body, and a specified content type
func NewCreateAvatarCandidatesRequest ¶
func NewCreateAvatarCandidatesRequest(server string, avatarId AvatarIdPath, body CreateAvatarCandidatesJSONRequestBody) (*http.Request, error)
NewCreateAvatarCandidatesRequest calls the generic CreateAvatarCandidates builder with application/json body
func NewCreateAvatarCandidatesRequestWithBody ¶
func NewCreateAvatarCandidatesRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewCreateAvatarCandidatesRequestWithBody constructs an http.Request for the CreateAvatarCandidates method, with any body, and a specified content type
func NewCreateAvatarRequest ¶
func NewCreateAvatarRequest(server string, body CreateAvatarJSONRequestBody) (*http.Request, error)
NewCreateAvatarRequest calls the generic CreateAvatar builder with application/json body
func NewCreateAvatarRequestWithBody ¶
func NewCreateAvatarRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateAvatarRequestWithBody constructs an http.Request for the CreateAvatar method, with any body, and a specified content type
func NewCreateAvatarSessionRequest ¶
func NewCreateAvatarSessionRequest(server string, avatarId AvatarIdPath, params *CreateAvatarSessionParams, body CreateAvatarSessionJSONRequestBody) (*http.Request, error)
NewCreateAvatarSessionRequest calls the generic CreateAvatarSession builder with application/json body
func NewCreateAvatarSessionRequestWithBody ¶
func NewCreateAvatarSessionRequestWithBody(server string, avatarId AvatarIdPath, params *CreateAvatarSessionParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateAvatarSessionRequestWithBody constructs an http.Request for the CreateAvatarSession method, with any body, and a specified content type
func NewCreateSpeechSessionRequest ¶
func NewCreateSpeechSessionRequest(server string, body CreateSpeechSessionJSONRequestBody) (*http.Request, error)
NewCreateSpeechSessionRequest calls the generic CreateSpeechSession builder with application/json body
func NewCreateSpeechSessionRequestWithBody ¶
func NewCreateSpeechSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateSpeechSessionRequestWithBody constructs an http.Request for the CreateSpeechSession method, with any body, and a specified content type
func NewCreateUploadRequest ¶
func NewCreateUploadRequest(server string, body CreateUploadJSONRequestBody) (*http.Request, error)
NewCreateUploadRequest calls the generic CreateUpload builder with application/json body
func NewCreateUploadRequestWithBody ¶
func NewCreateUploadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateUploadRequestWithBody constructs an http.Request for the CreateUpload method, with any body, and a specified content type
func NewDeleteAvatarConductorRequest ¶
func NewDeleteAvatarConductorRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewDeleteAvatarConductorRequest constructs an http.Request for the DeleteAvatarConductor method
func NewDeleteAvatarRequest ¶
func NewDeleteAvatarRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewDeleteAvatarRequest constructs an http.Request for the DeleteAvatar method
func NewDeleteAvatarThumbnailRequest ¶
func NewDeleteAvatarThumbnailRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewDeleteAvatarThumbnailRequest constructs an http.Request for the DeleteAvatarThumbnail method
func NewDeleteAvatarVersionRequest ¶
func NewDeleteAvatarVersionRequest(server string, avatarId AvatarIdPath, versionId string) (*http.Request, error)
NewDeleteAvatarVersionRequest constructs an http.Request for the DeleteAvatarVersion method
func NewDesignVoiceRequest ¶
func NewDesignVoiceRequest(server string, params *DesignVoiceParams, body DesignVoiceJSONRequestBody) (*http.Request, error)
NewDesignVoiceRequest calls the generic DesignVoice builder with application/json body
func NewDesignVoiceRequestWithBody ¶
func NewDesignVoiceRequestWithBody(server string, params *DesignVoiceParams, contentType string, body io.Reader) (*http.Request, error)
NewDesignVoiceRequestWithBody constructs an http.Request for the DesignVoice method, with any body, and a specified content type
func NewEndAvatarSessionRequest ¶
func NewEndAvatarSessionRequest(server string, id AvatarSessionIdPath) (*http.Request, error)
NewEndAvatarSessionRequest constructs an http.Request for the EndAvatarSession method
func NewEndSpeechSessionRequest ¶
func NewEndSpeechSessionRequest(server string, sessionId SpeechSessionPathId) (*http.Request, error)
NewEndSpeechSessionRequest constructs an http.Request for the EndSpeechSession method
func NewEnhancePortraitRequest ¶
func NewEnhancePortraitRequest(server string, params *EnhancePortraitParams, body EnhancePortraitJSONRequestBody) (*http.Request, error)
NewEnhancePortraitRequest calls the generic EnhancePortrait builder with application/json body
func NewEnhancePortraitRequestWithBody ¶
func NewEnhancePortraitRequestWithBody(server string, params *EnhancePortraitParams, contentType string, body io.Reader) (*http.Request, error)
NewEnhancePortraitRequestWithBody constructs an http.Request for the EnhancePortrait method, with any body, and a specified content type
func NewGenerateClipRequest ¶
func NewGenerateClipRequest(server string, params *GenerateClipParams, body GenerateClipJSONRequestBody) (*http.Request, error)
NewGenerateClipRequest calls the generic GenerateClip builder with application/json body
func NewGenerateClipRequestWithBody ¶
func NewGenerateClipRequestWithBody(server string, params *GenerateClipParams, contentType string, body io.Reader) (*http.Request, error)
NewGenerateClipRequestWithBody constructs an http.Request for the GenerateClip method, with any body, and a specified content type
func NewGeneratePortraitsRequest ¶
func NewGeneratePortraitsRequest(server string, params *GeneratePortraitsParams, body GeneratePortraitsJSONRequestBody) (*http.Request, error)
NewGeneratePortraitsRequest calls the generic GeneratePortraits builder with application/json body
func NewGeneratePortraitsRequestWithBody ¶
func NewGeneratePortraitsRequestWithBody(server string, params *GeneratePortraitsParams, contentType string, body io.Reader) (*http.Request, error)
NewGeneratePortraitsRequestWithBody constructs an http.Request for the GeneratePortraits method, with any body, and a specified content type
func NewGetAccountBalanceRequest ¶
NewGetAccountBalanceRequest constructs an http.Request for the GetAccountBalance method
func NewGetAccountEarningsRequest ¶
NewGetAccountEarningsRequest constructs an http.Request for the GetAccountEarnings method
func NewGetAccountRequest ¶
NewGetAccountRequest constructs an http.Request for the GetAccount method
func NewGetAvatarAppearanceRequest ¶
func NewGetAvatarAppearanceRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewGetAvatarAppearanceRequest constructs an http.Request for the GetAvatarAppearance method
func NewGetAvatarConductorRequest ¶
func NewGetAvatarConductorRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewGetAvatarConductorRequest constructs an http.Request for the GetAvatarConductor method
func NewGetAvatarKnowledgeRequest ¶
func NewGetAvatarKnowledgeRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewGetAvatarKnowledgeRequest constructs an http.Request for the GetAvatarKnowledge method
func NewGetAvatarMonetizationRequest ¶
func NewGetAvatarMonetizationRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewGetAvatarMonetizationRequest constructs an http.Request for the GetAvatarMonetization method
func NewGetAvatarRequest ¶
func NewGetAvatarRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewGetAvatarRequest constructs an http.Request for the GetAvatar method
func NewGetAvatarSessionRequest ¶
func NewGetAvatarSessionRequest(server string, id AvatarSessionIdPath) (*http.Request, error)
NewGetAvatarSessionRequest constructs an http.Request for the GetAvatarSession method
func NewGetAvatarSponsorRequest ¶
func NewGetAvatarSponsorRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewGetAvatarSponsorRequest constructs an http.Request for the GetAvatarSponsor method
func NewGetAvatarVoiceRequest ¶
func NewGetAvatarVoiceRequest(server string, avatarId AvatarIdPath) (*http.Request, error)
NewGetAvatarVoiceRequest constructs an http.Request for the GetAvatarVoice method
func NewGetCurrentApiKeyRequest ¶
NewGetCurrentApiKeyRequest constructs an http.Request for the GetCurrentApiKey method
func NewGetSpeechSessionRequest ¶
func NewGetSpeechSessionRequest(server string, sessionId SpeechSessionPathId) (*http.Request, error)
NewGetSpeechSessionRequest constructs an http.Request for the GetSpeechSession method
func NewGetUploadRequest ¶
func NewGetUploadRequest(server string, uploadId UploadIdPath) (*http.Request, error)
NewGetUploadRequest constructs an http.Request for the GetUpload method
func NewGrantAvatarSponsorRequest ¶
func NewGrantAvatarSponsorRequest(server string, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, body GrantAvatarSponsorJSONRequestBody) (*http.Request, error)
NewGrantAvatarSponsorRequest calls the generic GrantAvatarSponsor builder with application/json body
func NewGrantAvatarSponsorRequestWithBody ¶
func NewGrantAvatarSponsorRequestWithBody(server string, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, contentType string, body io.Reader) (*http.Request, error)
NewGrantAvatarSponsorRequestWithBody constructs an http.Request for the GrantAvatarSponsor method, with any body, and a specified content type
func NewListApiKeysRequest ¶
NewListApiKeysRequest constructs an http.Request for the ListApiKeys method
func NewListAvatarCandidatesRequest ¶
func NewListAvatarCandidatesRequest(server string, avatarId AvatarIdPath, params *ListAvatarCandidatesParams) (*http.Request, error)
NewListAvatarCandidatesRequest constructs an http.Request for the ListAvatarCandidates method
func NewListAvatarsRequest ¶
func NewListAvatarsRequest(server string, params *ListAvatarsParams) (*http.Request, error)
NewListAvatarsRequest constructs an http.Request for the ListAvatars method
func NewRedeemAccountCodeRequest ¶
func NewRedeemAccountCodeRequest(server string, body RedeemAccountCodeJSONRequestBody) (*http.Request, error)
NewRedeemAccountCodeRequest calls the generic RedeemAccountCode builder with application/json body
func NewRedeemAccountCodeRequestWithBody ¶
func NewRedeemAccountCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewRedeemAccountCodeRequestWithBody constructs an http.Request for the RedeemAccountCode method, with any body, and a specified content type
func NewReplaceAvatarAppearanceRequest ¶
func NewReplaceAvatarAppearanceRequest(server string, avatarId AvatarIdPath, body ReplaceAvatarAppearanceJSONRequestBody) (*http.Request, error)
NewReplaceAvatarAppearanceRequest calls the generic ReplaceAvatarAppearance builder with application/json body
func NewReplaceAvatarAppearanceRequestWithBody ¶
func NewReplaceAvatarAppearanceRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewReplaceAvatarAppearanceRequestWithBody constructs an http.Request for the ReplaceAvatarAppearance method, with any body, and a specified content type
func NewReplaceAvatarKnowledgeRequest ¶
func NewReplaceAvatarKnowledgeRequest(server string, avatarId AvatarIdPath, body ReplaceAvatarKnowledgeJSONRequestBody) (*http.Request, error)
NewReplaceAvatarKnowledgeRequest calls the generic ReplaceAvatarKnowledge builder with application/json body
func NewReplaceAvatarKnowledgeRequestWithBody ¶
func NewReplaceAvatarKnowledgeRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewReplaceAvatarKnowledgeRequestWithBody constructs an http.Request for the ReplaceAvatarKnowledge method, with any body, and a specified content type
func NewReplaceAvatarThumbnailRequest ¶
func NewReplaceAvatarThumbnailRequest(server string, avatarId AvatarIdPath, body ReplaceAvatarThumbnailJSONRequestBody) (*http.Request, error)
NewReplaceAvatarThumbnailRequest calls the generic ReplaceAvatarThumbnail builder with application/json body
func NewReplaceAvatarThumbnailRequestWithBody ¶
func NewReplaceAvatarThumbnailRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewReplaceAvatarThumbnailRequestWithBody constructs an http.Request for the ReplaceAvatarThumbnail method, with any body, and a specified content type
func NewReplaceAvatarVoiceRequest ¶
func NewReplaceAvatarVoiceRequest(server string, avatarId AvatarIdPath, body ReplaceAvatarVoiceJSONRequestBody) (*http.Request, error)
NewReplaceAvatarVoiceRequest calls the generic ReplaceAvatarVoice builder with application/json body
func NewReplaceAvatarVoiceRequestWithBody ¶
func NewReplaceAvatarVoiceRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewReplaceAvatarVoiceRequestWithBody constructs an http.Request for the ReplaceAvatarVoice method, with any body, and a specified content type
func NewRevokeApiKeyRequest ¶
func NewRevokeApiKeyRequest(server string, apiKeyId ApiKeyIdPath) (*http.Request, error)
NewRevokeApiKeyRequest constructs an http.Request for the RevokeApiKey method
func NewRotateApiKeyRequest ¶
func NewRotateApiKeyRequest(server string, apiKeyId ApiKeyIdPath) (*http.Request, error)
NewRotateApiKeyRequest constructs an http.Request for the RotateApiKey method
func NewSelectAvatarCandidateRequest ¶
func NewSelectAvatarCandidateRequest(server string, avatarId AvatarIdPath, body SelectAvatarCandidateJSONRequestBody) (*http.Request, error)
NewSelectAvatarCandidateRequest calls the generic SelectAvatarCandidate builder with application/json body
func NewSelectAvatarCandidateRequestWithBody ¶
func NewSelectAvatarCandidateRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewSelectAvatarCandidateRequestWithBody constructs an http.Request for the SelectAvatarCandidate method, with any body, and a specified content type
func NewSetAvatarConductorRequest ¶
func NewSetAvatarConductorRequest(server string, avatarId AvatarIdPath, body SetAvatarConductorJSONRequestBody) (*http.Request, error)
NewSetAvatarConductorRequest calls the generic SetAvatarConductor builder with application/json body
func NewSetAvatarConductorRequestWithBody ¶
func NewSetAvatarConductorRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewSetAvatarConductorRequestWithBody constructs an http.Request for the SetAvatarConductor method, with any body, and a specified content type
func NewStartEmbedSessionRequest ¶
func NewStartEmbedSessionRequest(server string, body StartEmbedSessionJSONRequestBody) (*http.Request, error)
NewStartEmbedSessionRequest calls the generic StartEmbedSession builder with application/json body
func NewStartEmbedSessionRequestWithBody ¶
func NewStartEmbedSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewStartEmbedSessionRequestWithBody constructs an http.Request for the StartEmbedSession method, with any body, and a specified content type
func NewUpdateApiKeyRequest ¶
func NewUpdateApiKeyRequest(server string, apiKeyId ApiKeyIdPath, body UpdateApiKeyJSONRequestBody) (*http.Request, error)
NewUpdateApiKeyRequest calls the generic UpdateApiKey builder with application/json body
func NewUpdateApiKeyRequestWithBody ¶
func NewUpdateApiKeyRequestWithBody(server string, apiKeyId ApiKeyIdPath, contentType string, body io.Reader) (*http.Request, error)
NewUpdateApiKeyRequestWithBody constructs an http.Request for the UpdateApiKey method, with any body, and a specified content type
func NewUpdateAvatarRequest ¶
func NewUpdateAvatarRequest(server string, avatarId AvatarIdPath, body UpdateAvatarJSONRequestBody) (*http.Request, error)
NewUpdateAvatarRequest calls the generic UpdateAvatar builder with application/json body
func NewUpdateAvatarRequestWithBody ¶
func NewUpdateAvatarRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewUpdateAvatarRequestWithBody constructs an http.Request for the UpdateAvatar method, with any body, and a specified content type
func NewUpdateAvatarSponsorRequest ¶
func NewUpdateAvatarSponsorRequest(server string, avatarId AvatarIdPath, body UpdateAvatarSponsorJSONRequestBody) (*http.Request, error)
NewUpdateAvatarSponsorRequest calls the generic UpdateAvatarSponsor builder with application/json body
func NewUpdateAvatarSponsorRequestWithBody ¶
func NewUpdateAvatarSponsorRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewUpdateAvatarSponsorRequestWithBody constructs an http.Request for the UpdateAvatarSponsor method, with any body, and a specified content type
func NewWithdrawAvatarSponsorRequest ¶
func NewWithdrawAvatarSponsorRequest(server string, avatarId AvatarIdPath, body WithdrawAvatarSponsorJSONRequestBody) (*http.Request, error)
NewWithdrawAvatarSponsorRequest calls the generic WithdrawAvatarSponsor builder with application/json body
func NewWithdrawAvatarSponsorRequestWithBody ¶
func NewWithdrawAvatarSponsorRequestWithBody(server string, avatarId AvatarIdPath, contentType string, body io.Reader) (*http.Request, error)
NewWithdrawAvatarSponsorRequestWithBody constructs an http.Request for the WithdrawAvatarSponsor method, with any body, and a specified content type
Types ¶
type Account ¶
type Account struct {
AccountId string `json:"accountId"`
// CaptureQuota v2 captures queued or running, against the pending cap (as X-RateLimit-* on a v2 create).
CaptureQuota CaptureQuota `json:"captureQuota"`
Limits AccountLimits `json:"limits"`
// Links The account's pages on the Atmee website, ready to hand to a person.
// Absent when this deployment does not know the website's address.
Links *AccountLinks `json:"links,omitempty"`
// Payouts Whether the account can be paid out (its Stripe Connect account), as
// last synced. Monetizing an avatar needs `verified`; payouts are set up
// in Creator Studio. Absent when unknown.
Payouts *AccountPayouts `json:"payouts,omitempty"`
Plan AccountPlan `json:"plan"`
Pricing AccountPricing `json:"pricing"`
// V2Access Whether this account may build v2 avatars: `granted`;
// `invite_required` (v2 is invite-only and the account has not been
// let in, so v2 calls answer `403 v2_access_required` until it redeems
// an invite code; use `engine: v1` meanwhile); or `unavailable` (v2 is
// not offered here). Absent when it could not be determined.
V2Access *AccountV2Access `json:"v2Access,omitempty"`
}
Account defines model for Account.
type AccountAmbiguous ¶
type AccountAmbiguous = ApiErrorResponse
AccountAmbiguous defines model for AccountAmbiguous.
type AccountBalance ¶
type AccountBalance struct {
// CouponMicrocredits Coupon credits left.
CouponMicrocredits int64 `json:"couponMicrocredits"`
// CouponSpendable False for a metered key, which never spends coupon credits.
CouponSpendable bool `json:"couponSpendable"`
// HeldByLiveSessionsMicrocredits Reserved by sessions running now (already taken out of the buckets); what they do not use comes back when they end.
HeldByLiveSessionsMicrocredits int64 `json:"heldByLiveSessionsMicrocredits"`
// NextExpiry Credits that will expire, soonest first.
NextExpiry []CreditExpiry `json:"nextExpiry"`
// PlanMicrocredits Credits of the plan's cycle grant left. Negative when the bucket is in debt.
PlanMicrocredits int64 `json:"planMicrocredits"`
// SpendableMicrocredits What a session is admitted on for this caller (see the operation).
SpendableMicrocredits int64 `json:"spendableMicrocredits"`
// TopupMicrocredits Purchased credits left.
TopupMicrocredits int64 `json:"topupMicrocredits"`
// Unlimited Sessions are not charged (an unlimited plan, or billing switched off).
Unlimited bool `json:"unlimited"`
// Wallet The wallet API usage spends; always `direct`.
Wallet AccountBalanceWallet `json:"wallet"`
}
AccountBalance defines model for AccountBalance.
type AccountBalanceWallet ¶
type AccountBalanceWallet string
AccountBalanceWallet The wallet API usage spends; always `direct`.
const (
Direct AccountBalanceWallet = "direct"
)
Defines values for AccountBalanceWallet.
func (AccountBalanceWallet) Valid ¶
func (e AccountBalanceWallet) Valid() bool
Valid indicates whether the value is a known member of the AccountBalanceWallet enum.
type AccountEarnings ¶
type AccountEarnings struct {
TotalEarningsMicrocredits int64 `json:"totalEarningsMicrocredits"`
TotalPayoutsMicrocredits int64 `json:"totalPayoutsMicrocredits"`
// WalletBalanceMicrocredits Earned and not yet paid out.
WalletBalanceMicrocredits int64 `json:"walletBalanceMicrocredits"`
}
AccountEarnings defines model for AccountEarnings.
type AccountLimits ¶
type AccountLimits struct {
// ApiAccess Whether the account may use the API (sessions answer `403 api_access_disabled` when false).
ApiAccess bool `json:"apiAccess"`
// MaxApiAvatars Live API-created avatars the account may have.
MaxApiAvatars *int `json:"maxApiAvatars,omitempty"`
// MaxConcurrentSessions Sessions that may run at once; absent = not capped by the plan.
MaxConcurrentSessions *int `json:"maxConcurrentSessions,omitempty"`
// MaxSessionSeconds Longest session the plan allows; absent = not capped by the plan.
MaxSessionSeconds *int `json:"maxSessionSeconds,omitempty"`
}
AccountLimits defines model for AccountLimits.
type AccountLinks ¶
type AccountLinks struct {
// Analytics Conversation analytics.
Analytics string `json:"analytics"`
// ApiKeys The account's API keys.
ApiKeys string `json:"apiKeys"`
// Avatars The account's avatars in Creator Studio.
Avatars string `json:"avatars"`
// Billing Credits, plan, top-ups and earnings.
Billing string `json:"billing"`
// Create Make an avatar in Creator Studio.
Create string `json:"create"`
// Docs The Avatar API documentation.
Docs string `json:"docs"`
// Explore Explore, where people find avatars to talk to.
Explore string `json:"explore"`
}
AccountLinks The account's pages on the Atmee website, ready to hand to a person. Absent when this deployment does not know the website's address.
type AccountPayouts ¶
type AccountPayouts struct {
// Status not_started until a payout account exists, then its verification status.
Status AccountPayoutsStatus `json:"status"`
VerifiedAt *time.Time `json:"verifiedAt,omitempty"`
}
AccountPayouts Whether the account can be paid out (its Stripe Connect account), as last synced. Monetizing an avatar needs `verified`; payouts are set up in Creator Studio. Absent when unknown.
type AccountPayoutsStatus ¶
type AccountPayoutsStatus string
AccountPayoutsStatus not_started until a payout account exists, then its verification status.
const ( AccountPayoutsStatusNotStarted AccountPayoutsStatus = "not_started" AccountPayoutsStatusPending AccountPayoutsStatus = "pending" AccountPayoutsStatusSuspended AccountPayoutsStatus = "suspended" AccountPayoutsStatusUnverified AccountPayoutsStatus = "unverified" AccountPayoutsStatusVerified AccountPayoutsStatus = "verified" )
Defines values for AccountPayoutsStatus.
func (AccountPayoutsStatus) Valid ¶
func (e AccountPayoutsStatus) Valid() bool
Valid indicates whether the value is a known member of the AccountPayoutsStatus enum.
type AccountPlan ¶
type AccountPlan struct {
// Code The plan's code (e.g. free, pro).
Code *string `json:"code,omitempty"`
// CycleEnd When the current billing cycle ends.
CycleEnd *time.Time `json:"cycleEnd,omitempty"`
// IncludedMicrocredits Credits the plan grants each cycle.
IncludedMicrocredits *int64 `json:"includedMicrocredits,omitempty"`
Name *string `json:"name,omitempty"`
// PendingPlan The plan the account moves to at the end of the cycle; absent when none is scheduled.
PendingPlan *PlanRef `json:"pendingPlan,omitempty"`
}
AccountPlan defines model for AccountPlan.
type AccountPricing ¶
type AccountPricing struct {
// Generation The price of one call of each generation operation, charged only when at least one output comes back. Absent when this instance does not offer generation.
Generation *GenerationPricing `json:"generation,omitempty"`
// MonetizedPerMinuteMicrocredits What a viewer pays per minute with a monetized v1 avatar on atmee.ai (its owner pays `sessionPerMinuteMicrocredits`); API sessions are never charged it.
MonetizedPerMinuteMicrocredits int `json:"monetizedPerMinuteMicrocredits"`
// MonetizedV2PerMinuteMicrocredits What a viewer pays per minute with a monetized v2 avatar on atmee.ai (its owner pays `sessionV2PerMinuteMicrocredits`); API sessions are never charged it.
MonetizedV2PerMinuteMicrocredits int `json:"monetizedV2PerMinuteMicrocredits"`
// PreviewClipMicrocredits One preview clip.
PreviewClipMicrocredits int `json:"previewClipMicrocredits"`
// RenderV1PerMinuteMicrocredits An avatar session (render only, your own agent) of a v1 avatar per minute.
RenderV1PerMinuteMicrocredits int `json:"renderV1PerMinuteMicrocredits"`
// RenderV2PerMinuteMicrocredits An avatar session (render only, your own agent) of a v2 avatar per minute.
RenderV2PerMinuteMicrocredits int `json:"renderV2PerMinuteMicrocredits"`
// SessionPerMinuteMicrocredits A conversation (`POST /v1/sessions`) with a v1 avatar, per minute:
// speech, language model, voice and render.
SessionPerMinuteMicrocredits int `json:"sessionPerMinuteMicrocredits"`
// SessionV2PerMinuteMicrocredits A conversation (`POST /v1/sessions`) with a v2 avatar, per minute.
SessionV2PerMinuteMicrocredits int `json:"sessionV2PerMinuteMicrocredits"`
// SpeechPerMinuteMicrocredits A speech session (`POST /v1/speech_sessions`) per minute; null on a deployment that does not report it.
SpeechPerMinuteMicrocredits *int `json:"speechPerMinuteMicrocredits,omitempty"`
}
AccountPricing defines model for AccountPricing.
type AccountV2Access ¶
type AccountV2Access string
AccountV2Access Whether this account may build v2 avatars: `granted`; `invite_required` (v2 is invite-only and the account has not been let in, so v2 calls answer `403 v2_access_required` until it redeems an invite code; use `engine: v1` meanwhile); or `unavailable` (v2 is not offered here). Absent when it could not be determined.
const ( AccountV2AccessGranted AccountV2Access = "granted" AccountV2AccessInviteRequired AccountV2Access = "invite_required" )
Defines values for AccountV2Access.
func (AccountV2Access) Valid ¶
func (e AccountV2Access) Valid() bool
Valid indicates whether the value is a known member of the AccountV2Access enum.
type ApiErrorResponse ¶
type ApiErrorResponse struct {
// Error Machine-readable code (e.g. invalid_zip, insufficient_scope, avatar_not_found).
Error string `json:"error"`
Message string `json:"message"`
}
ApiErrorResponse defines model for ApiErrorResponse.
type ApiKey ¶
type ApiKey struct {
// Active false once revoked.
Active bool `json:"active"`
// AvatarId The one avatar the key may use; absent for a key that may use every avatar of the account.
AvatarId *openapi_types.UUID `json:"avatarId,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Id openapi_types.UUID `json:"id"`
// KeyPrefix The secret's first characters (`sk_atmee_` and 8 more), enough to recognise it, far too few to use it.
//
// Examples: sk_atmee_b395e328
KeyPrefix string `json:"keyPrefix"`
// LastFour The secret's last four characters.
LastFour string `json:"lastFour"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
MaxConcurrentSessions int `json:"maxConcurrentSessions"`
// MaxSessionSeconds The longest session the key may start; absent for a key with no cap of its own (a metered key), where the plan's applies.
MaxSessionSeconds *int `json:"maxSessionSeconds,omitempty"`
Name string `json:"name"`
RevokedAt *time.Time `json:"revokedAt,omitempty"`
Scopes []ApiKeyScopes `json:"scopes"`
// SpendCapMicrocredits What the key may spend per `spendCapWindow` (100 microcredits = 1 credit).
SpendCapMicrocredits int `json:"spendCapMicrocredits"`
SpendCapWindow ApiKeySpendCapWindow `json:"spendCapWindow"`
// VisitorMemory Whether sessions started with this key may remember a visitor across sessions (`visitorId`).
VisitorMemory bool `json:"visitorMemory"`
}
ApiKey An API key's settings. The secret is never part of it.
type ApiKeyCreateRequest ¶
type ApiKeyCreateRequest struct {
// AvatarId Restrict the key to this one avatar of the account.
AvatarId *openapi_types.UUID `json:"avatarId,omitempty"`
MaxConcurrentSessions *int `json:"maxConcurrentSessions,omitempty"`
MaxSessionSeconds *int `json:"maxSessionSeconds,omitempty"`
// Name A name to recognise the key by, e.g. the app that uses it.
Name string `json:"name"`
// Scopes What the key may do; `sessions` (start and end conversations) is
// always included. `avatars:read` / `avatars:write` manage avatars,
// `billing:write` moves credits into sponsor pools, `generation:write`
// spends credits on portrait and voice generation (together with
// `avatars:write`). Default: just `sessions`.
Scopes *[]ApiKeyCreateRequestScopes `json:"scopes,omitempty"`
// SpendCapMicrocredits Default 50000 (500 credits).
SpendCapMicrocredits *int `json:"spendCapMicrocredits,omitempty"`
// SpendCapWindow Default monthly.
SpendCapWindow *ApiKeyCreateRequestSpendCapWindow `json:"spendCapWindow,omitempty"`
// VisitorMemory Allow cross-session visitor memory (`visitorId` on session start). Default false.
VisitorMemory *bool `json:"visitorMemory,omitempty"`
}
ApiKeyCreateRequest defines model for ApiKeyCreateRequest.
type ApiKeyCreateRequestScopes ¶
type ApiKeyCreateRequestScopes string
ApiKeyCreateRequestScopes defines model for ApiKeyCreateRequest.Scopes.
const ( ApiKeyCreateRequestScopesAvatarsRead ApiKeyCreateRequestScopes = "avatars:read" ApiKeyCreateRequestScopesAvatarsWrite ApiKeyCreateRequestScopes = "avatars:write" ApiKeyCreateRequestScopesBillingWrite ApiKeyCreateRequestScopes = "billing:write" ApiKeyCreateRequestScopesGenerationWrite ApiKeyCreateRequestScopes = "generation:write" ApiKeyCreateRequestScopesSessions ApiKeyCreateRequestScopes = "sessions" )
Defines values for ApiKeyCreateRequestScopes.
func (ApiKeyCreateRequestScopes) Valid ¶
func (e ApiKeyCreateRequestScopes) Valid() bool
Valid indicates whether the value is a known member of the ApiKeyCreateRequestScopes enum.
type ApiKeyCreateRequestSpendCapWindow ¶
type ApiKeyCreateRequestSpendCapWindow string
ApiKeyCreateRequestSpendCapWindow Default monthly.
const ( ApiKeyCreateRequestSpendCapWindowDaily ApiKeyCreateRequestSpendCapWindow = "daily" ApiKeyCreateRequestSpendCapWindowMonthly ApiKeyCreateRequestSpendCapWindow = "monthly" ApiKeyCreateRequestSpendCapWindowTotal ApiKeyCreateRequestSpendCapWindow = "total" )
Defines values for ApiKeyCreateRequestSpendCapWindow.
func (ApiKeyCreateRequestSpendCapWindow) Valid ¶
func (e ApiKeyCreateRequestSpendCapWindow) Valid() bool
Valid indicates whether the value is a known member of the ApiKeyCreateRequestSpendCapWindow enum.
type ApiKeyIdPath ¶
type ApiKeyIdPath = openapi_types.UUID
ApiKeyIdPath defines model for ApiKeyIdPath.
type ApiKeyList ¶
type ApiKeyList struct {
ApiKeys []ApiKey `json:"apiKeys"`
}
ApiKeyList defines model for ApiKeyList.
type ApiKeyScopes ¶
type ApiKeyScopes string
ApiKeyScopes defines model for ApiKey.Scopes.
const ( ApiKeyScopesAvatarsRead ApiKeyScopes = "avatars:read" ApiKeyScopesAvatarsWrite ApiKeyScopes = "avatars:write" ApiKeyScopesBillingWrite ApiKeyScopes = "billing:write" ApiKeyScopesGenerationWrite ApiKeyScopes = "generation:write" ApiKeyScopesSessions ApiKeyScopes = "sessions" )
Defines values for ApiKeyScopes.
func (ApiKeyScopes) Valid ¶
func (e ApiKeyScopes) Valid() bool
Valid indicates whether the value is a known member of the ApiKeyScopes enum.
type ApiKeySecret ¶
type ApiKeySecret struct {
// ApiKey The secret (`sk_atmee_...`). Shown only in this response; store it at once.
ApiKey string `json:"apiKey"`
// Key An API key's settings. The secret is never part of it.
Key ApiKey `json:"key"`
}
ApiKeySecret defines model for ApiKeySecret.
type ApiKeySpendCap ¶
type ApiKeySpendCap struct {
// Enforced False when the cap is not applied (an unlimited plan, or billing switched off).
Enforced bool `json:"enforced"`
// LimitMicrocredits The cap; absent when the key has none.
LimitMicrocredits *int64 `json:"limitMicrocredits,omitempty"`
// RemainingMicrocredits limit - spent, floored at 0; absent when the key has no cap.
RemainingMicrocredits *int64 `json:"remainingMicrocredits,omitempty"`
// SpentMicrocredits What the key's sessions have used in the current window, as the cap counts it.
SpentMicrocredits int64 `json:"spentMicrocredits"`
// Window daily, monthly or total.
Window string `json:"window"`
// WindowResetsAt When the window starts over; absent for a total cap.
WindowResetsAt *time.Time `json:"windowResetsAt,omitempty"`
}
ApiKeySpendCap defines model for ApiKeySpendCap.
type ApiKeySpendCapWindow ¶
type ApiKeySpendCapWindow string
ApiKeySpendCapWindow defines model for ApiKey.SpendCapWindow.
const ( ApiKeySpendCapWindowDaily ApiKeySpendCapWindow = "daily" ApiKeySpendCapWindowMonthly ApiKeySpendCapWindow = "monthly" ApiKeySpendCapWindowTotal ApiKeySpendCapWindow = "total" )
Defines values for ApiKeySpendCapWindow.
func (ApiKeySpendCapWindow) Valid ¶
func (e ApiKeySpendCapWindow) Valid() bool
Valid indicates whether the value is a known member of the ApiKeySpendCapWindow enum.
type ApiKeyUpdateRequest ¶
type ApiKeyUpdateRequest struct {
// AvatarId Restrict the key to this one avatar of the account; null widens it to the whole account.
AvatarId *openapi_types.UUID `json:"avatarId,omitempty"`
MaxConcurrentSessions *int `json:"maxConcurrentSessions,omitempty"`
MaxSessionSeconds *int `json:"maxSessionSeconds,omitempty"`
Name *string `json:"name,omitempty"`
// Scopes The key's whole set of scopes; `sessions` is always included.
Scopes *[]ApiKeyUpdateRequestScopes `json:"scopes,omitempty"`
SpendCapMicrocredits *int `json:"spendCapMicrocredits,omitempty"`
SpendCapWindow *ApiKeyUpdateRequestSpendCapWindow `json:"spendCapWindow,omitempty"`
VisitorMemory *bool `json:"visitorMemory,omitempty"`
}
ApiKeyUpdateRequest The fields to change; an absent or null field stays as it is, except `avatarId`.
type ApiKeyUpdateRequestScopes ¶
type ApiKeyUpdateRequestScopes string
ApiKeyUpdateRequestScopes defines model for ApiKeyUpdateRequest.Scopes.
const ( ApiKeyUpdateRequestScopesAvatarsRead ApiKeyUpdateRequestScopes = "avatars:read" ApiKeyUpdateRequestScopesAvatarsWrite ApiKeyUpdateRequestScopes = "avatars:write" ApiKeyUpdateRequestScopesBillingWrite ApiKeyUpdateRequestScopes = "billing:write" ApiKeyUpdateRequestScopesGenerationWrite ApiKeyUpdateRequestScopes = "generation:write" ApiKeyUpdateRequestScopesSessions ApiKeyUpdateRequestScopes = "sessions" )
Defines values for ApiKeyUpdateRequestScopes.
func (ApiKeyUpdateRequestScopes) Valid ¶
func (e ApiKeyUpdateRequestScopes) Valid() bool
Valid indicates whether the value is a known member of the ApiKeyUpdateRequestScopes enum.
type ApiKeyUpdateRequestSpendCapWindow ¶
type ApiKeyUpdateRequestSpendCapWindow string
ApiKeyUpdateRequestSpendCapWindow defines model for ApiKeyUpdateRequest.SpendCapWindow.
const ( ApiKeyUpdateRequestSpendCapWindowDaily ApiKeyUpdateRequestSpendCapWindow = "daily" ApiKeyUpdateRequestSpendCapWindowMonthly ApiKeyUpdateRequestSpendCapWindow = "monthly" ApiKeyUpdateRequestSpendCapWindowTotal ApiKeyUpdateRequestSpendCapWindow = "total" )
Defines values for ApiKeyUpdateRequestSpendCapWindow.
func (ApiKeyUpdateRequestSpendCapWindow) Valid ¶
func (e ApiKeyUpdateRequestSpendCapWindow) Valid() bool
Valid indicates whether the value is a known member of the ApiKeyUpdateRequestSpendCapWindow enum.
type AppTool ¶
type AppTool struct {
// Description What the tool does and when to call it, 1 to 500 characters.
Description string `json:"description"`
// Name `^[a-z][a-z0-9_]{0,47}$`, unique in the session.
//
// Examples: show_slide
Name string `json:"name"`
// Parameters A JSON Schema for the arguments, with top-level `"type": "object"`; at most 4096 bytes of JSON. It must be valid JSON Schema 2020-12 (a `$schema` naming another dialect is refused), and a `$ref`, `$dynamicRef` or `$recursiveRef` anywhere in it must be a local pointer starting with `#`.
Parameters map[string]interface{} `json:"parameters"`
// Strict OpenAI's structured-arguments flag, accepted for compatibility and not used (arguments are checked against `parameters` either way).
Strict *bool `json:"strict,omitempty"`
// Type Always `function`.
Type string `json:"type"`
// XAtmee Whether the avatar waits for the client's result of a call, and for how long.
XAtmee *AppToolOptions `json:"x-atmee,omitempty"`
}
AppTool A function tool in the OpenAI function-tool shape, plus `x-atmee` saying whether the avatar waits for the client's result.
type AppToolOptions ¶
type AppToolOptions struct {
// Mode `notify` (default): the call is sent and the avatar goes on.
// `await`: the avatar waits for the result (saying at most one
// short filler line meanwhile) and answers from it.
Mode *string `json:"mode,omitempty"`
// TimeoutSeconds How long an `await` call waits, 1 to 28 (default 8).
TimeoutSeconds *int `json:"timeoutSeconds,omitempty"`
}
AppToolOptions Whether the avatar waits for the client's result of a call, and for how long.
type AppTools ¶
type AppTools struct {
// Instructions How and when the avatar uses the tools (and any app persona or rules), one text for all of them, at most 4000 characters.
Instructions *string `json:"instructions,omitempty"`
// Tools 1 to 30 tools with unique names, at most 24,576 bytes of JSON in
// all. A name must not be one of the built-in tools `web_search`,
// `lookup` or `look_at_file`.
Tools []AppTool `json:"tools"`
}
AppTools Functions the avatar may call in this session, and how to use them. Absent or null, the session has none.
type AspectRatio ¶
type AspectRatio string
AspectRatio A v2 avatar's shape, which picks its frame size: `square` 512 x 512 (the default), `portrait` 384 x 640, `landscape` 640 x 384. The sizes follow the renderer and may change; the names do not. Send it or `resolution`, not both (`400`). On an avatar it is a build input, like `resolution`: a change on PATCH builds a new version.
const ( AspectRatioLandscape AspectRatio = "landscape" AspectRatioPortrait AspectRatio = "portrait" AspectRatioSquare AspectRatio = "square" )
Defines values for AspectRatio.
func (AspectRatio) Valid ¶
func (e AspectRatio) Valid() bool
Valid indicates whether the value is a known member of the AspectRatio enum.
type AssetRef ¶
type AssetRef struct {
// Url Public https URL the service downloads. Private, loopback and link-local hosts are refused (`invalid_url`).
Url string `json:"url"`
}
AssetRef defines model for AssetRef.
type AssetRefs ¶
type AssetRefs struct {
Image *UploadableAssetRef `json:"image,omitempty"`
Knowledge *[]KnowledgeAssetRef `json:"knowledge,omitempty"`
// Prompt The scenario as a UTF-8 text file (the `prompt/prompt.txt` of a zip). Mutually exclusive with `persona.scenario`.
Prompt *AssetRef `json:"prompt,omitempty"`
Voice *UploadableAssetRef `json:"voice,omitempty"`
}
AssetRefs The files of a JSON create, by URL. Same limits as the zip folders (image jpg/png/webp <=10 MB, voice 10-60 s <=12 MB, knowledge <=20 files). The image is the portrait; front-facing, face at least about a third of the frame, lips slightly parted (see the operation). With an image and no `voice` a v1 avatar is render-only; without the image (or a v2 one without the voice) it is a draft.
type AvatarAppearanceJsonRequest ¶
type AvatarAppearanceJsonRequest struct {
Image AssetRefString `json:"image"`
}
AvatarAppearanceJsonRequest defines model for AvatarAppearanceJsonRequest.
type AvatarCreateJsonRequest ¶
type AvatarCreateJsonRequest struct {
// AspectRatio A v2 avatar's shape, which picks its frame size: `square` 512 x 512
// (the default), `portrait` 384 x 640, `landscape` 640 x 384. The
// sizes follow the renderer and may change; the names do not. Send it
// or `resolution`, not both (`400`). On an avatar it is a build input,
// like `resolution`: a change on PATCH builds a new version.
AspectRatio *AspectRatio `json:"aspectRatio,omitempty"`
// Assets The files of a JSON create, by URL. Same limits as the zip folders (image jpg/png/webp <=10 MB, voice 10-60 s <=12 MB, knowledge <=20 files). The image is the portrait; front-facing, face at least about a third of the frame, lips slightly parted (see the operation). With an image and no `voice` a v1 avatar is render-only; without the image (or a v2 one without the voice) it is a draft.
Assets *AssetRefs `json:"assets,omitempty"`
// BlackoutRecovery Blackout recovery of the v2 renderer. While the avatar listens, it
// screens each generated chunk for a fade to black (or fully black
// frames) and shows a healthy listening clip in place of a failed one,
// returning to live frames on the first healthy chunk. On by default.
// Send only the settings to change; an absent or null one keeps its
// current value (on create: its default). Ignored for v1 avatars (the
// setting exists only on the v2 renderer): nothing is stored and the
// rest of the request behaves as without it. It changes how sessions
// render, never the avatar's build: no candidate is captured or
// cancelled. A change applies from the next session.
BlackoutRecovery *BlackoutRecovery `json:"blackoutRecovery,omitempty"`
Description *string `json:"description,omitempty"`
Engine *AvatarCreateJsonRequestEngine `json:"engine,omitempty"`
Knowledge *map[string]interface{} `json:"knowledge,omitempty"`
Language *string `json:"language,omitempty"`
Name string `json:"name"`
Persona *map[string]interface{} `json:"persona,omitempty"`
PreviewMessage *string `json:"previewMessage,omitempty"`
Previews *bool `json:"previews,omitempty"`
// Resolution A frame size in pixels for the v2 renderer, or send `aspectRatio`
// to pick one by shape: width and height are each
// a multiple of 32 from 256 to 1024, and width x height is at most
// 262,144 (512 x 512); a larger frame is `400 invalid_manifest`.
// Default 512 x 512 (square). The aspect ratios' sizes: square
// 512 x 512, portrait 384 x 640, landscape 640 x 384. A deployment
// offers only some sizes (512 x 512 always;
// `GET /v1/account` `pricing.generation.clipResolutions` lists them
// where clips are offered): another is `400 invalid_input` ("resolution
// WxH is not offered; offered: ..."). On an avatar it is a build input of v2 avatars only
// (`400 invalid_input` for a v1 avatar): the portrait is preprocessed
// at that size, so a change on PATCH builds a new version with new
// candidates, like a new portrait; sending the current size again
// builds nothing. Absent or null keeps the current size (on create:
// the default).
Resolution *RenderResolution `json:"resolution,omitempty"`
// RuntimeSeed The v2 renderer's runtime seed: it seeds a session's noise and motion
// after the first chunk, so another seed gives the same avatar
// different movement; the serving candidate stays the same. Default 42
// (the renderer default; send 42 to go back to it). Absent or null
// keeps the current value (on create: the default). Ignored for v1
// avatars: nothing is stored and the rest of the request behaves as
// without it. It is no build input: nothing is captured or rebuilt,
// and a change applies from the next session.
RuntimeSeed *RuntimeSeed `json:"runtimeSeed,omitempty"`
SchemaVersion AvatarCreateJsonRequestSchemaVersion `json:"schemaVersion"`
SeedPreviews *struct {
Count *int `json:"count,omitempty"`
} `json:"seedPreviews,omitempty"`
SeedSelection *AvatarCreateJsonRequestSeedSelection `json:"seedSelection,omitempty"`
Sponsor *map[string]interface{} `json:"sponsor,omitempty"`
Visibility *AvatarCreateJsonRequestVisibility `json:"visibility,omitempty"`
Voice *map[string]interface{} `json:"voice,omitempty"`
}
AvatarCreateJsonRequest `avatar.json` plus an `assets` block. Field rules match the zip manifest and are enforced by the service (400 `invalid_manifest`, naming the field); only the shape is checked here.
type AvatarCreateJsonRequestEngine ¶
type AvatarCreateJsonRequestEngine string
AvatarCreateJsonRequestEngine defines model for AvatarCreateJsonRequest.Engine.
const ( AvatarCreateJsonRequestEngineV1 AvatarCreateJsonRequestEngine = "v1" AvatarCreateJsonRequestEngineV2 AvatarCreateJsonRequestEngine = "v2" )
Defines values for AvatarCreateJsonRequestEngine.
func (AvatarCreateJsonRequestEngine) Valid ¶
func (e AvatarCreateJsonRequestEngine) Valid() bool
Valid indicates whether the value is a known member of the AvatarCreateJsonRequestEngine enum.
type AvatarCreateJsonRequestSchemaVersion ¶
type AvatarCreateJsonRequestSchemaVersion int
AvatarCreateJsonRequestSchemaVersion defines model for AvatarCreateJsonRequest.SchemaVersion.
const (
N1 AvatarCreateJsonRequestSchemaVersion = 1
)
Defines values for AvatarCreateJsonRequestSchemaVersion.
func (AvatarCreateJsonRequestSchemaVersion) Valid ¶
func (e AvatarCreateJsonRequestSchemaVersion) Valid() bool
Valid indicates whether the value is a known member of the AvatarCreateJsonRequestSchemaVersion enum.
type AvatarCreateJsonRequestSeedSelection ¶
type AvatarCreateJsonRequestSeedSelection string
AvatarCreateJsonRequestSeedSelection defines model for AvatarCreateJsonRequest.SeedSelection.
const ( AvatarCreateJsonRequestSeedSelectionAuto AvatarCreateJsonRequestSeedSelection = "auto" AvatarCreateJsonRequestSeedSelectionManual AvatarCreateJsonRequestSeedSelection = "manual" )
Defines values for AvatarCreateJsonRequestSeedSelection.
func (AvatarCreateJsonRequestSeedSelection) Valid ¶
func (e AvatarCreateJsonRequestSeedSelection) Valid() bool
Valid indicates whether the value is a known member of the AvatarCreateJsonRequestSeedSelection enum.
type AvatarCreateJsonRequestVisibility ¶
type AvatarCreateJsonRequestVisibility string
AvatarCreateJsonRequestVisibility defines model for AvatarCreateJsonRequest.Visibility.
const ( AvatarCreateJsonRequestVisibilityPrivate AvatarCreateJsonRequestVisibility = "private" AvatarCreateJsonRequestVisibilityUnlisted AvatarCreateJsonRequestVisibility = "unlisted" )
Defines values for AvatarCreateJsonRequestVisibility.
func (AvatarCreateJsonRequestVisibility) Valid ¶
func (e AvatarCreateJsonRequestVisibility) Valid() bool
Valid indicates whether the value is a known member of the AvatarCreateJsonRequestVisibility enum.
type AvatarCreateResponse ¶
type AvatarCreateResponse struct {
AvatarId openapi_types.UUID `json:"avatarId"`
// Engine Render engine: `v1`, the original renderer, or `v2`, which serves a
// selected candidate (see `GET /v1/avatars/{avatarId}/candidates`).
Engine *AvatarEngine `json:"engine,omitempty"`
// Kind `conversational` avatars have a voice and a persona and can run a full
// Atmanity session once built. `render_only` avatars have a portrait only:
// they are ready immediately and render video for an external agent, but
// `readyToChat` stays false until a voice is added via `PUT /voice`.
Kind AvatarKind `json:"kind"`
// MissingInputs What a `draft` was created without; absent otherwise.
MissingInputs *[]AvatarCreateResponseMissingInputs `json:"missingInputs,omitempty"`
Sponsor *SponsorGrantResponse `json:"sponsor,omitempty"`
// Status `ready` for a render-only avatar (nothing to build), `draft` for one created without its portrait or voice, `building` otherwise.
Status AvatarCreateResponseStatus `json:"status"`
StatusUrl string `json:"statusUrl"`
}
AvatarCreateResponse defines model for AvatarCreateResponse.
type AvatarCreateResponseMissingInputs ¶
type AvatarCreateResponseMissingInputs string
AvatarCreateResponseMissingInputs defines model for AvatarCreateResponse.MissingInputs.
const ( AvatarCreateResponseMissingInputsImage AvatarCreateResponseMissingInputs = "image" AvatarCreateResponseMissingInputsVoice AvatarCreateResponseMissingInputs = "voice" )
Defines values for AvatarCreateResponseMissingInputs.
func (AvatarCreateResponseMissingInputs) Valid ¶
func (e AvatarCreateResponseMissingInputs) Valid() bool
Valid indicates whether the value is a known member of the AvatarCreateResponseMissingInputs enum.
type AvatarCreateResponseStatus ¶
type AvatarCreateResponseStatus string
AvatarCreateResponseStatus `ready` for a render-only avatar (nothing to build), `draft` for one created without its portrait or voice, `building` otherwise.
const ( AvatarCreateResponseStatusBuilding AvatarCreateResponseStatus = "building" AvatarCreateResponseStatusDraft AvatarCreateResponseStatus = "draft" AvatarCreateResponseStatusReady AvatarCreateResponseStatus = "ready" )
Defines values for AvatarCreateResponseStatus.
func (AvatarCreateResponseStatus) Valid ¶
func (e AvatarCreateResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the AvatarCreateResponseStatus enum.
type AvatarDetail ¶
type AvatarDetail struct {
// AspectRatio v2 only, alongside `resolution`: the shape of the avatar's
// frame (`portrait` when taller than wide, `landscape` when
// wider, else `square`).
AspectRatio *AvatarDetailAspectRatio `json:"aspectRatio,omitempty"`
// BlackoutRecovery v2 only. The blackout recovery a session started now would use:
// each setting as set on the avatar, else from its rendering
// config, else the default. A change applies from the next
// session.
BlackoutRecovery *BlackoutRecoveryEffective `json:"blackoutRecovery,omitempty"`
// Conductor v2 only (absent on v1 avatars and on list rows). Whether a
// graph conductor is set (`PUT /v1/avatars/{avatarId}/conductor`)
// and its node count; `GET /conductor` returns the graph.
Conductor *ConductorSummary `json:"conductor,omitempty"`
CreatedAt time.Time `json:"createdAt"`
// CreationSource Set to api for avatars created through this API.
CreationSource *string `json:"creationSource,omitempty"`
Description *string `json:"description,omitempty"`
// Engine Render engine: `v1`, the original renderer, or `v2`, which serves a
// selected candidate (see `GET /v1/avatars/{avatarId}/candidates`).
Engine *AvatarEngine `json:"engine,omitempty"`
Id openapi_types.UUID `json:"id"`
// Kind `conversational` avatars have a voice and a persona and can run a full
// Atmanity session once built. `render_only` avatars have a portrait only:
// they are ready immediately and render video for an external agent, but
// `readyToChat` stays false until a voice is added via `PUT /voice`.
Kind AvatarKind `json:"kind"`
// Knowledge What the avatar knows: the facts as set with `knowledge.facts`, the
// questionnaire answers, and the knowledge files (GET
// /v1/avatars/{avatarId}/knowledge links to them).
Knowledge *AvatarKnowledgeSummary `json:"knowledge,omitempty"`
// Language The language set on the avatar (`language`); null when none was set, which reads as English.
Language *string `json:"language,omitempty"`
// LatestFailure The failure that still applies: the first stage, in build order
// (appearance, voice, persona, knowledge, previews), that is
// `failed` now; absent once none is. `userFeedback` is the reason.
// It can appear on a `ready` v2 avatar whose new portrait or voice
// failed while the previous take keeps serving. A `portrait_*`
// reason needs a new portrait: front-facing, the face at least a
// third of the frame, lips slightly parted (`PUT
// /v1/avatars/{avatarId}/appearance`).
LatestFailure *struct {
Stage AvatarDetailLatestFailureStage `json:"stage"`
UserFeedback *string `json:"userFeedback,omitempty"`
} `json:"latestFailure,omitempty"`
// Links The avatar's pages on the Atmee website, ready to hand to a person:
// give these rather than building URLs. Absent when this deployment
// does not know the website's address. A private avatar's pages open
// only for its owner, signed in.
Links *AvatarLinks `json:"links,omitempty"`
// MissingInputs The inputs a `draft` still lacks; absent on every other status.
MissingInputs *[]AvatarDetailMissingInputs `json:"missingInputs,omitempty"`
ModerationState *string `json:"moderationState,omitempty"`
Name string `json:"name"`
// Persona Who the avatar is and how it talks, as set on create (`persona`), by
// PATCH or in Creator Studio, as it was set: a field never set is null
// (a list set empty is []). PATCH takes the same shape
// (AvatarPersonaEdit); send only the fields to change.
Persona *AvatarPersona `json:"persona,omitempty"`
// PreviewMessage The preview message as set (`previewMessage`); null for the default sentence.
PreviewMessage *string `json:"previewMessage,omitempty"`
// PreviewUrls Presigned mp4 URLs of the finished preview clips, valid for
// about an hour (see `expiresAt`); get the avatar again to refresh
// them. Only on `GET /v1/avatars/{avatarId}`, once a clip is done.
PreviewUrls *struct {
ExpiresAt time.Time `json:"expiresAt"`
// Idle The idle (silent, breathing) preview clip.
Idle *string `json:"idle,omitempty"`
// Talking The talking preview clip (the preview message spoken).
Talking *string `json:"talking,omitempty"`
} `json:"previewUrls,omitempty"`
// Previews Whether preview clips are made (`previews`).
Previews *bool `json:"previews,omitempty"`
// Profile How the avatar is shown on its public page, as set in Creator Studio or by PATCH and the thumbnail route.
Profile *AvatarProfile `json:"profile,omitempty"`
// ReadyToChat A session can be started on the avatar now (it serves a finished build). This holds during a moderation hold too, for the owning account only.
ReadyToChat bool `json:"readyToChat"`
// Rebuilding v2 only. True while a newer version (new candidates, for a changed portrait, voice or preview message) builds behind the serving candidate. A persona edit is no new version and is followed on `stages.persona` instead.
Rebuilding *bool `json:"rebuilding,omitempty"`
// Resolution v2 only (absent on v1 avatars, on list rows, and when the
// avatar's settings could not be read). The frame size the
// avatar's takes, previews and sessions render at: the one set
// on create or with PATCH, else 512 x 512.
Resolution *RenderResolution `json:"resolution,omitempty"`
// RuntimeSeed v2 only (absent on v1 avatars and on list rows). The runtime
// seed a session started now would run with: the value set on
// this avatar, else the one its rendering config carries, else
// 42. A change applies from the next session.
RuntimeSeed *int `json:"runtimeSeed,omitempty"`
// SeedSelection v2 only.
SeedSelection *AvatarDetailSeedSelection `json:"seedSelection,omitempty"`
// SelectedCandidateId v2 only. The picked candidate (automatic, or with `PUT
// /v1/avatars/{avatarId}/selected_candidate`). It becomes `servingCandidateId` once
// built, a few seconds later; meanwhile `rebuilding` is true if
// another candidate still serves. A pick made before a voice
// replacement is served once the new voice is ready, and not at
// all if that fails (the serving candidate stays).
SelectedCandidateId *openapi_types.UUID `json:"selectedCandidateId,omitempty"`
// SelectionRequired v2 only. True while a completed candidate waits to be promoted (manual mode).
SelectionRequired *bool `json:"selectionRequired,omitempty"`
// ServingCandidateId v2 only. The candidate the avatar renders with; null until one is promoted.
ServingCandidateId *openapi_types.UUID `json:"servingCandidateId,omitempty"`
// Stages The build stages. On v2, `appearance` is the portrait check and
// preprocessing, `voice` is voice cloning, and `previews` is
// candidate capture. The portrait check fails a portrait with no
// face, a face too small or closed lips, and `userFeedback` says
// which (`portrait_no_face`, `portrait_face_too_small`,
// `portrait_mouth_closed`).
Stages struct {
// Appearance One build stage. On failure, `userFeedback` is a message you can show as
// is. `waiting`: blocked on an earlier stage. `pending`: queued.
// `processing`: running. `skipped`: the `previews` stage when preview
// clips are off (the default for API-created avatars), or a stage a
// render-only avatar does not have. Each stage reports its own step, so a
// later stage can read `completed` from an earlier build while an earlier
// stage rebuilds.
Appearance BuildStage `json:"appearance"`
// Knowledge One build stage. On failure, `userFeedback` is a message you can show as
// is. `waiting`: blocked on an earlier stage. `pending`: queued.
// `processing`: running. `skipped`: the `previews` stage when preview
// clips are off (the default for API-created avatars), or a stage a
// render-only avatar does not have. Each stage reports its own step, so a
// later stage can read `completed` from an earlier build while an earlier
// stage rebuilds.
Knowledge BuildStage `json:"knowledge"`
// Persona One build stage. On failure, `userFeedback` is a message you can show as
// is. `waiting`: blocked on an earlier stage. `pending`: queued.
// `processing`: running. `skipped`: the `previews` stage when preview
// clips are off (the default for API-created avatars), or a stage a
// render-only avatar does not have. Each stage reports its own step, so a
// later stage can read `completed` from an earlier build while an earlier
// stage rebuilds.
Persona BuildStage `json:"persona"`
// Previews One build stage. On failure, `userFeedback` is a message you can show as
// is. `waiting`: blocked on an earlier stage. `pending`: queued.
// `processing`: running. `skipped`: the `previews` stage when preview
// clips are off (the default for API-created avatars), or a stage a
// render-only avatar does not have. Each stage reports its own step, so a
// later stage can read `completed` from an earlier build while an earlier
// stage rebuilds.
Previews BuildStage `json:"previews"`
// Voice One build stage. On failure, `userFeedback` is a message you can show as
// is. `waiting`: blocked on an earlier stage. `pending`: queued.
// `processing`: running. `skipped`: the `previews` stage when preview
// clips are off (the default for API-created avatars), or a stage a
// render-only avatar does not have. Each stage reports its own step, so a
// later stage can read `completed` from an earlier build while an earlier
// stage rebuilds.
Voice BuildStage `json:"voice"`
} `json:"stages"`
// Stall Present when the build has made no progress for a long time: on a
// `stalled` avatar, or on a `ready` or held avatar with a stage queued or
// running for 6 hours (the avatar keeps serving). Never on a `failed` or
// `awaiting_selection` avatar. For information only.
Stall *AvatarStall `json:"stall,omitempty"`
// Status What the avatar is doing now. More values may be added: treat an
// unknown one as `building`.
//
// - `building`: a build step is queued or running.
// - `ready`: it serves a build and `readyToChat` is true. A v2 avatar
// stays `ready` while a newer version builds or waits for a pick
// (`rebuilding`, `selectionRequired`).
// - `awaiting_selection` (v2, manual selection): every take of the
// current version finished and nothing serves yet; select one.
// - `failed`: a stage failed and nothing serves; see `latestFailure`.
// - `moderation_hold`: held for moderation review. Visitors cannot
// open it; the account can still start sessions when `readyToChat`
// is true.
// - `stalled`: the build has made no progress for a long time (`stall`
// says since when, and which stage). It will not finish by waiting:
// replace that stage's input or contact support.
// - `draft`: created without its portrait or voice; `missingInputs`
// names what to add with `PUT /v1/avatars/{avatarId}/appearance` or
// `PUT /v1/avatars/{avatarId}/voice`.
Status AvatarDetailStatus `json:"status"`
// Studio What was picked in Creator Studio's editor (read only here): how the
// portrait and the voice were made, and the persona presets the
// whoPrompt and whatPrompt texts started from. Null when never picked
// (an API avatar).
Studio *AvatarStudioChoices `json:"studio,omitempty"`
// ThumbnailUrl Presigned image (Studio's custom thumbnail, else the portrait), valid about one hour; re-GET to refresh.
ThumbnailUrl *string `json:"thumbnailUrl,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
Visibility AvatarDetailVisibility `json:"visibility"`
Voice *AvatarVoiceSettings `json:"voice,omitempty"`
}
AvatarDetail defines model for AvatarDetail.
type AvatarDetailAspectRatio ¶
type AvatarDetailAspectRatio string
AvatarDetailAspectRatio v2 only, alongside `resolution`: the shape of the avatar's frame (`portrait` when taller than wide, `landscape` when wider, else `square`).
const ( AvatarDetailAspectRatioLandscape AvatarDetailAspectRatio = "landscape" AvatarDetailAspectRatioPortrait AvatarDetailAspectRatio = "portrait" AvatarDetailAspectRatioSquare AvatarDetailAspectRatio = "square" )
Defines values for AvatarDetailAspectRatio.
func (AvatarDetailAspectRatio) Valid ¶
func (e AvatarDetailAspectRatio) Valid() bool
Valid indicates whether the value is a known member of the AvatarDetailAspectRatio enum.
type AvatarDetailLatestFailureStage ¶
type AvatarDetailLatestFailureStage string
AvatarDetailLatestFailureStage defines model for AvatarDetail.LatestFailure.Stage.
const ( AvatarDetailLatestFailureStageAppearance AvatarDetailLatestFailureStage = "appearance" AvatarDetailLatestFailureStageKnowledge AvatarDetailLatestFailureStage = "knowledge" AvatarDetailLatestFailureStagePersona AvatarDetailLatestFailureStage = "persona" AvatarDetailLatestFailureStagePreviews AvatarDetailLatestFailureStage = "previews" AvatarDetailLatestFailureStageVoice AvatarDetailLatestFailureStage = "voice" )
Defines values for AvatarDetailLatestFailureStage.
func (AvatarDetailLatestFailureStage) Valid ¶
func (e AvatarDetailLatestFailureStage) Valid() bool
Valid indicates whether the value is a known member of the AvatarDetailLatestFailureStage enum.
type AvatarDetailMissingInputs ¶
type AvatarDetailMissingInputs string
AvatarDetailMissingInputs defines model for AvatarDetail.MissingInputs.
const ( AvatarDetailMissingInputsImage AvatarDetailMissingInputs = "image" AvatarDetailMissingInputsVoice AvatarDetailMissingInputs = "voice" )
Defines values for AvatarDetailMissingInputs.
func (AvatarDetailMissingInputs) Valid ¶
func (e AvatarDetailMissingInputs) Valid() bool
Valid indicates whether the value is a known member of the AvatarDetailMissingInputs enum.
type AvatarDetailSeedSelection ¶
type AvatarDetailSeedSelection string
AvatarDetailSeedSelection v2 only.
const ( AvatarDetailSeedSelectionAuto AvatarDetailSeedSelection = "auto" AvatarDetailSeedSelectionManual AvatarDetailSeedSelection = "manual" )
Defines values for AvatarDetailSeedSelection.
func (AvatarDetailSeedSelection) Valid ¶
func (e AvatarDetailSeedSelection) Valid() bool
Valid indicates whether the value is a known member of the AvatarDetailSeedSelection enum.
type AvatarDetailStatus ¶
type AvatarDetailStatus string
AvatarDetailStatus What the avatar is doing now. More values may be added: treat an unknown one as `building`.
- `building`: a build step is queued or running.
- `ready`: it serves a build and `readyToChat` is true. A v2 avatar stays `ready` while a newer version builds or waits for a pick (`rebuilding`, `selectionRequired`).
- `awaiting_selection` (v2, manual selection): every take of the current version finished and nothing serves yet; select one.
- `failed`: a stage failed and nothing serves; see `latestFailure`.
- `moderation_hold`: held for moderation review. Visitors cannot open it; the account can still start sessions when `readyToChat` is true.
- `stalled`: the build has made no progress for a long time (`stall` says since when, and which stage). It will not finish by waiting: replace that stage's input or contact support.
- `draft`: created without its portrait or voice; `missingInputs` names what to add with `PUT /v1/avatars/{avatarId}/appearance` or `PUT /v1/avatars/{avatarId}/voice`.
const ( AvatarDetailStatusAwaitingSelection AvatarDetailStatus = "awaiting_selection" AvatarDetailStatusBuilding AvatarDetailStatus = "building" AvatarDetailStatusDraft AvatarDetailStatus = "draft" AvatarDetailStatusFailed AvatarDetailStatus = "failed" AvatarDetailStatusModerationHold AvatarDetailStatus = "moderation_hold" AvatarDetailStatusReady AvatarDetailStatus = "ready" AvatarDetailStatusStalled AvatarDetailStatus = "stalled" )
Defines values for AvatarDetailStatus.
func (AvatarDetailStatus) Valid ¶
func (e AvatarDetailStatus) Valid() bool
Valid indicates whether the value is a known member of the AvatarDetailStatus enum.
type AvatarDetailVisibility ¶
type AvatarDetailVisibility string
AvatarDetailVisibility defines model for AvatarDetail.Visibility.
const ( AvatarDetailVisibilityPrivate AvatarDetailVisibility = "private" AvatarDetailVisibilityPublic AvatarDetailVisibility = "public" AvatarDetailVisibilityUnlisted AvatarDetailVisibility = "unlisted" )
Defines values for AvatarDetailVisibility.
func (AvatarDetailVisibility) Valid ¶
func (e AvatarDetailVisibility) Valid() bool
Valid indicates whether the value is a known member of the AvatarDetailVisibility enum.
type AvatarEngine ¶
type AvatarEngine string
AvatarEngine Render engine: `v1`, the original renderer, or `v2`, which serves a selected candidate (see `GET /v1/avatars/{avatarId}/candidates`).
const ( AvatarEngineV1 AvatarEngine = "v1" AvatarEngineV2 AvatarEngine = "v2" )
Defines values for AvatarEngine.
func (AvatarEngine) Valid ¶
func (e AvatarEngine) Valid() bool
Valid indicates whether the value is a known member of the AvatarEngine enum.
type AvatarIdPath ¶
type AvatarIdPath = openapi_types.UUID
AvatarIdPath defines model for AvatarIdPath.
type AvatarKind ¶
type AvatarKind string
AvatarKind `conversational` avatars have a voice and a persona and can run a full Atmanity session once built. `render_only` avatars have a portrait only: they are ready immediately and render video for an external agent, but `readyToChat` stays false until a voice is added via `PUT /voice`.
const ( Conversational AvatarKind = "conversational" RenderOnly AvatarKind = "render_only" )
Defines values for AvatarKind.
func (AvatarKind) Valid ¶
func (e AvatarKind) Valid() bool
Valid indicates whether the value is a known member of the AvatarKind enum.
type AvatarKnowledge ¶
type AvatarKnowledge struct {
// ExpiresAt When the file URLs stop working; GET again for fresh ones.
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
// Facts The facts as set with `knowledge.facts`; null when none are.
Facts *string `json:"facts,omitempty"`
Files []AvatarKnowledgeFileLink `json:"files"`
IntegrationIds []string `json:"integrationIds"`
// Questionnaire Creator Studio's knowledge questionnaire, question to answer.
Questionnaire map[string]string `json:"questionnaire"`
// Questions The questions of Creator Studio's knowledge questionnaire, in Studio's order; the keys `knowledge.questionnaire` takes.
Questions []string `json:"questions"`
}
AvatarKnowledge defines model for AvatarKnowledge.
type AvatarKnowledgeFile ¶
type AvatarKnowledgeFile struct {
// Description What the file is about, as given with the upload.
Description *string `json:"description,omitempty"`
Id string `json:"id"`
// Name The file's name as uploaded.
Name string `json:"name"`
SizeBytes *int64 `json:"sizeBytes,omitempty"`
}
AvatarKnowledgeFile defines model for AvatarKnowledgeFile.
type AvatarKnowledgeFileLink ¶
type AvatarKnowledgeFileLink struct {
// Description What the file is about, as given with the upload.
Description *string `json:"description,omitempty"`
Id string `json:"id"`
// Name The file's name as uploaded.
Name string `json:"name"`
SizeBytes *int64 `json:"sizeBytes,omitempty"`
// Url A presigned download URL, null when it could not be signed.
Url *string `json:"url,omitempty"`
}
AvatarKnowledgeFileLink defines model for AvatarKnowledgeFileLink.
type AvatarKnowledgeJsonRequest ¶
type AvatarKnowledgeJsonRequest struct {
Descriptions *map[string]string `json:"descriptions,omitempty"`
Files []AssetRefString `json:"files"`
}
AvatarKnowledgeJsonRequest defines model for AvatarKnowledgeJsonRequest.
type AvatarKnowledgeSummary ¶
type AvatarKnowledgeSummary struct {
// Facts The facts as set with `knowledge.facts`; null when none are.
Facts *string `json:"facts,omitempty"`
// FactsChars Characters of the facts set with `knowledge.facts`; 0 when none are.
FactsChars int `json:"factsChars"`
// Files The knowledge files, in the order they were given.
Files []AvatarKnowledgeFile `json:"files"`
// IntegrationIds The integrations (news and social feeds) the avatar learns from.
IntegrationIds []string `json:"integrationIds"`
// Questionnaire Creator Studio's knowledge questionnaire, question to answer.
Questionnaire map[string]string `json:"questionnaire"`
// QuestionsAnswered How many questions of Creator Studio's knowledge questionnaire are answered (the entries of `questionnaire`).
QuestionsAnswered int `json:"questionsAnswered"`
}
AvatarKnowledgeSummary What the avatar knows: the facts as set with `knowledge.facts`, the questionnaire answers, and the knowledge files (GET /v1/avatars/{avatarId}/knowledge links to them).
type AvatarLinks ¶
type AvatarLinks struct {
// Chat Its chat page, where anyone it is shared with talks to it; no
// session or token needed. On an avatar's detail it carries
// `?lang=` with the avatar's language, so the call is in it. This
// is the link for a person who wants to talk to the avatar, not a
// session's LiveKit room.
Chat string `json:"chat"`
// Profile Its public profile.
Profile string `json:"profile"`
// Studio Its edit page in Creator Studio.
Studio string `json:"studio"`
}
AvatarLinks The avatar's pages on the Atmee website, ready to hand to a person: give these rather than building URLs. Absent when this deployment does not know the website's address. A private avatar's pages open only for its owner, signed in.
type AvatarListResponse ¶
type AvatarListResponse struct {
Items []AvatarSummary `json:"items"`
// NextBefore Pass as `before` to fetch the next page; null when exhausted.
NextBefore *time.Time `json:"nextBefore,omitempty"`
}
AvatarListResponse defines model for AvatarListResponse.
type AvatarMonetization ¶
type AvatarMonetization struct {
// AccountCap The account's limit on monetizing avatars.
AccountCap struct {
// AtCap Whether the cap stops this avatar from turning monetization on (never when it is already on).
AtCap bool `json:"atCap"`
// Cap The plan's limit; null when the plan has none.
Cap *int `json:"cap"`
// MonetizingAvatars The account's avatars with monetization on.
MonetizingAvatars int `json:"monetizingAvatars"`
} `json:"accountCap"`
// Earnings What the avatar has earned, in microcredits (100 = 1 credit); the current cycle is the account's billing cycle.
Earnings struct {
AllTimeMicrocredits int64 `json:"allTimeMicrocredits"`
// AllTimeSessions Sessions that earned.
AllTimeSessions int64 `json:"allTimeSessions"`
CurrentCycleMicrocredits int64 `json:"currentCycleMicrocredits"`
CurrentCycleSessions int64 `json:"currentCycleSessions"`
} `json:"earnings"`
// Eligible Whether the last 30 days meet every requirement.
Eligible bool `json:"eligible"`
// Last30Days Completed conversations of the last 30 days, the account's own left out.
Last30Days struct {
Conversations int64 `json:"conversations"`
// Minutes Conversation minutes, rounded to two decimals.
Minutes float64 `json:"minutes"`
// UniqueUsers Distinct accounts that talked to the avatar.
UniqueUsers int64 `json:"uniqueUsers"`
} `json:"last30Days"`
// Monetized Whether monetization is on for the avatar.
Monetized bool `json:"monetized"`
// Requirements The 30-day thresholds of eligibility, and which the avatar meets.
Requirements struct {
Conversations int `json:"conversations"`
MeetsConversations bool `json:"meetsConversations"`
MeetsMinutes bool `json:"meetsMinutes"`
MeetsUniqueUsers bool `json:"meetsUniqueUsers"`
Minutes int `json:"minutes"`
UniqueUsers int `json:"uniqueUsers"`
} `json:"requirements"`
}
AvatarMonetization An avatar's monetization, as Creator Studio's monetization panel shows it (read only here).
type AvatarMonetizationEdit ¶
type AvatarMonetizationEdit struct {
// ConfirmSponsorWithdrawal Read when turning monetization on for an avatar whose sponsor pool holds credits; true accepts that the pool is withdrawn to the account.
ConfirmSponsorWithdrawal *bool `json:"confirmSponsorWithdrawal,omitempty"`
Enabled bool `json:"enabled"`
}
AvatarMonetizationEdit Turn monetization on or off, as Creator Studio's switch does.
type AvatarPartResponse ¶
type AvatarPartResponse struct {
AvatarId openapi_types.UUID `json:"avatarId"`
Status AvatarPartResponseStatus `json:"status"`
}
AvatarPartResponse defines model for AvatarPartResponse.
type AvatarPartResponseStatus ¶
type AvatarPartResponseStatus string
AvatarPartResponseStatus defines model for AvatarPartResponse.Status.
const (
AvatarPartResponseStatusBuilding AvatarPartResponseStatus = "building"
)
Defines values for AvatarPartResponseStatus.
func (AvatarPartResponseStatus) Valid ¶
func (e AvatarPartResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the AvatarPartResponseStatus enum.
type AvatarPersona ¶
type AvatarPersona struct {
ConversationalHabits *map[string]AvatarPersonaConversationalHabits `json:"conversationalHabits,omitempty"`
Greeting *string `json:"greeting,omitempty"`
Guardrails *[]string `json:"guardrails,omitempty"`
KnownAliases *[]string `json:"knownAliases,omitempty"`
PreferredAlias *string `json:"preferredAlias,omitempty"`
SelfIntroduction *string `json:"selfIntroduction,omitempty"`
SpokenName *string `json:"spokenName,omitempty"`
// WhatPrompt What the avatar is doing with the visitor (Creator Studio's "What are we doing").
WhatPrompt *string `json:"whatPrompt,omitempty"`
// WhoPrompt Who the avatar is (Creator Studio's "Who are you").
WhoPrompt *string `json:"whoPrompt,omitempty"`
}
AvatarPersona Who the avatar is and how it talks, as set on create (`persona`), by PATCH or in Creator Studio, as it was set: a field never set is null (a list set empty is []). PATCH takes the same shape (AvatarPersonaEdit); send only the fields to change.
type AvatarPersonaConversationalHabits ¶
type AvatarPersonaConversationalHabits string
AvatarPersonaConversationalHabits defines model for AvatarPersona.ConversationalHabits.
const ( AvatarPersonaConversationalHabitsCONVERSATIONALHABITSCALEHIGH AvatarPersonaConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_HIGH" AvatarPersonaConversationalHabitsCONVERSATIONALHABITSCALELOW AvatarPersonaConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_LOW" AvatarPersonaConversationalHabitsCONVERSATIONALHABITSCALEMEDIUM AvatarPersonaConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_MEDIUM" )
Defines values for AvatarPersonaConversationalHabits.
func (AvatarPersonaConversationalHabits) Valid ¶
func (e AvatarPersonaConversationalHabits) Valid() bool
Valid indicates whether the value is a known member of the AvatarPersonaConversationalHabits enum.
type AvatarPersonaEdit ¶
type AvatarPersonaEdit struct {
ConversationalHabits *map[string]AvatarPersonaEditConversationalHabits `json:"conversationalHabits,omitempty"`
Greeting *string `json:"greeting,omitempty"`
Guardrails *[]string `json:"guardrails,omitempty"`
KnownAliases *[]string `json:"knownAliases,omitempty"`
// Personality Alias of whoPrompt (its older name).
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Personality *string `json:"personality,omitempty"`
PreferredAlias *string `json:"preferredAlias,omitempty"`
// Scenario Alias of whatPrompt (its older name).
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Scenario *string `json:"scenario,omitempty"`
SelfIntroduction *string `json:"selfIntroduction,omitempty"`
SpokenName *string `json:"spokenName,omitempty"`
WhatPrompt *string `json:"whatPrompt,omitempty"`
WhoPrompt *string `json:"whoPrompt,omitempty"`
}
AvatarPersonaEdit The persona fields to change (the shape GET answers in `persona`); an absent or null field stays unchanged.
type AvatarPersonaEditConversationalHabits ¶
type AvatarPersonaEditConversationalHabits string
AvatarPersonaEditConversationalHabits defines model for AvatarPersonaEdit.ConversationalHabits.
const ( AvatarPersonaEditConversationalHabitsCONVERSATIONALHABITSCALEHIGH AvatarPersonaEditConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_HIGH" AvatarPersonaEditConversationalHabitsCONVERSATIONALHABITSCALELOW AvatarPersonaEditConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_LOW" AvatarPersonaEditConversationalHabitsCONVERSATIONALHABITSCALEMEDIUM AvatarPersonaEditConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_MEDIUM" )
Defines values for AvatarPersonaEditConversationalHabits.
func (AvatarPersonaEditConversationalHabits) Valid ¶
func (e AvatarPersonaEditConversationalHabits) Valid() bool
Valid indicates whether the value is a known member of the AvatarPersonaEditConversationalHabits enum.
type AvatarProfile ¶
type AvatarProfile struct {
MonetizationEnabled bool `json:"monetizationEnabled"`
SocialLinks []AvatarSocialLink `json:"socialLinks"`
// StatementType Who the avatar is, as declared for monetization (for example fictional_verification).
StatementType *string `json:"statementType,omitempty"`
Subtitle *string `json:"subtitle,omitempty"`
Tags []string `json:"tags"`
// ThumbnailSource Where the Explore thumbnail comes from -- `custom` (uploaded, as with `PUT /v1/avatars/{avatarId}/thumbnail`) or `auto` (made for the avatar); null when it has none and Explore shows the portrait.
ThumbnailSource *AvatarProfileThumbnailSource `json:"thumbnailSource,omitempty"`
// Title The display title; null shows the preferred alias, then the name.
Title *string `json:"title,omitempty"`
Verified bool `json:"verified"`
}
AvatarProfile How the avatar is shown on its public page, as set in Creator Studio or by PATCH and the thumbnail route.
type AvatarProfileThumbnailSource ¶
type AvatarProfileThumbnailSource string
AvatarProfileThumbnailSource Where the Explore thumbnail comes from -- `custom` (uploaded, as with `PUT /v1/avatars/{avatarId}/thumbnail`) or `auto` (made for the avatar); null when it has none and Explore shows the portrait.
const ( AvatarProfileThumbnailSourceAuto AvatarProfileThumbnailSource = "auto" AvatarProfileThumbnailSourceCustom AvatarProfileThumbnailSource = "custom" )
Defines values for AvatarProfileThumbnailSource.
func (AvatarProfileThumbnailSource) Valid ¶
func (e AvatarProfileThumbnailSource) Valid() bool
Valid indicates whether the value is a known member of the AvatarProfileThumbnailSource enum.
type AvatarSessionCreateRequest ¶
type AvatarSessionCreateRequest struct {
// AgentIdentity With your own room: optional cross-check, must equal the token's
// `lk.publish_on_behalf`. In an Atmee-hosted room: your agent's
// participant identity (default `agent`; `atmee-avatar-agent` is
// reserved for the avatar).
AgentIdentity *string `json:"agentIdentity,omitempty"`
// LivekitToken A LiveKit access token for the avatar participant, minted with your
// project's API key and secret: the avatar's `identity` (the plugin
// uses `atmee-avatar-agent`), `kind: agent`, a `roomJoin` grant for
// your room, and the attribute `lk.publish_on_behalf` set to your
// agent's identity. It is read, never verified. Omit it with
// `livekitUrl` for an Atmee-hosted room.
LivekitToken *string `json:"livekitToken,omitempty"`
// LivekitUrl Your LiveKit server URL (`wss://<project>.livekit.cloud`, or a
// self-hosted `ws(s)://` address). Omit together with `livekitToken`
// for an Atmee-hosted room.
//
//
// Examples: wss://my-project-abc123.livekit.cloud
LivekitUrl *string `json:"livekitUrl,omitempty"`
// MaxDurationSeconds The session's hard limit in seconds (default 3600), and the most it
// can bill if its end is never reported. Capped by the key's limits.
MaxDurationSeconds *int `json:"maxDurationSeconds,omitempty"`
// Metadata Optional free-form metadata to attach to the session.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
}
AvatarSessionCreateRequest defines model for AvatarSessionCreateRequest.
type AvatarSessionCreateResponse ¶
type AvatarSessionCreateResponse struct {
// AgentIdentity The agent the avatar renders for (the token's `lk.publish_on_behalf`, or the hosted room's agent).
AgentIdentity string `json:"agentIdentity"`
// AgentToken Atmee-hosted room only: the access token your agent joins the room
// with (identity `agentIdentity`, publish, subscribe and data). Valid
// for the session's ceiling plus the join timeout; treat it as a
// secret.
AgentToken *string `json:"agentToken,omitempty"`
// AvatarParticipantIdentity The identity the avatar joins the room with (from your token; `atmee-avatar-agent` in a hosted room).
AvatarParticipantIdentity string `json:"avatarParticipantIdentity"`
BillingMode AvatarSessionCreateResponseBillingMode `json:"billingMode"`
// LivekitUrl Atmee-hosted room only: the LiveKit server (`wss://...`) your agent
// joins.
LivekitUrl *string `json:"livekitUrl,omitempty"`
// MaxDurationSeconds The hard ceiling applied to this session.
MaxDurationSeconds int `json:"maxDurationSeconds"`
// RoomName The room, as granted by your token or created by Atmee.
RoomName string `json:"roomName"`
SessionId openapi_types.UUID `json:"sessionId"`
// Status How far the start had progressed when this response was sent.
Status AvatarSessionCreateResponseStatus `json:"status"`
}
AvatarSessionCreateResponse defines model for AvatarSessionCreateResponse.
type AvatarSessionCreateResponseBillingMode ¶
type AvatarSessionCreateResponseBillingMode string
AvatarSessionCreateResponseBillingMode defines model for AvatarSessionCreateResponse.BillingMode.
const ( AvatarSessionCreateResponseBillingModeMetered AvatarSessionCreateResponseBillingMode = "metered" AvatarSessionCreateResponseBillingModeReserve AvatarSessionCreateResponseBillingMode = "reserve" )
Defines values for AvatarSessionCreateResponseBillingMode.
func (AvatarSessionCreateResponseBillingMode) Valid ¶
func (e AvatarSessionCreateResponseBillingMode) Valid() bool
Valid indicates whether the value is a known member of the AvatarSessionCreateResponseBillingMode enum.
type AvatarSessionCreateResponseStatus ¶
type AvatarSessionCreateResponseStatus string
AvatarSessionCreateResponseStatus How far the start had progressed when this response was sent.
const ( AvatarSessionCreateResponseStatusAvatarJoined AvatarSessionCreateResponseStatus = "avatar_joined" AvatarSessionCreateResponseStatusInitializing AvatarSessionCreateResponseStatus = "initializing" )
Defines values for AvatarSessionCreateResponseStatus.
func (AvatarSessionCreateResponseStatus) Valid ¶
func (e AvatarSessionCreateResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the AvatarSessionCreateResponseStatus enum.
type AvatarSessionEndResponse ¶
type AvatarSessionEndResponse struct {
// AlreadyEnded True when the session was already terminal before this call.
AlreadyEnded bool `json:"alreadyEnded"`
// EndReason Why the session ended: `ended_by_api` for this call, or the
// earlier reason when it had already ended (see
// AvatarSessionStatusResponse.endReason).
EndReason *string `json:"endReason,omitempty"`
EndedAt *time.Time `json:"endedAt,omitempty"`
SessionId openapi_types.UUID `json:"sessionId"`
Status AvatarSessionEndResponseStatus `json:"status"`
}
AvatarSessionEndResponse defines model for AvatarSessionEndResponse.
type AvatarSessionEndResponseStatus ¶
type AvatarSessionEndResponseStatus string
AvatarSessionEndResponseStatus defines model for AvatarSessionEndResponse.Status.
const ( AvatarSessionEndResponseStatusCompleted AvatarSessionEndResponseStatus = "completed" AvatarSessionEndResponseStatusFailed AvatarSessionEndResponseStatus = "failed" )
Defines values for AvatarSessionEndResponseStatus.
func (AvatarSessionEndResponseStatus) Valid ¶
func (e AvatarSessionEndResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the AvatarSessionEndResponseStatus enum.
type AvatarSessionIdPath ¶
type AvatarSessionIdPath = openapi_types.UUID
AvatarSessionIdPath defines model for AvatarSessionIdPath.
type AvatarSessionStatusResponse ¶
type AvatarSessionStatusResponse struct {
// AgentJoinedAt When your agent was seen in the room; billing starts here.
AgentJoinedAt *time.Time `json:"agentJoinedAt,omitempty"`
AvatarJoinedAt *time.Time `json:"avatarJoinedAt,omitempty"`
// BilledSeconds Seconds billed (the time both parties were in the room); null while
// it is live, or when the settlement cannot be read.
BilledSeconds *int `json:"billedSeconds,omitempty"`
BillingMode *AvatarSessionStatusResponseBillingMode `json:"billingMode,omitempty"`
// ChargedMicrocredits What the session cost once it ended, in microcredits (100 = 1
// credit), from the account's balance and the avatar's sponsor pool;
// null while it is live, or when the settlement cannot be read.
ChargedMicrocredits *int `json:"chargedMicrocredits,omitempty"`
// EndReason Why the session ended; null while it is live. `user_left` the
// visitor left; `agent_left` your agent left (render); `avatar_ended`
// the avatar ended the call; `avatar_removed` you removed the avatar
// participant (render); `max_duration` the granted length ran out;
// `ended_by_api` you ended it; `room_closed` the room closed;
// `balance_exhausted` a metered session ran out of credits or hit
// the key's spend cap; `no_user_joined` nobody joined within the
// join window (60 s after the avatar); `avatar_did_not_join` the
// avatar never joined; `error` anything else (see `failureCode`).
EndReason *AvatarSessionStatusResponseEndReason `json:"endReason,omitempty"`
EndedAt *time.Time `json:"endedAt,omitempty"`
// FailureCode The failure code of a `failed` session (e.g. `USER_DID_NOT_JOIN`, `AVATAR_DID_NOT_JOIN`); null otherwise.
FailureCode *string `json:"failureCode,omitempty"`
// Kind `conversation` (`POST /v1/sessions`) or `render` (`POST
// /v1/avatar_sessions`).
Kind *AvatarSessionStatusResponseKind `json:"kind,omitempty"`
SessionId openapi_types.UUID `json:"sessionId"`
// Status `pending` starting, `active` live, `completed` ran and ended
// normally (including an end you asked for), `failed` never really
// started (see `endReason` and `failureCode`).
Status AvatarSessionStatusResponseStatus `json:"status"`
// UserJoinedAt When the visitor (a conversation) or your agent (a render) joined;
// null when nobody did. Billing runs from the later of this and
// `avatarJoinedAt`.
UserJoinedAt *time.Time `json:"userJoinedAt,omitempty"`
}
AvatarSessionStatusResponse defines model for AvatarSessionStatusResponse.
type AvatarSessionStatusResponseBillingMode ¶
type AvatarSessionStatusResponseBillingMode string
AvatarSessionStatusResponseBillingMode defines model for AvatarSessionStatusResponse.BillingMode.
const ( AvatarSessionStatusResponseBillingModeMetered AvatarSessionStatusResponseBillingMode = "metered" AvatarSessionStatusResponseBillingModeReserve AvatarSessionStatusResponseBillingMode = "reserve" )
Defines values for AvatarSessionStatusResponseBillingMode.
func (AvatarSessionStatusResponseBillingMode) Valid ¶
func (e AvatarSessionStatusResponseBillingMode) Valid() bool
Valid indicates whether the value is a known member of the AvatarSessionStatusResponseBillingMode enum.
type AvatarSessionStatusResponseEndReason ¶
type AvatarSessionStatusResponseEndReason string
AvatarSessionStatusResponseEndReason Why the session ended; null while it is live. `user_left` the visitor left; `agent_left` your agent left (render); `avatar_ended` the avatar ended the call; `avatar_removed` you removed the avatar participant (render); `max_duration` the granted length ran out; `ended_by_api` you ended it; `room_closed` the room closed; `balance_exhausted` a metered session ran out of credits or hit the key's spend cap; `no_user_joined` nobody joined within the join window (60 s after the avatar); `avatar_did_not_join` the avatar never joined; `error` anything else (see `failureCode`).
const ( AgentLeft AvatarSessionStatusResponseEndReason = "agent_left" AvatarDidNotJoin AvatarSessionStatusResponseEndReason = "avatar_did_not_join" AvatarEnded AvatarSessionStatusResponseEndReason = "avatar_ended" AvatarRemoved AvatarSessionStatusResponseEndReason = "avatar_removed" BalanceExhausted AvatarSessionStatusResponseEndReason = "balance_exhausted" EndedByApi AvatarSessionStatusResponseEndReason = "ended_by_api" Error AvatarSessionStatusResponseEndReason = "error" MaxDuration AvatarSessionStatusResponseEndReason = "max_duration" NoUserJoined AvatarSessionStatusResponseEndReason = "no_user_joined" RoomClosed AvatarSessionStatusResponseEndReason = "room_closed" UserLeft AvatarSessionStatusResponseEndReason = "user_left" )
Defines values for AvatarSessionStatusResponseEndReason.
func (AvatarSessionStatusResponseEndReason) Valid ¶
func (e AvatarSessionStatusResponseEndReason) Valid() bool
Valid indicates whether the value is a known member of the AvatarSessionStatusResponseEndReason enum.
type AvatarSessionStatusResponseKind ¶
type AvatarSessionStatusResponseKind string
AvatarSessionStatusResponseKind `conversation` (`POST /v1/sessions`) or `render` (`POST /v1/avatar_sessions`).
const ( Conversation AvatarSessionStatusResponseKind = "conversation" Render AvatarSessionStatusResponseKind = "render" )
Defines values for AvatarSessionStatusResponseKind.
func (AvatarSessionStatusResponseKind) Valid ¶
func (e AvatarSessionStatusResponseKind) Valid() bool
Valid indicates whether the value is a known member of the AvatarSessionStatusResponseKind enum.
type AvatarSessionStatusResponseStatus ¶
type AvatarSessionStatusResponseStatus string
AvatarSessionStatusResponseStatus `pending` starting, `active` live, `completed` ran and ended normally (including an end you asked for), `failed` never really started (see `endReason` and `failureCode`).
const ( AvatarSessionStatusResponseStatusActive AvatarSessionStatusResponseStatus = "active" AvatarSessionStatusResponseStatusCompleted AvatarSessionStatusResponseStatus = "completed" AvatarSessionStatusResponseStatusFailed AvatarSessionStatusResponseStatus = "failed" AvatarSessionStatusResponseStatusPending AvatarSessionStatusResponseStatus = "pending" )
Defines values for AvatarSessionStatusResponseStatus.
func (AvatarSessionStatusResponseStatus) Valid ¶
func (e AvatarSessionStatusResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the AvatarSessionStatusResponseStatus enum.
type AvatarShareSocialLinks ¶
type AvatarShareSocialLinks = []struct {
Type AvatarShareSocialLinksType `json:"type"`
// Url An https URL; null or `""` is no link.
Url *string `json:"url,omitempty"`
}
AvatarShareSocialLinks The avatar's social links, the whole set (`[]` removes them all); a platform left out has no link.
type AvatarShareSocialLinksType ¶
type AvatarShareSocialLinksType string
AvatarShareSocialLinksType defines model for AvatarShareSocialLinks.Type.
const ( Facebook AvatarShareSocialLinksType = "facebook" Instagram AvatarShareSocialLinksType = "instagram" Tiktok AvatarShareSocialLinksType = "tiktok" Twitter AvatarShareSocialLinksType = "twitter" Youtube AvatarShareSocialLinksType = "youtube" )
Defines values for AvatarShareSocialLinksType.
func (AvatarShareSocialLinksType) Valid ¶
func (e AvatarShareSocialLinksType) Valid() bool
Valid indicates whether the value is a known member of the AvatarShareSocialLinksType enum.
type AvatarShareSubtitle ¶
type AvatarShareSubtitle = string
AvatarShareSubtitle The line under the title on Explore; `""` clears it.
type AvatarShareTags ¶
type AvatarShareTags = []string
AvatarShareTags The avatar's tags, the whole set (`[]` clears them); at most 5 once trimmed and with case-insensitive duplicates dropped.
type AvatarShareTitle ¶
type AvatarShareTitle = string
AvatarShareTitle The display title on Explore (Creator Studio's share card); `""` clears it, and the card shows the preferred alias, then the name.
type AvatarSocialLink ¶
AvatarSocialLink defines model for AvatarSocialLink.
type AvatarSourceFile ¶
type AvatarSourceFile struct {
// ExpiresAt When the URL stops working; GET again for a fresh one.
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
// Url A presigned download URL of the file last given; null when none was given or it could not be signed.
Url *string `json:"url,omitempty"`
}
AvatarSourceFile defines model for AvatarSourceFile.
type AvatarSponsor ¶
type AvatarSponsor struct {
Balance struct {
// CouponSourcedMicrocredits Credits granted from the account's coupon bucket.
CouponSourcedMicrocredits int `json:"couponSourcedMicrocredits"`
PlanSourcedMicrocredits int `json:"planSourcedMicrocredits"`
TopupSourcedMicrocredits int `json:"topupSourcedMicrocredits"`
// TotalMicrocredits planSourced + topupSourced + couponSourced.
TotalMicrocredits int `json:"totalMicrocredits"`
} `json:"balance"`
Settings struct {
AnonymousAccess *bool `json:"anonymousAccess,omitempty"`
AnonymousDailySecondsPerVisitor *int `json:"anonymousDailySecondsPerVisitor,omitempty"`
AutoTopupAmountMicrocredits *int `json:"autoTopupAmountMicrocredits,omitempty"`
AutoTopupEnabled *bool `json:"autoTopupEnabled,omitempty"`
AutoTopupThresholdMicrocredits *int `json:"autoTopupThresholdMicrocredits,omitempty"`
ExhaustedBehavior *AvatarSponsorSettingsExhaustedBehavior `json:"exhaustedBehavior,omitempty"`
MaxPerSessionMicrocredits *int `json:"maxPerSessionMicrocredits,omitempty"`
} `json:"settings"`
}
AvatarSponsor defines model for AvatarSponsor.
type AvatarSponsorPatch ¶
type AvatarSponsorPatch struct {
AnonymousAccess *bool `json:"anonymousAccess,omitempty"`
// AnonymousDailySecondsPerVisitor null clears the per-visitor daily cap.
AnonymousDailySecondsPerVisitor *int `json:"anonymousDailySecondsPerVisitor,omitempty"`
AutoTopupAmountMicrocredits *int `json:"autoTopupAmountMicrocredits,omitempty"`
AutoTopupEnabled *bool `json:"autoTopupEnabled,omitempty"`
AutoTopupThresholdMicrocredits *int `json:"autoTopupThresholdMicrocredits,omitempty"`
ExhaustedBehavior *AvatarSponsorPatchExhaustedBehavior `json:"exhaustedBehavior,omitempty"`
// MaxPerSessionMicrocredits null clears the cap.
MaxPerSessionMicrocredits *int `json:"maxPerSessionMicrocredits,omitempty"`
}
AvatarSponsorPatch defines model for AvatarSponsorPatch.
type AvatarSponsorPatchExhaustedBehavior ¶
type AvatarSponsorPatchExhaustedBehavior string
AvatarSponsorPatchExhaustedBehavior defines model for AvatarSponsorPatch.ExhaustedBehavior.
const ( AvatarSponsorPatchExhaustedBehaviorPause AvatarSponsorPatchExhaustedBehavior = "pause" AvatarSponsorPatchExhaustedBehaviorSpendBalance AvatarSponsorPatchExhaustedBehavior = "spend_balance" )
Defines values for AvatarSponsorPatchExhaustedBehavior.
func (AvatarSponsorPatchExhaustedBehavior) Valid ¶
func (e AvatarSponsorPatchExhaustedBehavior) Valid() bool
Valid indicates whether the value is a known member of the AvatarSponsorPatchExhaustedBehavior enum.
type AvatarSponsorSettingsExhaustedBehavior ¶
type AvatarSponsorSettingsExhaustedBehavior string
AvatarSponsorSettingsExhaustedBehavior defines model for AvatarSponsor.Settings.ExhaustedBehavior.
const ( AvatarSponsorSettingsExhaustedBehaviorPause AvatarSponsorSettingsExhaustedBehavior = "pause" AvatarSponsorSettingsExhaustedBehaviorSpendBalance AvatarSponsorSettingsExhaustedBehavior = "spend_balance" )
Defines values for AvatarSponsorSettingsExhaustedBehavior.
func (AvatarSponsorSettingsExhaustedBehavior) Valid ¶
func (e AvatarSponsorSettingsExhaustedBehavior) Valid() bool
Valid indicates whether the value is a known member of the AvatarSponsorSettingsExhaustedBehavior enum.
type AvatarStall ¶
type AvatarStall struct {
Reason string `json:"reason"`
// Since The last build activity seen.
Since time.Time `json:"since"`
// Stage The stage that is stuck.
Stage AvatarStallStage `json:"stage"`
}
AvatarStall Present when the build has made no progress for a long time: on a `stalled` avatar, or on a `ready` or held avatar with a stage queued or running for 6 hours (the avatar keeps serving). Never on a `failed` or `awaiting_selection` avatar. For information only.
type AvatarStallStage ¶
type AvatarStallStage string
AvatarStallStage The stage that is stuck.
const ( AvatarStallStageAppearance AvatarStallStage = "appearance" AvatarStallStageKnowledge AvatarStallStage = "knowledge" AvatarStallStagePersona AvatarStallStage = "persona" AvatarStallStagePreviews AvatarStallStage = "previews" AvatarStallStageVoice AvatarStallStage = "voice" )
Defines values for AvatarStallStage.
func (AvatarStallStage) Valid ¶
func (e AvatarStallStage) Valid() bool
Valid indicates whether the value is a known member of the AvatarStallStage enum.
type AvatarStatementType ¶
type AvatarStatementType string
AvatarStatementType Who the avatar depicts (the avatar's creator, someone they represent, or a fictional character); `""` resets it.
const ( Empty AvatarStatementType = "" FictionalVerification AvatarStatementType = "fictional_verification" RepresentativeVerification AvatarStatementType = "representative_verification" SelfVerification AvatarStatementType = "self_verification" )
Defines values for AvatarStatementType.
func (AvatarStatementType) Valid ¶
func (e AvatarStatementType) Valid() bool
Valid indicates whether the value is a known member of the AvatarStatementType enum.
type AvatarStudioChoices ¶
type AvatarStudioChoices struct {
// CreationMethod ai_generated, upload, capture or preset.
CreationMethod *string `json:"creationMethod,omitempty"`
// Scenario The scenario preset.
Scenario *string `json:"scenario,omitempty"`
// VoiceType recording, upload, ai or pre_generated.
VoiceType *string `json:"voiceType,omitempty"`
// WhoAreYou The personality preset.
WhoAreYou *string `json:"whoAreYou,omitempty"`
}
AvatarStudioChoices What was picked in Creator Studio's editor (read only here): how the portrait and the voice were made, and the persona presets the whoPrompt and whatPrompt texts started from. Null when never picked (an API avatar).
type AvatarSummary ¶
type AvatarSummary struct {
CreatedAt time.Time `json:"createdAt"`
// CreationSource Set to api for avatars created through this API.
CreationSource *string `json:"creationSource,omitempty"`
// Engine Render engine: `v1`, the original renderer, or `v2`, which serves a
// selected candidate (see `GET /v1/avatars/{avatarId}/candidates`).
Engine *AvatarEngine `json:"engine,omitempty"`
Id openapi_types.UUID `json:"id"`
// Kind `conversational` avatars have a voice and a persona and can run a full
// Atmanity session once built. `render_only` avatars have a portrait only:
// they are ready immediately and render video for an external agent, but
// `readyToChat` stays false until a voice is added via `PUT /voice`.
Kind AvatarKind `json:"kind"`
// Links The avatar's pages on the Atmee website, ready to hand to a person:
// give these rather than building URLs. Absent when this deployment
// does not know the website's address. A private avatar's pages open
// only for its owner, signed in.
Links *AvatarLinks `json:"links,omitempty"`
// MissingInputs The inputs a `draft` still lacks; absent on every other status.
MissingInputs *[]AvatarSummaryMissingInputs `json:"missingInputs,omitempty"`
ModerationState *string `json:"moderationState,omitempty"`
Name string `json:"name"`
// ReadyToChat A session can be started on the avatar now (it serves a finished build). This holds during a moderation hold too, for the owning account only.
ReadyToChat bool `json:"readyToChat"`
// SelectionRequired v2 only. True while a completed candidate waits to be promoted (manual mode).
SelectionRequired *bool `json:"selectionRequired,omitempty"`
// Stall Present when the build has made no progress for a long time: on a
// `stalled` avatar, or on a `ready` or held avatar with a stage queued or
// running for 6 hours (the avatar keeps serving). Never on a `failed` or
// `awaiting_selection` avatar. For information only.
Stall *AvatarStall `json:"stall,omitempty"`
// Status What the avatar is doing now. More values may be added: treat an
// unknown one as `building`.
//
// - `building`: a build step is queued or running.
// - `ready`: it serves a build and `readyToChat` is true. A v2 avatar
// stays `ready` while a newer version builds or waits for a pick
// (`rebuilding`, `selectionRequired`).
// - `awaiting_selection` (v2, manual selection): every take of the
// current version finished and nothing serves yet; select one.
// - `failed`: a stage failed and nothing serves; see `latestFailure`.
// - `moderation_hold`: held for moderation review. Visitors cannot
// open it; the account can still start sessions when `readyToChat`
// is true.
// - `stalled`: the build has made no progress for a long time (`stall`
// says since when, and which stage). It will not finish by waiting:
// replace that stage's input or contact support.
// - `draft`: created without its portrait or voice; `missingInputs`
// names what to add with `PUT /v1/avatars/{avatarId}/appearance` or
// `PUT /v1/avatars/{avatarId}/voice`.
Status AvatarSummaryStatus `json:"status"`
// ThumbnailUrl Presigned image (Studio's custom thumbnail, else the portrait), valid about one hour; re-GET to refresh.
ThumbnailUrl *string `json:"thumbnailUrl,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
Visibility AvatarSummaryVisibility `json:"visibility"`
}
AvatarSummary defines model for AvatarSummary.
type AvatarSummaryMissingInputs ¶
type AvatarSummaryMissingInputs string
AvatarSummaryMissingInputs defines model for AvatarSummary.MissingInputs.
const ( AvatarSummaryMissingInputsImage AvatarSummaryMissingInputs = "image" AvatarSummaryMissingInputsVoice AvatarSummaryMissingInputs = "voice" )
Defines values for AvatarSummaryMissingInputs.
func (AvatarSummaryMissingInputs) Valid ¶
func (e AvatarSummaryMissingInputs) Valid() bool
Valid indicates whether the value is a known member of the AvatarSummaryMissingInputs enum.
type AvatarSummaryStatus ¶
type AvatarSummaryStatus string
AvatarSummaryStatus What the avatar is doing now. More values may be added: treat an unknown one as `building`.
- `building`: a build step is queued or running.
- `ready`: it serves a build and `readyToChat` is true. A v2 avatar stays `ready` while a newer version builds or waits for a pick (`rebuilding`, `selectionRequired`).
- `awaiting_selection` (v2, manual selection): every take of the current version finished and nothing serves yet; select one.
- `failed`: a stage failed and nothing serves; see `latestFailure`.
- `moderation_hold`: held for moderation review. Visitors cannot open it; the account can still start sessions when `readyToChat` is true.
- `stalled`: the build has made no progress for a long time (`stall` says since when, and which stage). It will not finish by waiting: replace that stage's input or contact support.
- `draft`: created without its portrait or voice; `missingInputs` names what to add with `PUT /v1/avatars/{avatarId}/appearance` or `PUT /v1/avatars/{avatarId}/voice`.
const ( AvatarSummaryStatusAwaitingSelection AvatarSummaryStatus = "awaiting_selection" AvatarSummaryStatusBuilding AvatarSummaryStatus = "building" AvatarSummaryStatusDraft AvatarSummaryStatus = "draft" AvatarSummaryStatusFailed AvatarSummaryStatus = "failed" AvatarSummaryStatusModerationHold AvatarSummaryStatus = "moderation_hold" AvatarSummaryStatusReady AvatarSummaryStatus = "ready" AvatarSummaryStatusStalled AvatarSummaryStatus = "stalled" )
Defines values for AvatarSummaryStatus.
func (AvatarSummaryStatus) Valid ¶
func (e AvatarSummaryStatus) Valid() bool
Valid indicates whether the value is a known member of the AvatarSummaryStatus enum.
type AvatarSummaryVisibility ¶
type AvatarSummaryVisibility string
AvatarSummaryVisibility defines model for AvatarSummary.Visibility.
const ( AvatarSummaryVisibilityPrivate AvatarSummaryVisibility = "private" AvatarSummaryVisibilityPublic AvatarSummaryVisibility = "public" AvatarSummaryVisibilityUnlisted AvatarSummaryVisibility = "unlisted" )
Defines values for AvatarSummaryVisibility.
func (AvatarSummaryVisibility) Valid ¶
func (e AvatarSummaryVisibility) Valid() bool
Valid indicates whether the value is a known member of the AvatarSummaryVisibility enum.
type AvatarThumbnailJsonRequest ¶
type AvatarThumbnailJsonRequest struct {
Image AssetRefString `json:"image"`
}
AvatarThumbnailJsonRequest defines model for AvatarThumbnailJsonRequest.
type AvatarUpdateRequest ¶
type AvatarUpdateRequest struct {
// AspectRatio A v2 avatar's shape, which picks its frame size: `square` 512 x 512
// (the default), `portrait` 384 x 640, `landscape` 640 x 384. The
// sizes follow the renderer and may change; the names do not. Send it
// or `resolution`, not both (`400`). On an avatar it is a build input,
// like `resolution`: a change on PATCH builds a new version.
AspectRatio *AspectRatio `json:"aspectRatio,omitempty"`
// BlackoutRecovery Blackout recovery of the v2 renderer. While the avatar listens, it
// screens each generated chunk for a fade to black (or fully black
// frames) and shows a healthy listening clip in place of a failed one,
// returning to live frames on the first healthy chunk. On by default.
// Send only the settings to change; an absent or null one keeps its
// current value (on create: its default). Ignored for v1 avatars (the
// setting exists only on the v2 renderer): nothing is stored and the
// rest of the request behaves as without it. It changes how sessions
// render, never the avatar's build: no candidate is captured or
// cancelled. A change applies from the next session.
BlackoutRecovery *BlackoutRecovery `json:"blackoutRecovery,omitempty"`
ConversationalHabits *map[string]AvatarUpdateRequestConversationalHabits `json:"conversationalHabits,omitempty"`
Description *string `json:"description,omitempty"`
Greeting *string `json:"greeting,omitempty"`
Guardrails *[]string `json:"guardrails,omitempty"`
Knowledge *struct {
Facts *string `json:"facts,omitempty"`
Questionnaire *map[string]string `json:"questionnaire,omitempty"`
} `json:"knowledge,omitempty"`
KnownAliases *[]string `json:"knownAliases,omitempty"`
Language *AvatarUpdateRequestLanguage `json:"language,omitempty"`
// Monetization Turn monetization on or off, as Creator Studio's switch does.
Monetization *AvatarMonetizationEdit `json:"monetization,omitempty"`
Name *string `json:"name,omitempty"`
Persona *AvatarPersonaEdit `json:"persona,omitempty"`
// Personality The main character description (who the avatar is).
Personality *string `json:"personality,omitempty"`
PreferredAlias *string `json:"preferredAlias,omitempty"`
PreviewMessage *string `json:"previewMessage,omitempty"`
// Previews Turn preview clip generation on (`true`) for an avatar created
// without it -- the preview stages then build and `previewUrls`
// appear on GET once finished -- or off (`false`) to stop
// rebuilding them. Omit to leave it unchanged.
Previews *bool `json:"previews,omitempty"`
// Resolution A frame size in pixels for the v2 renderer, or send `aspectRatio`
// to pick one by shape: width and height are each
// a multiple of 32 from 256 to 1024, and width x height is at most
// 262,144 (512 x 512); a larger frame is `400 invalid_manifest`.
// Default 512 x 512 (square). The aspect ratios' sizes: square
// 512 x 512, portrait 384 x 640, landscape 640 x 384. A deployment
// offers only some sizes (512 x 512 always;
// `GET /v1/account` `pricing.generation.clipResolutions` lists them
// where clips are offered): another is `400 invalid_input` ("resolution
// WxH is not offered; offered: ..."). On an avatar it is a build input of v2 avatars only
// (`400 invalid_input` for a v1 avatar): the portrait is preprocessed
// at that size, so a change on PATCH builds a new version with new
// candidates, like a new portrait; sending the current size again
// builds nothing. Absent or null keeps the current size (on create:
// the default).
Resolution *RenderResolution `json:"resolution,omitempty"`
// RuntimeSeed The v2 renderer's runtime seed: it seeds a session's noise and motion
// after the first chunk, so another seed gives the same avatar
// different movement; the serving candidate stays the same. Default 42
// (the renderer default; send 42 to go back to it). Absent or null
// keeps the current value (on create: the default). Ignored for v1
// avatars: nothing is stored and the rest of the request behaves as
// without it. It is no build input: nothing is captured or rebuilt,
// and a change applies from the next session.
RuntimeSeed *RuntimeSeed `json:"runtimeSeed,omitempty"`
// Scenario What the avatar is doing with the visitor.
Scenario *string `json:"scenario,omitempty"`
SelfIntroduction *string `json:"selfIntroduction,omitempty"`
// SocialLinks The avatar's social links, the whole set (`[]` removes them all); a platform left out has no link.
SocialLinks *AvatarShareSocialLinks `json:"socialLinks,omitempty"`
SpokenName *string `json:"spokenName,omitempty"`
// StatementType Who the avatar depicts (the avatar's creator, someone they represent, or a fictional character); `""` resets it.
StatementType *AvatarStatementType `json:"statementType,omitempty"`
// Subtitle The line under the title on Explore; `""` clears it.
Subtitle *AvatarShareSubtitle `json:"subtitle,omitempty"`
// Tags The avatar's tags, the whole set (`[]` clears them); at most 5 once trimmed and with case-insensitive duplicates dropped.
Tags *AvatarShareTags `json:"tags,omitempty"`
// Title The display title on Explore (Creator Studio's share card); `""` clears it, and the card shows the preferred alias, then the name.
Title *AvatarShareTitle `json:"title,omitempty"`
Visibility *AvatarUpdateRequestVisibility `json:"visibility,omitempty"`
WhatPrompt *string `json:"whatPrompt,omitempty"`
WhoPrompt *string `json:"whoPrompt,omitempty"`
}
AvatarUpdateRequest defines model for AvatarUpdateRequest.
type AvatarUpdateRequestConversationalHabits ¶
type AvatarUpdateRequestConversationalHabits string
AvatarUpdateRequestConversationalHabits defines model for AvatarUpdateRequest.ConversationalHabits.
const ( AvatarUpdateRequestConversationalHabitsCONVERSATIONALHABITSCALEHIGH AvatarUpdateRequestConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_HIGH" AvatarUpdateRequestConversationalHabitsCONVERSATIONALHABITSCALELOW AvatarUpdateRequestConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_LOW" AvatarUpdateRequestConversationalHabitsCONVERSATIONALHABITSCALEMEDIUM AvatarUpdateRequestConversationalHabits = "CONVERSATIONAL_HABIT_SCALE_MEDIUM" )
Defines values for AvatarUpdateRequestConversationalHabits.
func (AvatarUpdateRequestConversationalHabits) Valid ¶
func (e AvatarUpdateRequestConversationalHabits) Valid() bool
Valid indicates whether the value is a known member of the AvatarUpdateRequestConversationalHabits enum.
type AvatarUpdateRequestLanguage ¶
type AvatarUpdateRequestLanguage string
AvatarUpdateRequestLanguage defines model for AvatarUpdateRequest.Language.
const ( AvatarUpdateRequestLanguageDe AvatarUpdateRequestLanguage = "de" AvatarUpdateRequestLanguageEn AvatarUpdateRequestLanguage = "en" AvatarUpdateRequestLanguageEs AvatarUpdateRequestLanguage = "es" AvatarUpdateRequestLanguageFr AvatarUpdateRequestLanguage = "fr" AvatarUpdateRequestLanguageHi AvatarUpdateRequestLanguage = "hi" AvatarUpdateRequestLanguageJa AvatarUpdateRequestLanguage = "ja" AvatarUpdateRequestLanguageKo AvatarUpdateRequestLanguage = "ko" AvatarUpdateRequestLanguageRu AvatarUpdateRequestLanguage = "ru" AvatarUpdateRequestLanguageVi AvatarUpdateRequestLanguage = "vi" AvatarUpdateRequestLanguageZhCN AvatarUpdateRequestLanguage = "zh-CN" AvatarUpdateRequestLanguageZhTW AvatarUpdateRequestLanguage = "zh-TW" )
Defines values for AvatarUpdateRequestLanguage.
func (AvatarUpdateRequestLanguage) Valid ¶
func (e AvatarUpdateRequestLanguage) Valid() bool
Valid indicates whether the value is a known member of the AvatarUpdateRequestLanguage enum.
type AvatarUpdateRequestVisibility ¶
type AvatarUpdateRequestVisibility string
AvatarUpdateRequestVisibility defines model for AvatarUpdateRequest.Visibility.
const ( AvatarUpdateRequestVisibilityPrivate AvatarUpdateRequestVisibility = "private" AvatarUpdateRequestVisibilityPublic AvatarUpdateRequestVisibility = "public" AvatarUpdateRequestVisibilityUnlisted AvatarUpdateRequestVisibility = "unlisted" )
Defines values for AvatarUpdateRequestVisibility.
func (AvatarUpdateRequestVisibility) Valid ¶
func (e AvatarUpdateRequestVisibility) Valid() bool
Valid indicates whether the value is a known member of the AvatarUpdateRequestVisibility enum.
type AvatarVoice ¶
type AvatarVoice struct {
// ExpiresAt When the URL stops working; GET again for a fresh one.
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
TtsProvider *TtsProvider `json:"ttsProvider,omitempty"`
// Url A presigned download URL of the file last given; null when none was given or it could not be signed.
Url *string `json:"url,omitempty"`
}
AvatarVoice defines model for AvatarVoice.
type AvatarVoiceJsonRequest ¶
type AvatarVoiceJsonRequest struct {
Voice AssetRefString `json:"voice"`
}
AvatarVoiceJsonRequest defines model for AvatarVoiceJsonRequest.
type AvatarVoiceSettings ¶
type AvatarVoiceSettings struct {
TtsProvider *TtsProvider `json:"ttsProvider,omitempty"`
}
AvatarVoiceSettings defines model for AvatarVoiceSettings.
type BlackoutRecovery ¶
type BlackoutRecovery struct {
// Detection How a fade is detected. `tiles` (default, recommended) compares an
// 8x8 grid of tiles over the whole frame with the recent healthy
// frames and fires when three quarters of the lit tiles darken
// together; dark hair, fur or clothes do not set it off. `regions`
// compares four fixed boxes (face, chest, two torso boxes) and
// fires when two of them darken together. `both` runs the two and
// fires when either does.
Detection *BlackoutRecoveryDetection `json:"detection,omitempty"`
// Enabled Turn recovery on or off. Default true.
Enabled *bool `json:"enabled,omitempty"`
// RegionThreshold The region screen's threshold (`regions`, `both`), read the same
// way. Strictly between 0 and 1; default 0.20.
RegionThreshold *float64 `json:"regionThreshold,omitempty"`
// TileThreshold The tile screen's threshold (`tiles`, `both`): how far, as a
// fraction of the reference brightness, the tiles must darken for
// three frames in a row before a chunk counts as fading. Lower is
// more sensitive (catches shallower fades, and more false alarms).
// Strictly between 0 and 1; default 0.40.
TileThreshold *float64 `json:"tileThreshold,omitempty"`
}
BlackoutRecovery Blackout recovery of the v2 renderer. While the avatar listens, it screens each generated chunk for a fade to black (or fully black frames) and shows a healthy listening clip in place of a failed one, returning to live frames on the first healthy chunk. On by default. Send only the settings to change; an absent or null one keeps its current value (on create: its default). Ignored for v1 avatars (the setting exists only on the v2 renderer): nothing is stored and the rest of the request behaves as without it. It changes how sessions render, never the avatar's build: no candidate is captured or cancelled. A change applies from the next session.
type BlackoutRecoveryDetection ¶
type BlackoutRecoveryDetection string
BlackoutRecoveryDetection How a fade is detected. `tiles` (default, recommended) compares an 8x8 grid of tiles over the whole frame with the recent healthy frames and fires when three quarters of the lit tiles darken together; dark hair, fur or clothes do not set it off. `regions` compares four fixed boxes (face, chest, two torso boxes) and fires when two of them darken together. `both` runs the two and fires when either does.
const ( BlackoutRecoveryDetectionBoth BlackoutRecoveryDetection = "both" BlackoutRecoveryDetectionRegions BlackoutRecoveryDetection = "regions" BlackoutRecoveryDetectionTiles BlackoutRecoveryDetection = "tiles" )
Defines values for BlackoutRecoveryDetection.
func (BlackoutRecoveryDetection) Valid ¶
func (e BlackoutRecoveryDetection) Valid() bool
Valid indicates whether the value is a known member of the BlackoutRecoveryDetection enum.
type BlackoutRecoveryEffective ¶
type BlackoutRecoveryEffective struct {
Detection BlackoutRecoveryEffectiveDetection `json:"detection"`
Enabled bool `json:"enabled"`
RegionThreshold float64 `json:"regionThreshold"`
TileThreshold float64 `json:"tileThreshold"`
}
BlackoutRecoveryEffective defines model for BlackoutRecoveryEffective.
type BlackoutRecoveryEffectiveDetection ¶
type BlackoutRecoveryEffectiveDetection string
BlackoutRecoveryEffectiveDetection defines model for BlackoutRecoveryEffective.Detection.
const ( BlackoutRecoveryEffectiveDetectionBoth BlackoutRecoveryEffectiveDetection = "both" BlackoutRecoveryEffectiveDetectionRegions BlackoutRecoveryEffectiveDetection = "regions" BlackoutRecoveryEffectiveDetectionTiles BlackoutRecoveryEffectiveDetection = "tiles" )
Defines values for BlackoutRecoveryEffectiveDetection.
func (BlackoutRecoveryEffectiveDetection) Valid ¶
func (e BlackoutRecoveryEffectiveDetection) Valid() bool
Valid indicates whether the value is a known member of the BlackoutRecoveryEffectiveDetection enum.
type BuildStage ¶
type BuildStage struct {
Status BuildStageStatus `json:"status"`
UserFeedback *string `json:"userFeedback,omitempty"`
}
BuildStage One build stage. On failure, `userFeedback` is a message you can show as is. `waiting`: blocked on an earlier stage. `pending`: queued. `processing`: running. `skipped`: the `previews` stage when preview clips are off (the default for API-created avatars), or a stage a render-only avatar does not have. Each stage reports its own step, so a later stage can read `completed` from an earlier build while an earlier stage rebuilds.
type BuildStageStatus ¶
type BuildStageStatus string
BuildStageStatus defines model for BuildStage.Status.
const ( BuildStageStatusCompleted BuildStageStatus = "completed" BuildStageStatusFailed BuildStageStatus = "failed" BuildStageStatusPending BuildStageStatus = "pending" BuildStageStatusProcessing BuildStageStatus = "processing" BuildStageStatusSkipped BuildStageStatus = "skipped" BuildStageStatusWaiting BuildStageStatus = "waiting" )
Defines values for BuildStageStatus.
func (BuildStageStatus) Valid ¶
func (e BuildStageStatus) Valid() bool
Valid indicates whether the value is a known member of the BuildStageStatus enum.
type Candidate ¶
type Candidate struct {
CandidateId openapi_types.UUID `json:"candidateId"`
CreatedAt time.Time `json:"createdAt"`
// Current The take belongs to the current version.
Current *bool `json:"current,omitempty"`
// Generation The capture request round the take came from (informational). Use `versionId` and `current` to tell versions apart.
Generation int `json:"generation"`
PreviewExpiresAt *time.Time `json:"previewExpiresAt,omitempty"`
// PreviewUrl Presigned ~3 s talking preview (mp4), valid about one hour. Present once completed.
PreviewUrl *string `json:"previewUrl,omitempty"`
// Restorable A completed take of an older version whose stored files (portrait, voice sample, voice clone, prime, bundle, sink) are all still there. Selecting it goes back to that version (see `PUT /selected_candidate`).
Restorable *bool `json:"restorable,omitempty"`
// Seed Informational only; the same seed does not reproduce a capture.
Seed int64 `json:"seed"`
// Serving True for the candidate the avatar renders with.
Serving bool `json:"serving"`
// Status `pending` queued, `processing` being captured, `completed` ready to
// compare and select, `failed` the capture failed (`userFeedback`
// says why), `superseded` an older version's take that was never
// finished because the portrait, voice or preview message changed.
// A completed take of an older version stays `completed`, with
// `current: false` and `restorable: true`.
Status CandidateStatus `json:"status"`
UserFeedback *string `json:"userFeedback,omitempty"`
// VersionId The version (portrait, voice sample and preview message) the take was captured for; see `versions`.
VersionId *string `json:"versionId,omitempty"`
}
Candidate defines model for Candidate.
type CandidateCreateRequest ¶
type CandidateCreateRequest struct {
Count int `json:"count"`
}
CandidateCreateRequest defines model for CandidateCreateRequest.
type CandidateListResponse ¶
type CandidateListResponse struct {
// Generation The generation of the current version's takes (informational).
Generation int `json:"generation"`
Items []Candidate `json:"items"`
// Rebuilding A candidate serves while a newer version is still being built.
Rebuilding bool `json:"rebuilding"`
SeedSelection CandidateListResponseSeedSelection `json:"seedSelection"`
// SelectedCandidateId The picked candidate. The avatar serves it once its config is built, a few seconds after the pick.
SelectedCandidateId *openapi_types.UUID `json:"selectedCandidateId,omitempty"`
// SelectionRequired Manual mode and a completed candidate of the current version is waiting to be promoted.
SelectionRequired bool `json:"selectionRequired"`
ServingCandidateId *openapi_types.UUID `json:"servingCandidateId,omitempty"`
// Versions Every version, oldest first.
Versions *[]CandidateVersion `json:"versions,omitempty"`
// Warning Set when many candidates have been tried for one image and voice pair; usually the pair itself does not work.
Warning *string `json:"warning,omitempty"`
}
CandidateListResponse defines model for CandidateListResponse.
type CandidateListResponseSeedSelection ¶
type CandidateListResponseSeedSelection string
CandidateListResponseSeedSelection defines model for CandidateListResponse.SeedSelection.
const ( CandidateListResponseSeedSelectionAuto CandidateListResponseSeedSelection = "auto" CandidateListResponseSeedSelectionManual CandidateListResponseSeedSelection = "manual" )
Defines values for CandidateListResponseSeedSelection.
func (CandidateListResponseSeedSelection) Valid ¶
func (e CandidateListResponseSeedSelection) Valid() bool
Valid indicates whether the value is a known member of the CandidateListResponseSeedSelection enum.
type CandidateSelectRequest ¶
type CandidateSelectRequest struct {
CandidateId openapi_types.UUID `json:"candidateId"`
}
CandidateSelectRequest defines model for CandidateSelectRequest.
type CandidateStatus ¶
type CandidateStatus string
CandidateStatus `pending` queued, `processing` being captured, `completed` ready to compare and select, `failed` the capture failed (`userFeedback` says why), `superseded` an older version's take that was never finished because the portrait, voice or preview message changed. A completed take of an older version stays `completed`, with `current: false` and `restorable: true`.
const ( CandidateStatusCompleted CandidateStatus = "completed" CandidateStatusFailed CandidateStatus = "failed" CandidateStatusPending CandidateStatus = "pending" CandidateStatusProcessing CandidateStatus = "processing" CandidateStatusSuperseded CandidateStatus = "superseded" )
Defines values for CandidateStatus.
func (CandidateStatus) Valid ¶
func (e CandidateStatus) Valid() bool
Valid indicates whether the value is a known member of the CandidateStatus enum.
type CandidateVersion ¶
type CandidateVersion struct {
CreatedAt time.Time `json:"createdAt"`
// Current The avatar's current portrait, voice sample and preview message.
Current bool `json:"current"`
// Language The language of the default sentence, when the version used it.
Language *string `json:"language,omitempty"`
// PortraitUrl Presigned image of the version's portrait, valid about one hour.
PortraitUrl *string `json:"portraitUrl,omitempty"`
// PreviewMessage The preview line its takes speak; null for the default sentence.
PreviewMessage *string `json:"previewMessage,omitempty"`
// Restorable An older version with a completed take whose files are all still there; select that take to go back.
Restorable *bool `json:"restorable,omitempty"`
// Serving The serving take belongs to this version.
Serving bool `json:"serving"`
// Takes How many takes it has (all statuses).
Takes *int `json:"takes,omitempty"`
VersionId string `json:"versionId"`
// VoiceSampleUrl Presigned download of the version's voice sample, valid about one hour.
VoiceSampleUrl *string `json:"voiceSampleUrl,omitempty"`
}
CandidateVersion One set of capture inputs and what going back to it brings back.
type CaptureQuota ¶
CaptureQuota v2 captures queued or running, against the pending cap (as X-RateLimit-* on a v2 create).
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateApiKey ¶
func (c *Client) CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateApiKey Create an API key (signed-in user only); the secret is shown once
Creates a key for the account the user acts for and returns its secret in `apiKey`. **The secret is returned only here** (and by rotate): store it at once, in your backend's secret store or an environment variable, never in a browser or a repository.
Keep keys narrow: give a key only the scopes it needs (`sessions` is always included), bind it to one avatar with `avatarId` when it serves one app, and set its own caps. Omitted caps take the plan's maximum; a value above the plan's is lowered to it. The spend cap defaults to 500 credits (50,000 microcredits) per `spendCapWindow`.
Only a signed-in user may create keys, and only the account's owner or an admin: an API key is answered `403 login_required`.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/api_keys (the `CreateApiKey` operationId).
func (*Client) CreateApiKeyWithBody ¶
func (c *Client) CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateApiKeyWithBody Create an API key (signed-in user only); the secret is shown once
Creates a key for the account the user acts for and returns its secret in `apiKey`. **The secret is returned only here** (and by rotate): store it at once, in your backend's secret store or an environment variable, never in a browser or a repository.
Keep keys narrow: give a key only the scopes it needs (`sessions` is always included), bind it to one avatar with `avatarId` when it serves one app, and set its own caps. Omitted caps take the plan's maximum; a value above the plan's is lowered to it. The spend cap defaults to 500 credits (50,000 microcredits) per `spendCapWindow`.
Only a signed-in user may create keys, and only the account's owner or an admin: an API key is answered `403 login_required`.
Takes any type of body and a specified content type.
Corresponds with POST /v1/api_keys (the `CreateApiKey` operationId).
func (*Client) CreateAvatar ¶
func (c *Client) CreateAvatar(ctx context.Context, body CreateAvatarJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAvatar Create an avatar
Creates an avatar from a portrait, a voice sample, a persona and knowledge. A complete avatar builds in the background (`202`, `status: building`): follow it with `GET /v1/avatars/{avatarId}`.
Send one of three body shapes:
| Body | Content type | Contents | |---|---|---| | Image | `multipart/form-data` | The portrait as the `file` part, plus `name` (and optional `description`). Makes a render-only avatar: `201`, `ready` at once. Add a voice later to make it talk. | | Zip | `multipart/form-data` (`file`) or `application/zip` | `avatar.json` plus `image/`, `voice/`, `prompt/prompt.txt` and `knowledge/`. | | JSON | `application/json` | The manifest, with an `assets` block naming each file by https URL or `upload:<uploadId>`. |
- **Engine**: `engine` is `v1` (default) or `v2`. A v2 create captures `seedPreviews.count` candidates and, with `seedSelection: auto` (default), serves the first that completes. v2 is invite-only (`403 v2_access_required`).
- **Drafts**: the portrait and the voice are optional in zip and JSON bodies. Without either (other than a v1 avatar with a portrait, which is render-only) the avatar is a `draft`, and `missingInputs` names what to add with `PUT /v1/avatars/{avatarId}/appearance` or `PUT /v1/avatars/{avatarId}/voice`.
- **Portrait**: use a front-facing photo of one person, head and shoulders, the face at least a third of the frame, in even light, with the lips slightly parted. A clearly bad portrait fails the `appearance` stage with a `portrait_*` reason.
- **Uploads**: a create that succeeds consumes its uploads; one that fails leaves them usable for a retry.
- **Captures** count against the account's limit of 10 queued or running. A v2 create returns `X-RateLimit-Limit` and `X-RateLimit-Remaining`, and `429 rate_limited` when the captures do not fit.
- **Scopes**: `avatars:write`, plus `billing:write` with a `sponsor` block.
| Manifest field | Rule | |---|---| | `persona` | `whoPrompt` (who the avatar is), `whatPrompt` (what it does with the visitor; in a zip, `prompt/prompt.txt` instead, not both), `preferredAlias`, `spokenName`, `knownAliases`, `greeting`, `selfIntroduction` (derived from `whoPrompt` when absent), `guardrails`, `conversationalHabits`. `personality` and `scenario` are older names of `whoPrompt` and `whatPrompt`; a field under both names is `400 invalid_manifest`. | | `previewMessage` | The line preview clips speak; omit it for a default sentence in the avatar's language. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). | | `previews` | `true` generates preview clips (default off; change it with PATCH). | | `seedPreviews`, `seedSelection` | v2 only, and only with the portrait and the voice: `count` candidates (default 1, at most 10), and `auto` (default) or `manual` selection. | | `knowledge.facts` | The avatar's knowledge as text, at most 32,000 characters (`400 invalid_manifest`). | | `knowledge.questionnaire` | Answers to Creator Studio's knowledge questions (listed by `GET /v1/avatars/{avatarId}/knowledge`), each at most 2,000 characters. | | `knowledge.descriptions` | Maps a knowledge file name to a short description. | | `blackoutRecovery`, `runtimeSeed`, `resolution` | v2 render settings (see their schemas). v1 avatars ignore the first two and refuse `resolution` (`400 invalid_input`). | | `aspectRatio` | v2 only: the avatar's shape, `square` (default, 512 × 512), `portrait` (384 × 640) or `landscape` (640 × 384); see `AspectRatio`. `resolution` names a size this deployment offers instead; send one or the other, not both. v1 avatars refuse it (`400 invalid_input`). |
v2 conversations do not use knowledge yet.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/avatars (the `CreateAvatar` operationId).
func (*Client) CreateAvatarCandidates ¶
func (c *Client) CreateAvatarCandidates(ctx context.Context, avatarId AvatarIdPath, body CreateAvatarCandidatesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAvatarCandidates Capture more candidates
Captures `count` more candidates of a v2 avatar from its current inputs, without preprocessing again. Captures count against the account's limit of 10 queued or running (`X-RateLimit-Limit`, `X-RateLimit-Remaining`).
Takes a body of the `application/json` content type.
Corresponds with POST /v1/avatars/{avatarId}/candidates (the `CreateAvatarCandidates` operationId).
func (*Client) CreateAvatarCandidatesWithBody ¶
func (c *Client) CreateAvatarCandidatesWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAvatarCandidatesWithBody Capture more candidates
Captures `count` more candidates of a v2 avatar from its current inputs, without preprocessing again. Captures count against the account's limit of 10 queued or running (`X-RateLimit-Limit`, `X-RateLimit-Remaining`).
Takes any type of body and a specified content type.
Corresponds with POST /v1/avatars/{avatarId}/candidates (the `CreateAvatarCandidates` operationId).
func (*Client) CreateAvatarSession ¶
func (c *Client) CreateAvatarSession(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, body CreateAvatarSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAvatarSession Render an avatar into your own LiveKit room (API-key authenticated)
Starts an **avatar session**: the avatar is rendered into a LiveKit room that YOU own, on behalf of YOUR agent — the bring-your-own-agent path the `livekit-plugins-atmee` plugin uses. Nothing here creates a room or a conversation: you mint a LiveKit access token for the avatar participant with your own project's API secret (grant `roomJoin` for your room, set the participant attribute `lk.publish_on_behalf` to your agent's identity, and `kind: agent`) and pass it here. The rendering worker joins your room with that token, waits for your agent, receives its audio over the LiveKit data stream (`lk.audio_stream`, 16 kHz PCM — livekit-agents' `DataStreamAudioOutput`) and publishes synced video and audio.
Responds `202` as soon as the worker acknowledged the start (`status: initializing`), typically within a second; the avatar's tracks appear in your room a few seconds later. Pass `?waitFor=avatar_joined` to block until the worker is in the room instead. Billing runs by the minute while the render lasts and stops when the worker reports the end (your agent left, the room closed, you removed the avatar participant), when you call `POST /v1/avatar_sessions/{id}/end`, or at `maxDurationSeconds`.
The token is read, not verified — your secret never leaves you. A token your LiveKit server rejects simply never joins and the session fails as `AVATAR_DID_NOT_JOIN` after the join timeout.
**Atmee-hosted room** (no LiveKit project of your own, e.g. a Pipecat bot on any transport): omit both `livekitUrl` and `livekitToken`. The service then creates a room on Atmee's LiveKit project, the avatar joins it as `atmee-avatar-agent` publishing on behalf of `agentIdentity` (default `agent`), and the response carries `livekitUrl` and `agentToken` for your agent to join that room with. The protocol inside the room is the same: stream your agent's audio to the avatar (`lk.audio_stream`), subscribe to the avatar's video and audio tracks. The room is deleted when the session ends. Requires the `sessions` scope; the avatar must be on the key's allow-list.
**v2 avatars** (invite-only) render on a separate GPU pool: the avatar's own configuration decides, there is nothing to set on the request. That pool scales to zero, so the first v2 session after a quiet period can take a few minutes to start: the service waits up to 4 minutes for the pool to start the render and up to 6 for the avatar to join. Use `?waitFor=avatar_joined` with a client timeout of at least 7 minutes, or retry on `avatar_warming`.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/avatars/{avatarId}/avatar_sessions (the `CreateAvatarSession` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
func (*Client) CreateAvatarSessionWithBody ¶
func (c *Client) CreateAvatarSessionWithBody(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAvatarSessionWithBody Render an avatar into your own LiveKit room (API-key authenticated)
Starts an **avatar session**: the avatar is rendered into a LiveKit room that YOU own, on behalf of YOUR agent — the bring-your-own-agent path the `livekit-plugins-atmee` plugin uses. Nothing here creates a room or a conversation: you mint a LiveKit access token for the avatar participant with your own project's API secret (grant `roomJoin` for your room, set the participant attribute `lk.publish_on_behalf` to your agent's identity, and `kind: agent`) and pass it here. The rendering worker joins your room with that token, waits for your agent, receives its audio over the LiveKit data stream (`lk.audio_stream`, 16 kHz PCM — livekit-agents' `DataStreamAudioOutput`) and publishes synced video and audio.
Responds `202` as soon as the worker acknowledged the start (`status: initializing`), typically within a second; the avatar's tracks appear in your room a few seconds later. Pass `?waitFor=avatar_joined` to block until the worker is in the room instead. Billing runs by the minute while the render lasts and stops when the worker reports the end (your agent left, the room closed, you removed the avatar participant), when you call `POST /v1/avatar_sessions/{id}/end`, or at `maxDurationSeconds`.
The token is read, not verified — your secret never leaves you. A token your LiveKit server rejects simply never joins and the session fails as `AVATAR_DID_NOT_JOIN` after the join timeout.
**Atmee-hosted room** (no LiveKit project of your own, e.g. a Pipecat bot on any transport): omit both `livekitUrl` and `livekitToken`. The service then creates a room on Atmee's LiveKit project, the avatar joins it as `atmee-avatar-agent` publishing on behalf of `agentIdentity` (default `agent`), and the response carries `livekitUrl` and `agentToken` for your agent to join that room with. The protocol inside the room is the same: stream your agent's audio to the avatar (`lk.audio_stream`), subscribe to the avatar's video and audio tracks. The room is deleted when the session ends. Requires the `sessions` scope; the avatar must be on the key's allow-list.
**v2 avatars** (invite-only) render on a separate GPU pool: the avatar's own configuration decides, there is nothing to set on the request. That pool scales to zero, so the first v2 session after a quiet period can take a few minutes to start: the service waits up to 4 minutes for the pool to start the render and up to 6 for the avatar to join. Use `?waitFor=avatar_joined` with a client timeout of at least 7 minutes, or retry on `avatar_warming`.
Takes any type of body and a specified content type.
Corresponds with POST /v1/avatars/{avatarId}/avatar_sessions (the `CreateAvatarSession` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
func (*Client) CreateAvatarWithBody ¶
func (c *Client) CreateAvatarWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAvatarWithBody Create an avatar
Creates an avatar from a portrait, a voice sample, a persona and knowledge. A complete avatar builds in the background (`202`, `status: building`): follow it with `GET /v1/avatars/{avatarId}`.
Send one of three body shapes:
| Body | Content type | Contents | |---|---|---| | Image | `multipart/form-data` | The portrait as the `file` part, plus `name` (and optional `description`). Makes a render-only avatar: `201`, `ready` at once. Add a voice later to make it talk. | | Zip | `multipart/form-data` (`file`) or `application/zip` | `avatar.json` plus `image/`, `voice/`, `prompt/prompt.txt` and `knowledge/`. | | JSON | `application/json` | The manifest, with an `assets` block naming each file by https URL or `upload:<uploadId>`. |
- **Engine**: `engine` is `v1` (default) or `v2`. A v2 create captures `seedPreviews.count` candidates and, with `seedSelection: auto` (default), serves the first that completes. v2 is invite-only (`403 v2_access_required`).
- **Drafts**: the portrait and the voice are optional in zip and JSON bodies. Without either (other than a v1 avatar with a portrait, which is render-only) the avatar is a `draft`, and `missingInputs` names what to add with `PUT /v1/avatars/{avatarId}/appearance` or `PUT /v1/avatars/{avatarId}/voice`.
- **Portrait**: use a front-facing photo of one person, head and shoulders, the face at least a third of the frame, in even light, with the lips slightly parted. A clearly bad portrait fails the `appearance` stage with a `portrait_*` reason.
- **Uploads**: a create that succeeds consumes its uploads; one that fails leaves them usable for a retry.
- **Captures** count against the account's limit of 10 queued or running. A v2 create returns `X-RateLimit-Limit` and `X-RateLimit-Remaining`, and `429 rate_limited` when the captures do not fit.
- **Scopes**: `avatars:write`, plus `billing:write` with a `sponsor` block.
| Manifest field | Rule | |---|---| | `persona` | `whoPrompt` (who the avatar is), `whatPrompt` (what it does with the visitor; in a zip, `prompt/prompt.txt` instead, not both), `preferredAlias`, `spokenName`, `knownAliases`, `greeting`, `selfIntroduction` (derived from `whoPrompt` when absent), `guardrails`, `conversationalHabits`. `personality` and `scenario` are older names of `whoPrompt` and `whatPrompt`; a field under both names is `400 invalid_manifest`. | | `previewMessage` | The line preview clips speak; omit it for a default sentence in the avatar's language. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). | | `previews` | `true` generates preview clips (default off; change it with PATCH). | | `seedPreviews`, `seedSelection` | v2 only, and only with the portrait and the voice: `count` candidates (default 1, at most 10), and `auto` (default) or `manual` selection. | | `knowledge.facts` | The avatar's knowledge as text, at most 32,000 characters (`400 invalid_manifest`). | | `knowledge.questionnaire` | Answers to Creator Studio's knowledge questions (listed by `GET /v1/avatars/{avatarId}/knowledge`), each at most 2,000 characters. | | `knowledge.descriptions` | Maps a knowledge file name to a short description. | | `blackoutRecovery`, `runtimeSeed`, `resolution` | v2 render settings (see their schemas). v1 avatars ignore the first two and refuse `resolution` (`400 invalid_input`). | | `aspectRatio` | v2 only: the avatar's shape, `square` (default, 512 × 512), `portrait` (384 × 640) or `landscape` (640 × 384); see `AspectRatio`. `resolution` names a size this deployment offers instead; send one or the other, not both. v1 avatars refuse it (`400 invalid_input`). |
v2 conversations do not use knowledge yet.
Takes any type of body and a specified content type.
Corresponds with POST /v1/avatars (the `CreateAvatar` operationId).
func (*Client) CreateSpeechSession ¶
func (c *Client) CreateSpeechSession(ctx context.Context, body CreateSpeechSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateSpeechSession Start a speech session
Starts a realtime speech-to-speech conversation with an avatar over a WebSocket, without video. The answer carries the WebSocket `url` and a short-lived `token`: connect within 60 seconds (`tokenExpiresAt`).
- **Connecting**: present the token as `Authorization: Bearer <token>` or as the WebSocket subprotocols `atmee-live` and `atmee-token.<token>`. The first connection holds the session for good; a client that loses it starts a new session.
- **Avatar**: `avatarId` is required, and the session uses that avatar's persona and voice. An avatar without a voice is `422 avatar_has_no_voice`.
- **Pinned settings**: `settings` pins `session.start` fields from your backend, over the client's. A client `session.start` or `session.update` that sets a pinned field is refused, naming it; appends such as `session.instructions.append` still add to it. Pinned persona fields override the avatar's.
- **Length**: the session ends at `endsAt` (the reservation plus `actualDurationSeconds`), whenever the connection opened.
- **Billing**: by the minute from the first usage report (within 30 seconds of connecting) until the end, always to the account that owns the avatar. A session nobody connects to costs nothing and is closed as `failed` (`no_user_joined`).
- **Credentials**: an API key with the `sessions` scope (an avatar-scoped key must name its avatar), or the owner's signed-in user token where the deployment accepts one (`X-Account-Id` picks among several accounts). There are no anonymous speech sessions. Read and end a session with either credential of its account.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/speech_sessions (the `CreateSpeechSession` operationId).
func (*Client) CreateSpeechSessionWithBody ¶
func (c *Client) CreateSpeechSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateSpeechSessionWithBody Start a speech session
Starts a realtime speech-to-speech conversation with an avatar over a WebSocket, without video. The answer carries the WebSocket `url` and a short-lived `token`: connect within 60 seconds (`tokenExpiresAt`).
- **Connecting**: present the token as `Authorization: Bearer <token>` or as the WebSocket subprotocols `atmee-live` and `atmee-token.<token>`. The first connection holds the session for good; a client that loses it starts a new session.
- **Avatar**: `avatarId` is required, and the session uses that avatar's persona and voice. An avatar without a voice is `422 avatar_has_no_voice`.
- **Pinned settings**: `settings` pins `session.start` fields from your backend, over the client's. A client `session.start` or `session.update` that sets a pinned field is refused, naming it; appends such as `session.instructions.append` still add to it. Pinned persona fields override the avatar's.
- **Length**: the session ends at `endsAt` (the reservation plus `actualDurationSeconds`), whenever the connection opened.
- **Billing**: by the minute from the first usage report (within 30 seconds of connecting) until the end, always to the account that owns the avatar. A session nobody connects to costs nothing and is closed as `failed` (`no_user_joined`).
- **Credentials**: an API key with the `sessions` scope (an avatar-scoped key must name its avatar), or the owner's signed-in user token where the deployment accepts one (`X-Account-Id` picks among several accounts). There are no anonymous speech sessions. Read and end a session with either credential of its account.
Takes any type of body and a specified content type.
Corresponds with POST /v1/speech_sessions (the `CreateSpeechSession` operationId).
func (*Client) CreateUpload ¶
func (c *Client) CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateUpload Create an upload
Creates a one-time upload for a file you cannot send in the same request, for example from an MCP tool or a chat assistant. Once it is `uploaded`, pass `upload:<uploadId>` wherever a create or replace takes a file URL.
| `kind` | Accepts | |---|---| | `portrait` | jpg, png or webp, up to 10 MB | | `voice` | a 10 to 60 second recording: mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB | | `knowledge` | pdf, docx, doc, txt, md, html or csv up to 50 MB; audio or video up to 20 MB |
Send the file one of two ways:
- `PUT` it to `uploadUrl` with `uploadHeaders` (a `Content-Type` from `allowedTypes` if you declared none), at most `maxBytes`: `curl -X PUT -H 'Content-Type: image/png' --data-binary @portrait.png '<uploadUrl>'`.
- Or give a person `uploadPageUrl`, a page that takes the file (or records a voice). It works for 15 minutes (`uploadPageExpiresAt`) and until the file arrives.
Then poll `GET /v1/uploads/{uploadId}` until `status` is `uploaded`. An upload is used once and expires an hour after it was created. `contentType`, when given, is the only type accepted. Requires `avatars:write`.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/uploads (the `CreateUpload` operationId).
func (*Client) CreateUploadWithBody ¶
func (c *Client) CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateUploadWithBody Create an upload
Creates a one-time upload for a file you cannot send in the same request, for example from an MCP tool or a chat assistant. Once it is `uploaded`, pass `upload:<uploadId>` wherever a create or replace takes a file URL.
| `kind` | Accepts | |---|---| | `portrait` | jpg, png or webp, up to 10 MB | | `voice` | a 10 to 60 second recording: mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB | | `knowledge` | pdf, docx, doc, txt, md, html or csv up to 50 MB; audio or video up to 20 MB |
Send the file one of two ways:
- `PUT` it to `uploadUrl` with `uploadHeaders` (a `Content-Type` from `allowedTypes` if you declared none), at most `maxBytes`: `curl -X PUT -H 'Content-Type: image/png' --data-binary @portrait.png '<uploadUrl>'`.
- Or give a person `uploadPageUrl`, a page that takes the file (or records a voice). It works for 15 minutes (`uploadPageExpiresAt`) and until the file arrives.
Then poll `GET /v1/uploads/{uploadId}` until `status` is `uploaded`. An upload is used once and expires an hour after it was created. `contentType`, when given, is the only type accepted. Requires `avatars:write`.
Takes any type of body and a specified content type.
Corresponds with POST /v1/uploads (the `CreateUpload` operationId).
func (*Client) DeleteAvatar ¶
func (c *Client) DeleteAvatar(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteAvatar Delete an avatar
Deletes the avatar: it disappears from the API at once and its unfinished captures are cancelled. Its files, every version's included, are removed permanently after the retention period.
Corresponds with DELETE /v1/avatars/{avatarId} (the `DeleteAvatar` operationId).
func (*Client) DeleteAvatarConductor ¶
func (c *Client) DeleteAvatarConductor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteAvatarConductor Remove the conductor
Removes a v2 avatar's conductor, including one its own configuration carries: the next session runs without one, and a running session keeps its own. Nothing is rebuilt. Removing a conductor that is not set is not an error.
Corresponds with DELETE /v1/avatars/{avatarId}/conductor (the `DeleteAvatarConductor` operationId).
func (*Client) DeleteAvatarThumbnail ¶
func (c *Client) DeleteAvatarThumbnail(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteAvatarThumbnail Remove the thumbnail
Removes the thumbnail, custom or automatic: Explore shows the portrait instead, and an automatic thumbnail may be made again. Returns the avatar. Requires `avatars:write`.
A public avatar needs a thumbnail, so this is `409 public_requirements_missing` until you make it unlisted or private.
Corresponds with DELETE /v1/avatars/{avatarId}/thumbnail (the `DeleteAvatarThumbnail` operationId).
func (*Client) DeleteAvatarVersion ¶
func (c *Client) DeleteAvatarVersion(ctx context.Context, avatarId AvatarIdPath, versionId string, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteAvatarVersion Delete a version
Deletes an older version of a v2 avatar: its takes and the files only it uses. It can no longer be restored.
- Files that a kept take or the current inputs use are never deleted.
- The current version, a version holding the serving or selected take (`409 version_in_use`) and one whose capture is still running (`409 version_busy`) cannot be deleted.
- If storage cannot delete every file now, the takes are still gone and `pendingFiles` counts what is left: call again to retry.
Corresponds with DELETE /v1/avatars/{avatarId}/versions/{versionId} (the `DeleteAvatarVersion` operationId).
func (*Client) DesignVoice ¶
func (c *Client) DesignVoice(ctx context.Context, params *DesignVoiceParams, body DesignVoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
DesignVoice Design a voice
Designs voice previews from a description of how the voice should sound. Each preview runs 10 to 60 seconds, the length an avatar's voice sample needs: a short one is made once more with a longer read, and one still outside that range is dropped.
- **Text**: `sampleText` is what every preview says, in `language`; without it, a greeting is written from the description. Each preview reports what it actually says in `spokenText`.
- **Output**: each preview is an `upload:<uploadId>` that `POST /v1/avatars` (`assets.voice`) and `PUT /v1/avatars/{avatarId}/voice` take as is, with a short-lived `url` to play it. `durationSeconds` is `null` when the length is unknown.
- **Billing and idempotency**: as for `POST /v1/generation/portraits`.
- **Scopes**: `generation:write` and `avatars:write`.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/generation/voices (the `DesignVoice` operationId).
func (*Client) DesignVoiceWithBody ¶
func (c *Client) DesignVoiceWithBody(ctx context.Context, params *DesignVoiceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
DesignVoiceWithBody Design a voice
Designs voice previews from a description of how the voice should sound. Each preview runs 10 to 60 seconds, the length an avatar's voice sample needs: a short one is made once more with a longer read, and one still outside that range is dropped.
- **Text**: `sampleText` is what every preview says, in `language`; without it, a greeting is written from the description. Each preview reports what it actually says in `spokenText`.
- **Output**: each preview is an `upload:<uploadId>` that `POST /v1/avatars` (`assets.voice`) and `PUT /v1/avatars/{avatarId}/voice` take as is, with a short-lived `url` to play it. `durationSeconds` is `null` when the length is unknown.
- **Billing and idempotency**: as for `POST /v1/generation/portraits`.
- **Scopes**: `generation:write` and `avatars:write`.
Takes any type of body and a specified content type.
Corresponds with POST /v1/generation/voices (the `DesignVoice` operationId).
func (*Client) EndAvatarSession ¶
func (c *Client) EndAvatarSession(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
EndAvatarSession End an avatar session
Ends an API session now and stops billing. It settles `completed` with `endReason: ended_by_api`. For a conversation, this is the same as `POST /v1/sessions/{id}/end` with an API key.
- **Idempotent**: a session that already ended answers `200` with `alreadyEnded: true`, so it is safe to call from every teardown path.
- **Renders** usually end on their own when your agent leaves, the room closes or you remove the avatar participant. Call this to stop paying while your room stays open; it does not remove the avatar from your room, so remove the participant yourself.
- **Conversations**: the room is closed.
- Only sessions started through the API can be ended here (website sessions are `404`), and an avatar-scoped key ends only its avatar's.
Corresponds with POST /v1/avatar_sessions/{id}/end (the `EndAvatarSession` operationId).
func (*Client) EndSpeechSession ¶
func (c *Client) EndSpeechSession(ctx context.Context, sessionId SpeechSessionPathId, reqEditors ...RequestEditorFn) (*http.Response, error)
EndSpeechSession End a speech session
Ends the session with `endReason: ended_by_api`. With no connection open it settles at once. With one open, it ends at the next usage report (within 30 seconds) and is billed until then: the answer reads `status: active` with `endRequestedAt` set, and `GET` reads it `completed` once settled.
Idempotent: a repeat keeps the first request, and ending a settled session answers `alreadyEnded: true`.
Corresponds with POST /v1/speech_sessions/{session_id}/end (the `EndSpeechSession` operationId).
func (*Client) EnhancePortrait ¶
func (c *Client) EnhancePortrait(ctx context.Context, params *EnhancePortraitParams, body EnhancePortraitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
EnhancePortrait Enhance a portrait
Crops your photo to a square and returns up to four enhanced portraits that keep the subject's identity. With `prompt`, they restyle the photo as the prompt asks ("this person as a 1920s detective"), keeping the person unless the prompt says otherwise.
- **Input**: `image` is a `portrait` upload (`upload:<uploadId>`, still usable afterwards) or a public https link to a jpg, png or webp of at most 10 MB. The prompt and the photo are moderated first.
- **Consent**: if the photo shows a real person other than you, get their permission first.
- **Output, billing and idempotency**: as for `POST /v1/generation/portraits`.
- **Scopes**: `generation:write` and `avatars:write`.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/generation/enhancements (the `EnhancePortrait` operationId).
func (*Client) EnhancePortraitWithBody ¶
func (c *Client) EnhancePortraitWithBody(ctx context.Context, params *EnhancePortraitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
EnhancePortraitWithBody Enhance a portrait
Crops your photo to a square and returns up to four enhanced portraits that keep the subject's identity. With `prompt`, they restyle the photo as the prompt asks ("this person as a 1920s detective"), keeping the person unless the prompt says otherwise.
- **Input**: `image` is a `portrait` upload (`upload:<uploadId>`, still usable afterwards) or a public https link to a jpg, png or webp of at most 10 MB. The prompt and the photo are moderated first.
- **Consent**: if the photo shows a real person other than you, get their permission first.
- **Output, billing and idempotency**: as for `POST /v1/generation/portraits`.
- **Scopes**: `generation:write` and `avatars:write`.
Takes any type of body and a specified content type.
Corresponds with POST /v1/generation/enhancements (the `EnhancePortrait` operationId).
func (*Client) GenerateClip ¶
func (c *Client) GenerateClip(ctx context.Context, params *GenerateClipParams, body GenerateClipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
GenerateClip Generate a clip
Renders a short mp4 (1 to 30 seconds, 25 fps) of the person or character in `image`, moving as `prompt` describes and optionally speaking `audio`. No avatar is needed.
- **Inputs**: `image` is a `portrait` upload or a public https link (jpg, png or webp, up to 10 MB); `audio` is a `voice` upload or link. The audio plays once from the start, padded with silence or cut at the end. The prompt and the image are moderated; if the image shows a real person other than you, get their permission first.
- **Duration**: `durationSeconds` is required with `audio` (set it to the audio's length; the file is not measured) and defaults to 8 for a silent clip. At most 15 seconds where clips render on the sessions' pool (`pricing.generation.clipAnySize` false), else 30 seconds within the size's budget (1920 × 1080: 10 seconds, 1280 × 720: 22).
- **Resolution**: 512 × 512 unless you pass `resolution`, the clip's output size (see `ClipResolution`), or `aspectRatio` (`square`, `portrait` 384 × 640, `landscape` 640 × 384). It renders at each side rounded up to 32 and the centre is cropped. Where `clipAnySize` is false the render size must be one of `pricing.generation.clipResolutions` on `GET /v1/account`.
- **Output**: the clip as `upload:<uploadId>` (kept 24 hours), with a short-lived `url` to download it.
- **Billing**: the per-15-second price from `GET /v1/account` (`pricing.generation.clipPer15SecondsMicrocredits`), pro rata to `durationSeconds` and rounded up, charged only when the clip comes back.
- **Slow starts**: a cold render can take minutes. After about 45 seconds the call answers `409 request_in_progress`; retry with the same `Idempotency-Key` after `Retry-After` to get the clip, charged once.
- **Access**: needs v2 access (`403 v2_access_required`) and the `generation:write` and `avatars:write` scopes.
| Error | When | |---|---| | `400 invalid_input` | A bad input, `audio` without `durationSeconds`, or an input the renderer cannot use: `input_failure image` or `audio` (no face, an unreadable file), `input_failure resolution` (a size not served right now) | | `503 generation_unavailable` | Clips are not offered here |
Takes a body of the `application/json` content type.
Corresponds with POST /v1/generation/clips (the `GenerateClip` operationId).
func (*Client) GenerateClipWithBody ¶
func (c *Client) GenerateClipWithBody(ctx context.Context, params *GenerateClipParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
GenerateClipWithBody Generate a clip
Renders a short mp4 (1 to 30 seconds, 25 fps) of the person or character in `image`, moving as `prompt` describes and optionally speaking `audio`. No avatar is needed.
- **Inputs**: `image` is a `portrait` upload or a public https link (jpg, png or webp, up to 10 MB); `audio` is a `voice` upload or link. The audio plays once from the start, padded with silence or cut at the end. The prompt and the image are moderated; if the image shows a real person other than you, get their permission first.
- **Duration**: `durationSeconds` is required with `audio` (set it to the audio's length; the file is not measured) and defaults to 8 for a silent clip. At most 15 seconds where clips render on the sessions' pool (`pricing.generation.clipAnySize` false), else 30 seconds within the size's budget (1920 × 1080: 10 seconds, 1280 × 720: 22).
- **Resolution**: 512 × 512 unless you pass `resolution`, the clip's output size (see `ClipResolution`), or `aspectRatio` (`square`, `portrait` 384 × 640, `landscape` 640 × 384). It renders at each side rounded up to 32 and the centre is cropped. Where `clipAnySize` is false the render size must be one of `pricing.generation.clipResolutions` on `GET /v1/account`.
- **Output**: the clip as `upload:<uploadId>` (kept 24 hours), with a short-lived `url` to download it.
- **Billing**: the per-15-second price from `GET /v1/account` (`pricing.generation.clipPer15SecondsMicrocredits`), pro rata to `durationSeconds` and rounded up, charged only when the clip comes back.
- **Slow starts**: a cold render can take minutes. After about 45 seconds the call answers `409 request_in_progress`; retry with the same `Idempotency-Key` after `Retry-After` to get the clip, charged once.
- **Access**: needs v2 access (`403 v2_access_required`) and the `generation:write` and `avatars:write` scopes.
| Error | When | |---|---| | `400 invalid_input` | A bad input, `audio` without `durationSeconds`, or an input the renderer cannot use: `input_failure image` or `audio` (no face, an unreadable file), `input_failure resolution` (a size not served right now) | | `503 generation_unavailable` | Clips are not offered here |
Takes any type of body and a specified content type.
Corresponds with POST /v1/generation/clips (the `GenerateClip` operationId).
func (*Client) GeneratePortraits ¶
func (c *Client) GeneratePortraits(ctx context.Context, params *GeneratePortraitsParams, body GeneratePortraitsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
GeneratePortraits Generate portraits
Generates up to four square portraits of an invented character from a text description. Never use it to depict a real person: for a real person, enhance their own photo with `POST /v1/generation/enhancements`, with their permission.
- **Output**: each portrait is an `upload:<uploadId>` that `POST /v1/avatars` (`assets.image`) and `PUT /v1/avatars/{avatarId}/appearance` take as is (it expires after 24 hours), with a short-lived `url` and a small JPEG `preview`.
- **Billing**: the operation's price from `GET /v1/account`, charged only when at least one portrait comes back. A flagged, failed or refused call costs nothing.
- **Idempotency**: `Idempotency-Key` is required. A retry with the same key never charges twice and returns the first result (`replayed: true`).
- **Scopes**: `generation:write` and `avatars:write`.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/generation/portraits (the `GeneratePortraits` operationId).
func (*Client) GeneratePortraitsWithBody ¶
func (c *Client) GeneratePortraitsWithBody(ctx context.Context, params *GeneratePortraitsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
GeneratePortraitsWithBody Generate portraits
Generates up to four square portraits of an invented character from a text description. Never use it to depict a real person: for a real person, enhance their own photo with `POST /v1/generation/enhancements`, with their permission.
- **Output**: each portrait is an `upload:<uploadId>` that `POST /v1/avatars` (`assets.image`) and `PUT /v1/avatars/{avatarId}/appearance` take as is (it expires after 24 hours), with a short-lived `url` and a small JPEG `preview`.
- **Billing**: the operation's price from `GET /v1/account`, charged only when at least one portrait comes back. A flagged, failed or refused call costs nothing.
- **Idempotency**: `Idempotency-Key` is required. A retry with the same key never charges twice and returns the first result (`replayed: true`).
- **Scopes**: `generation:write` and `avatars:write`.
Takes any type of body and a specified content type.
Corresponds with POST /v1/generation/portraits (the `GeneratePortraits` operationId).
func (*Client) GetAccount ¶
func (c *Client) GetAccount(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAccount Get the account
Returns the account's plan, its API limits, its prices and its v2 capture quota. Prices are in microcredits (100 microcredits = 1 credit).
- **Plan**: the current plan, and the one it changes to at the end of the cycle, if any.
- **Pricing**: the per-minute price of each kind of session (a conversation or a render, by avatar engine, and a speech session), a preview clip, and each generation call where generation is offered (`pricing.generation`).
- **Limits**: an absent limit or plan field is not set (an absent limit is not capped by the plan).
- **v2**: `v2Access` says whether the account may build v2 avatars; `captureQuota` counts v2 captures queued or running against the cap.
- **Payouts**: `payouts` says whether the account can be paid out, which monetizing an avatar needs.
- Readable by the same callers as `GET /v1/account/balance`.
Corresponds with GET /v1/account (the `GetAccount` operationId).
func (*Client) GetAccountBalance ¶
func (c *Client) GetAccountBalance(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAccountBalance Get the balance
Returns the credits the account can spend on sessions, in microcredits (100 microcredits = 1 credit). An avatar's sponsor pool is not included (see `GET /v1/avatars/{avatarId}/sponsor`).
- `spendableMicrocredits` is what a session is admitted on: every bucket for a reserve-mode key or a signed-in user, only the plan and top-up buckets for a metered key (`couponSpendable: false`).
- Live sessions' reservations are already taken out, and reported as `heldByLiveSessionsMicrocredits`.
- `unlimited` is true when sessions are not charged, whatever the buckets say.
- `nextExpiry` lists the credits that will expire, soonest first.
- Readable by any key with `sessions` or `avatars:read` (an avatar-scoped key included), or a signed-in user of the account.
Corresponds with GET /v1/account/balance (the `GetAccountBalance` operationId).
func (*Client) GetAccountEarnings ¶
func (c *Client) GetAccountEarnings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAccountEarnings Get earnings
Returns what the account's monetized avatars earned, what was paid out, and the wallet balance between them, in microcredits (100 microcredits = 1 credit). This is not the balance sessions spend (`GET /v1/account/balance`); one avatar's earnings are in `GET /v1/avatars/{avatarId}/monetization`.
Readable by an account-wide key with `avatars:read` or a signed-in user of the account; an avatar-scoped key gets `403 avatar_not_allowed`.
Corresponds with GET /v1/account/earnings (the `GetAccountEarnings` operationId).
func (*Client) GetAvatar ¶
func (c *Client) GetAvatar(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAvatar Get an avatar
Returns the avatar's settings and its build status, stage by stage. Poll it after a create or a change: `stages` and `rebuilding` show progress, and `status` says when it needs you (`failed`, `awaiting_selection`, `stalled`, `draft`). A v2 avatar stays `ready` while a new version builds; when that build needs a candidate picked, `selectionRequired` turns true while `status` stays `ready`.
Corresponds with GET /v1/avatars/{avatarId} (the `GetAvatar` operationId).
func (*Client) GetAvatarAppearance ¶
func (c *Client) GetAvatarAppearance(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAvatarAppearance Get the portrait
Returns a presigned URL of the portrait last given. The URL expires after about an hour.
Corresponds with GET /v1/avatars/{avatarId}/appearance (the `GetAvatarAppearance` operationId).
func (*Client) GetAvatarConductor ¶
func (c *Client) GetAvatarConductor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAvatarConductor Get the conductor
Returns a v2 avatar's conductor as saved: the whole graph and `speakAfterS`. `GET /v1/avatars/{avatarId}` only reports whether one is set and its node count.
Corresponds with GET /v1/avatars/{avatarId}/conductor (the `GetAvatarConductor` operationId).
func (*Client) GetAvatarKnowledge ¶
func (c *Client) GetAvatarKnowledge(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAvatarKnowledge Get the knowledge
Returns the facts text, the knowledge questionnaire's questions and answers, and the knowledge files with presigned URLs.
Corresponds with GET /v1/avatars/{avatarId}/knowledge (the `GetAvatarKnowledge` operationId).
func (*Client) GetAvatarMonetization ¶
func (c *Client) GetAvatarMonetization(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAvatarMonetization Get monetization
Returns whether the avatar is monetized, its last 30 days against the eligibility requirements (the account's own conversations left out), the account's cap on monetized avatars, and what the avatar earned, in microcredits (100 = 1 credit). Requires `avatars:read`.
Corresponds with GET /v1/avatars/{avatarId}/monetization (the `GetAvatarMonetization` operationId).
func (*Client) GetAvatarSession ¶
func (c *Client) GetAvatarSession(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAvatarSession Get an avatar session
Reads an API session's state, end reason and cost: a conversation (`POST /v1/sessions`, `kind: conversation`) or a render (`POST /v1/avatar_sessions`, `kind: render`).
- `status` is `pending` (starting), `active` (live), `completed` (ended normally, including by you) or `failed` (it never really started; nothing is billed for time it did not run).
- Once it ended, `endReason` says why, `failureCode` names the failure of a failed session, and `billedSeconds` and `chargedMicrocredits` say what it cost (100 microcredits = 1 credit).
- Billing runs only while both the avatar and the visitor (or your agent) are in the room; `userJoinedAt` and `avatarJoinedAt` say when each joined.
Corresponds with GET /v1/avatar_sessions/{id} (the `GetAvatarSession` operationId).
func (*Client) GetAvatarSponsor ¶
func (c *Client) GetAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAvatarSponsor Get the sponsor pool
Returns the avatar's sponsor pool balance and settings. Readable by an API key with `avatars:read` or a signed-in user of the account. Changing the pool takes an API key with `billing:write` or a signed-in user.
Corresponds with GET /v1/avatars/{avatarId}/sponsor (the `GetAvatarSponsor` operationId).
func (*Client) GetAvatarVoice ¶
func (c *Client) GetAvatarVoice(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAvatarVoice Get the voice
Returns a presigned URL of the voice sample last given, and the voice engine.
Corresponds with GET /v1/avatars/{avatarId}/voice (the `GetAvatarVoice` operationId).
func (*Client) GetCurrentApiKey ¶
func (c *Client) GetCurrentApiKey(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetCurrentApiKey Get the current credential
Describes the credential making this call. Readable by the same callers as `GET /v1/account/balance`.
- **API key** (`kind: api_key`): its name, scopes, the avatar it is restricted to, its billing mode, its session caps and how much of its spend cap the current window used. The secret is never returned. `spendCap.enforced` is false when the cap is not applied; `limitMicrocredits` and `remainingMicrocredits` are absent when the key has no cap, and `windowResetsAt` for a lifetime cap (`window: total`).
- **Signed-in user** (`kind: user`): the user and the account it acts for. A user has no key, no scopes beyond the avatar ones and no spend cap.
Corresponds with GET /v1/api_keys/current (the `GetCurrentApiKey` operationId).
func (*Client) GetSpeechSession ¶
func (c *Client) GetSpeechSession(ctx context.Context, sessionId SpeechSessionPathId, reqEditors ...RequestEditorFn) (*http.Response, error)
GetSpeechSession Get a speech session
Reads a speech session's state and, once it ended, why and what it cost.
- `status` is `active` while the session is reserved or connected, then `completed` or `failed`.
- `connectedAt` is when billing started, `endsAt` when the session's time runs out, and `endRequestedAt` when you ended it with a connection open.
- Once it ended, `endReason` says why, and `billedSeconds` and `chargedMicrocredits` what it cost (100 microcredits = 1 credit).
Corresponds with GET /v1/speech_sessions/{session_id} (the `GetSpeechSession` operationId).
func (*Client) GetUpload ¶
func (c *Client) GetUpload(ctx context.Context, uploadId UploadIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
GetUpload Get an upload
Returns the upload's `status`: `pending` until the file arrives, then `uploaded` (usable once), `consumed` once a create or replace used it, or `expired` an hour after it was created. Only the account that created it can read it. Requires `avatars:read` or `avatars:write`.
Corresponds with GET /v1/uploads/{uploadId} (the `GetUpload` operationId).
func (*Client) GrantAvatarSponsor ¶
func (c *Client) GrantAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, body GrantAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
GrantAvatarSponsor Fund the sponsor pool
Moves credits from the account into the avatar's sponsor pool. Send an `Idempotency-Key` to retry safely: the same key replays the first result instead of granting twice.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/avatars/{avatarId}/sponsor/grants (the `GrantAvatarSponsor` operationId).
func (*Client) GrantAvatarSponsorWithBody ¶
func (c *Client) GrantAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
GrantAvatarSponsorWithBody Fund the sponsor pool
Moves credits from the account into the avatar's sponsor pool. Send an `Idempotency-Key` to retry safely: the same key replays the first result instead of granting twice.
Takes any type of body and a specified content type.
Corresponds with POST /v1/avatars/{avatarId}/sponsor/grants (the `GrantAvatarSponsor` operationId).
func (*Client) ListApiKeys ¶
func (c *Client) ListApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListApiKeys List the account's API keys (signed-in user only)
Every API key of the account the user acts for, newest first, revoked ones included (`active: false`). The secrets are never returned: a key is recognised by `keyPrefix` and `lastFour`.
Only a signed-in user may manage keys, and only the account's owner or an admin (a member is `403 owner_or_admin_required`): an API key is answered `403 login_required`, so a leaked key can never mint more keys. The owner or an admin may grant any scope, as in Studio.
Corresponds with GET /v1/api_keys (the `ListApiKeys` operationId).
func (*Client) ListAvatarCandidates ¶
func (c *Client) ListAvatarCandidates(ctx context.Context, avatarId AvatarIdPath, params *ListAvatarCandidatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListAvatarCandidates List candidates
Lists a v2 avatar's candidates and versions. A candidate (a take) is one capture of the avatar's lip sync and motion, with a short talking preview to compare. A version is one set of capture inputs: the portrait, the voice sample and the preview message.
- `items` lists the current version's takes and the serving take; `versions=all` adds every older version's.
- `versions` always lists every version, oldest first, with what going back to it restores.
- Pick one with `PUT /v1/avatars/{avatarId}/selected_candidate`. With `seedSelection: auto`, the first completed take of the current version is picked for you.
- `seed` is informational: the same seed does not reproduce a capture.
Corresponds with GET /v1/avatars/{avatarId}/candidates (the `ListAvatarCandidates` operationId).
func (*Client) ListAvatars ¶
func (c *Client) ListAvatars(ctx context.Context, params *ListAvatarsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListAvatars List avatars
Lists the account's avatars, newest first. Page with `before`.
Corresponds with GET /v1/avatars (the `ListAvatars` operationId).
func (*Client) RedeemAccountCode ¶
func (c *Client) RedeemAccountCode(ctx context.Context, body RedeemAccountCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
RedeemAccountCode Redeem a code
Redeems an invite or credit code for the account. A code can add credits, open v2 avatars (invite-only for now; see `v2Access` on `GET /v1/account`), or both, and the answer says what it gave. Each account redeems a code at most once.
Only a signed-in user may redeem: an API key gets `403 login_required`, so a leaked key cannot spend the account's codes. v2 access applies from the next request.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/account/redeem (the `RedeemAccountCode` operationId).
func (*Client) RedeemAccountCodeWithBody ¶
func (c *Client) RedeemAccountCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RedeemAccountCodeWithBody Redeem a code
Redeems an invite or credit code for the account. A code can add credits, open v2 avatars (invite-only for now; see `v2Access` on `GET /v1/account`), or both, and the answer says what it gave. Each account redeems a code at most once.
Only a signed-in user may redeem: an API key gets `403 login_required`, so a leaked key cannot spend the account's codes. v2 access applies from the next request.
Takes any type of body and a specified content type.
Corresponds with POST /v1/account/redeem (the `RedeemAccountCode` operationId).
func (*Client) ReplaceAvatarAppearance ¶
func (c *Client) ReplaceAvatarAppearance(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarAppearanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceAvatarAppearance Replace the portrait
Replaces the avatar's portrait and re-runs the build stages that depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its portrait this way (on v2, the first candidate is captured once the voice is there too).
- **Body**: the image (jpg, png or webp, up to 10 MB) as the `file` part of `multipart/form-data`. Where `POST /v1/uploads` is available, JSON `{"image": "<https URL or upload:<uploadId>>"}` also works, with a `portrait` upload consumed on success.
- **Portrait**: front-facing, head and shoulders with some margin around the head, the face at least a third of the frame, in even light, with the lips slightly parted. A clearly bad portrait fails the `appearance` stage with a `portrait_*` reason.
- **Scope**: `avatars:write`.
Takes a body of the `application/json` content type.
Corresponds with PUT /v1/avatars/{avatarId}/appearance (the `ReplaceAvatarAppearance` operationId).
func (*Client) ReplaceAvatarAppearanceWithBody ¶
func (c *Client) ReplaceAvatarAppearanceWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceAvatarAppearanceWithBody Replace the portrait
Replaces the avatar's portrait and re-runs the build stages that depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its portrait this way (on v2, the first candidate is captured once the voice is there too).
- **Body**: the image (jpg, png or webp, up to 10 MB) as the `file` part of `multipart/form-data`. Where `POST /v1/uploads` is available, JSON `{"image": "<https URL or upload:<uploadId>>"}` also works, with a `portrait` upload consumed on success.
- **Portrait**: front-facing, head and shoulders with some margin around the head, the face at least a third of the frame, in even light, with the lips slightly parted. A clearly bad portrait fails the `appearance` stage with a `portrait_*` reason.
- **Scope**: `avatars:write`.
Takes any type of body and a specified content type.
Corresponds with PUT /v1/avatars/{avatarId}/appearance (the `ReplaceAvatarAppearance` operationId).
func (*Client) ReplaceAvatarKnowledge ¶
func (c *Client) ReplaceAvatarKnowledge(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarKnowledgeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceAvatarKnowledge Replace the knowledge files
Replaces the avatar's whole set of knowledge files and re-runs the build stages that depend on them; send none to clear the set. The `knowledge.facts` text and the questionnaire answers are kept (change them with `PATCH /v1/avatars/{avatarId}`).
- **Body**: repeat the `files` part for each document (pdf, docx, doc, txt, md, html or csv, up to 50 MB each, at most 20), with an optional `descriptions` JSON object of file name to description. Where `POST /v1/uploads` is available, JSON `{"files": [...], "descriptions": {...}}` also works, with https URLs or `knowledge` uploads consumed on success.
- A URL's file is named by its last path segment, an upload's by its `fileName`; `descriptions` uses those names.
- v2 conversations do not use knowledge yet.
- **Scope**: `avatars:write`.
Takes a body of the `application/json` content type.
Corresponds with PUT /v1/avatars/{avatarId}/knowledge (the `ReplaceAvatarKnowledge` operationId).
func (*Client) ReplaceAvatarKnowledgeWithBody ¶
func (c *Client) ReplaceAvatarKnowledgeWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceAvatarKnowledgeWithBody Replace the knowledge files
Replaces the avatar's whole set of knowledge files and re-runs the build stages that depend on them; send none to clear the set. The `knowledge.facts` text and the questionnaire answers are kept (change them with `PATCH /v1/avatars/{avatarId}`).
- **Body**: repeat the `files` part for each document (pdf, docx, doc, txt, md, html or csv, up to 50 MB each, at most 20), with an optional `descriptions` JSON object of file name to description. Where `POST /v1/uploads` is available, JSON `{"files": [...], "descriptions": {...}}` also works, with https URLs or `knowledge` uploads consumed on success.
- A URL's file is named by its last path segment, an upload's by its `fileName`; `descriptions` uses those names.
- v2 conversations do not use knowledge yet.
- **Scope**: `avatars:write`.
Takes any type of body and a specified content type.
Corresponds with PUT /v1/avatars/{avatarId}/knowledge (the `ReplaceAvatarKnowledge` operationId).
func (*Client) ReplaceAvatarThumbnail ¶
func (c *Client) ReplaceAvatarThumbnail(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarThumbnailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceAvatarThumbnail Set the thumbnail
Sets a custom thumbnail for the avatar's Explore card, replacing any other; automatic thumbnails are no longer made for it. Nothing is rebuilt. Returns the avatar, with `profile.thumbnailSource: custom`.
- **Body**: one image (jpg, png or webp, up to 10 MB) as the `file` part. Where `POST /v1/uploads` is available, JSON `{"image": "<https URL or upload:<uploadId>>"}` also works, with a `portrait` upload consumed on success.
- **Scope**: `avatars:write`.
Takes a body of the `application/json` content type.
Corresponds with PUT /v1/avatars/{avatarId}/thumbnail (the `ReplaceAvatarThumbnail` operationId).
func (*Client) ReplaceAvatarThumbnailWithBody ¶
func (c *Client) ReplaceAvatarThumbnailWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceAvatarThumbnailWithBody Set the thumbnail
Sets a custom thumbnail for the avatar's Explore card, replacing any other; automatic thumbnails are no longer made for it. Nothing is rebuilt. Returns the avatar, with `profile.thumbnailSource: custom`.
- **Body**: one image (jpg, png or webp, up to 10 MB) as the `file` part. Where `POST /v1/uploads` is available, JSON `{"image": "<https URL or upload:<uploadId>>"}` also works, with a `portrait` upload consumed on success.
- **Scope**: `avatars:write`.
Takes any type of body and a specified content type.
Corresponds with PUT /v1/avatars/{avatarId}/thumbnail (the `ReplaceAvatarThumbnail` operationId).
func (*Client) ReplaceAvatarVoice ¶
func (c *Client) ReplaceAvatarVoice(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarVoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceAvatarVoice Replace the voice
Replaces the avatar's voice sample and re-runs the build stages that depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its voice this way (on v2, the first candidate is captured once the portrait is there too).
- **Body**: one 10 to 60 second recording of clear speech (mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB) as the `file` part. Where `POST /v1/uploads` is available, JSON `{"voice": "<https URL or upload:<uploadId>>"}` also works, with a `voice` upload consumed on success.
- Silence, pure tones or heavy noise fail the voice stage.
- **Scope**: `avatars:write`.
Takes a body of the `application/json` content type.
Corresponds with PUT /v1/avatars/{avatarId}/voice (the `ReplaceAvatarVoice` operationId).
func (*Client) ReplaceAvatarVoiceWithBody ¶
func (c *Client) ReplaceAvatarVoiceWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceAvatarVoiceWithBody Replace the voice
Replaces the avatar's voice sample and re-runs the build stages that depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its voice this way (on v2, the first candidate is captured once the portrait is there too).
- **Body**: one 10 to 60 second recording of clear speech (mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB) as the `file` part. Where `POST /v1/uploads` is available, JSON `{"voice": "<https URL or upload:<uploadId>>"}` also works, with a `voice` upload consumed on success.
- Silence, pure tones or heavy noise fail the voice stage.
- **Scope**: `avatars:write`.
Takes any type of body and a specified content type.
Corresponds with PUT /v1/avatars/{avatarId}/voice (the `ReplaceAvatarVoice` operationId).
func (*Client) RevokeApiKey ¶
func (c *Client) RevokeApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
RevokeApiKey Revoke an API key (signed-in user only)
Revokes the key for good: it stops authenticating within about 30 seconds (a resolved key is cached that long); sessions it started keep running. Revoking a revoked key answers `200` again with the same key. Only the account's owner or an admin may revoke; an API key is answered `403 login_required`.
Corresponds with DELETE /v1/api_keys/{apiKeyId} (the `RevokeApiKey` operationId).
func (*Client) RotateApiKey ¶
func (c *Client) RotateApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
RotateApiKey Issue a new secret for an API key (signed-in user only); the old secret stops working
Replaces the key's secret and returns the new one in `apiKey`, shown only here. The key keeps its id, name, scopes, avatar and caps; the old secret stops authenticating within about 30 seconds. A revoked key cannot be rotated (`409 api_key_revoked`). Only the account's owner or an admin may rotate; an API key is answered `403 login_required`.
Corresponds with POST /v1/api_keys/{apiKeyId}/rotate (the `RotateApiKey` operationId).
func (*Client) SelectAvatarCandidate ¶
func (c *Client) SelectAvatarCandidate(ctx context.Context, avatarId AvatarIdPath, body SelectAvatarCandidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
SelectAvatarCandidate Select a candidate
Picks the completed candidate a v2 avatar serves. The pick is recorded at once (`selectedCandidateId`) and served a few seconds later (`servingCandidateId`). The first pick makes the avatar `ready`; a later one switches without downtime, with `rebuilding` true until it serves.
- **Older versions**: picking a restorable take of an older version (`current: false`, `restorable: true`) restores that version's portrait, voice sample, preview message and default-sentence language in one step. Other settings stay as they are, nothing is captured or charged, and the newer version's unfinished takes are cancelled.
- **Moderation**: inputs already checked together are not checked again; a combination never checked is moderated like an edit.
- Queued, failed and superseded candidates cannot be selected (`409 candidate_not_ready`). Selecting the current pick again is always allowed.
Takes a body of the `application/json` content type.
Corresponds with PUT /v1/avatars/{avatarId}/selected_candidate (the `SelectAvatarCandidate` operationId).
func (*Client) SelectAvatarCandidateWithBody ¶
func (c *Client) SelectAvatarCandidateWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SelectAvatarCandidateWithBody Select a candidate
Picks the completed candidate a v2 avatar serves. The pick is recorded at once (`selectedCandidateId`) and served a few seconds later (`servingCandidateId`). The first pick makes the avatar `ready`; a later one switches without downtime, with `rebuilding` true until it serves.
- **Older versions**: picking a restorable take of an older version (`current: false`, `restorable: true`) restores that version's portrait, voice sample, preview message and default-sentence language in one step. Other settings stay as they are, nothing is captured or charged, and the newer version's unfinished takes are cancelled.
- **Moderation**: inputs already checked together are not checked again; a combination never checked is moderated like an edit.
- Queued, failed and superseded candidates cannot be selected (`409 candidate_not_ready`). Selecting the current pick again is always allowed.
Takes any type of body and a specified content type.
Corresponds with PUT /v1/avatars/{avatarId}/selected_candidate (the `SelectAvatarCandidate` operationId).
func (*Client) SetAvatarConductor ¶
func (c *Client) SetAvatarConductor(ctx context.Context, avatarId AvatarIdPath, body SetAvatarConductorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
SetAvatarConductor Set the conductor
Gives a v2 avatar's conversations an agenda: a graph of steps, each with instructions for the avatar and edges that say when to move on. It replaces any earlier conductor, including one the avatar's own configuration carries, and applies from the next session. Nothing is rebuilt.
- **How it runs**: after each turn, a judge model scores each edge's `when` condition. Edges without a condition share the chance that none holds, by `weight`. The step takes its likeliest edge, or draws one when `random`. A step without edges is the end. A `speak` edge lets the avatar go on without waiting for the user, `speakAfterS` seconds later.
- **Validation**: the graph is checked before it is saved. `400 invalid_conductor` names the field (e.g. `/graph/nodes/2/edges/0/weight`); a value of the wrong JSON type is `422`. Per-field limits are on the schema.
- **Limits**: at most 100 nodes and 100 edges, and 150,000 characters of graph JSON (non-ASCII characters count as their `\uXXXX` escapes). The request body may be up to 512 KiB. A session whose whole configuration would be too large starts without the conductor.
- v1 avatars are refused (`409 not_v2_avatar`).
Takes a body of the `application/json` content type.
Corresponds with PUT /v1/avatars/{avatarId}/conductor (the `SetAvatarConductor` operationId).
func (*Client) SetAvatarConductorWithBody ¶
func (c *Client) SetAvatarConductorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SetAvatarConductorWithBody Set the conductor
Gives a v2 avatar's conversations an agenda: a graph of steps, each with instructions for the avatar and edges that say when to move on. It replaces any earlier conductor, including one the avatar's own configuration carries, and applies from the next session. Nothing is rebuilt.
- **How it runs**: after each turn, a judge model scores each edge's `when` condition. Edges without a condition share the chance that none holds, by `weight`. The step takes its likeliest edge, or draws one when `random`. A step without edges is the end. A `speak` edge lets the avatar go on without waiting for the user, `speakAfterS` seconds later.
- **Validation**: the graph is checked before it is saved. `400 invalid_conductor` names the field (e.g. `/graph/nodes/2/edges/0/weight`); a value of the wrong JSON type is `422`. Per-field limits are on the schema.
- **Limits**: at most 100 nodes and 100 edges, and 150,000 characters of graph JSON (non-ASCII characters count as their `\uXXXX` escapes). The request body may be up to 512 KiB. A session whose whole configuration would be too large starts without the conductor.
- v1 avatars are refused (`409 not_v2_avatar`).
Takes any type of body and a specified content type.
Corresponds with PUT /v1/avatars/{avatarId}/conductor (the `SetAvatarConductor` operationId).
func (*Client) StartEmbedSession ¶
func (c *Client) StartEmbedSession(ctx context.Context, body StartEmbedSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
StartEmbedSession Start an embed avatar session (API-key authenticated, LiveKit only)
Starts a session on behalf of an embed API key instead of a signed-in user. Called by the customer's own backend — never a browser — with `X-Api-Key` in place of a JWT. Always LiveKit; there is no `framework` field. Responds 201 only once the avatar has actually joined the room, and returns `serverUrl`/`roomName` as explicit fields (not a combined `roomUrl`), since that's what `livekit-client`'s `Room.connect()` needs directly.
**Length.** `maxDurationSeconds` is capped server-side at the smallest of the key's own `maxSessionSeconds`, the plan's `limits.maxSessionSeconds` (`GET /v1/account`) and, for `reserve` billing, what the balance can pay for. The response reports what you asked for (`requestedDurationSeconds`), what you got (`actualDurationSeconds`) and whether it was cut (`durationCapped`). The granted length counts from the moment both the visitor and the avatar are in the room, which is also when billing starts.
**Joining and ending.** The visitor must join within 60 seconds of the avatar; otherwise the session ends `failed` with `endReason: no_user_joined` and nothing is billed. End it early with `POST /v1/session/{id}/end`; read its state, end reason and cost with `GET /v1/avatar_sessions/{id}`. An avatar renders one live conversation at a time: a second start on an avatar that is already in a live session of the account answers `409 avatar_busy`.
**App tools.** `appTools.tools` declares functions the avatar may call during the conversation, with `appTools.instructions` saying how and when to use them. Every call reaches the visitor's LiveKit client as an RPC (method `atmee.tool`, payload `{id, name, arguments}`): register a handler for it on the room's local participant; with `x-atmee.mode` `await` its answer is the result the avatar is given. Tools run on Causeur, the conversation runtime v2 avatars are moving to. A session the behavior module runs (every v1 avatar, and a v2 avatar not yet moved) accepts them and never calls them: which runtime serves a session is decided at launch, not by the request, so the start cannot refuse them. A rule broken answers `400 invalid_tools`, the message naming it; so does a tool set that would push the session over Causeur's payload limit with the avatar's own config. The request body may be up to 128 KiB.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/session (the `StartEmbedSession` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
func (*Client) StartEmbedSessionWithBody ¶
func (c *Client) StartEmbedSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
StartEmbedSessionWithBody Start an embed avatar session (API-key authenticated, LiveKit only)
Starts a session on behalf of an embed API key instead of a signed-in user. Called by the customer's own backend — never a browser — with `X-Api-Key` in place of a JWT. Always LiveKit; there is no `framework` field. Responds 201 only once the avatar has actually joined the room, and returns `serverUrl`/`roomName` as explicit fields (not a combined `roomUrl`), since that's what `livekit-client`'s `Room.connect()` needs directly.
**Length.** `maxDurationSeconds` is capped server-side at the smallest of the key's own `maxSessionSeconds`, the plan's `limits.maxSessionSeconds` (`GET /v1/account`) and, for `reserve` billing, what the balance can pay for. The response reports what you asked for (`requestedDurationSeconds`), what you got (`actualDurationSeconds`) and whether it was cut (`durationCapped`). The granted length counts from the moment both the visitor and the avatar are in the room, which is also when billing starts.
**Joining and ending.** The visitor must join within 60 seconds of the avatar; otherwise the session ends `failed` with `endReason: no_user_joined` and nothing is billed. End it early with `POST /v1/session/{id}/end`; read its state, end reason and cost with `GET /v1/avatar_sessions/{id}`. An avatar renders one live conversation at a time: a second start on an avatar that is already in a live session of the account answers `409 avatar_busy`.
**App tools.** `appTools.tools` declares functions the avatar may call during the conversation, with `appTools.instructions` saying how and when to use them. Every call reaches the visitor's LiveKit client as an RPC (method `atmee.tool`, payload `{id, name, arguments}`): register a handler for it on the room's local participant; with `x-atmee.mode` `await` its answer is the result the avatar is given. Tools run on Causeur, the conversation runtime v2 avatars are moving to. A session the behavior module runs (every v1 avatar, and a v2 avatar not yet moved) accepts them and never calls them: which runtime serves a session is decided at launch, not by the request, so the start cannot refuse them. A rule broken answers `400 invalid_tools`, the message naming it; so does a tool set that would push the session over Causeur's payload limit with the avatar's own config. The request body may be up to 128 KiB.
Takes any type of body and a specified content type.
Corresponds with POST /v1/session (the `StartEmbedSession` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
func (*Client) UpdateApiKey ¶
func (c *Client) UpdateApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateApiKey Edit an API key's scopes and limits (signed-in user only)
Changes the fields sent; the secret stays. `scopes` replaces the whole set (`sessions` is always kept). `avatarId` binds the key to one avatar, and `null` widens it to the whole account. The plan's ceilings are applied again on every edit, also to limits not sent, so the answer can show lower limits than before: read them from it.
Only the account's owner or an admin may edit a key; an API key is answered `403 login_required`. A revoked key is `409 api_key_revoked`.
Takes a body of the `application/json` content type.
Corresponds with PATCH /v1/api_keys/{apiKeyId} (the `UpdateApiKey` operationId).
func (*Client) UpdateApiKeyWithBody ¶
func (c *Client) UpdateApiKeyWithBody(ctx context.Context, apiKeyId ApiKeyIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateApiKeyWithBody Edit an API key's scopes and limits (signed-in user only)
Changes the fields sent; the secret stays. `scopes` replaces the whole set (`sessions` is always kept). `avatarId` binds the key to one avatar, and `null` widens it to the whole account. The plan's ceilings are applied again on every edit, also to limits not sent, so the answer can show lower limits than before: read them from it.
Only the account's owner or an admin may edit a key; an API key is answered `403 login_required`. A revoked key is `409 api_key_revoked`.
Takes any type of body and a specified content type.
Corresponds with PATCH /v1/api_keys/{apiKeyId} (the `UpdateApiKey` operationId).
func (*Client) UpdateAvatar ¶
func (c *Client) UpdateAvatar(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateAvatar Update an avatar
Changes an avatar's settings, persona, knowledge or share card, and returns the avatar. Send only the fields to change: an absent or `null` field stays as it is, and an empty value (`""`, `[]` or `{}`) clears an optional one.
- **Persona edits** rebuild the persona in the background and are moderated again. A v1 avatar is briefly not ready; a v2 avatar keeps serving until the new persona is live.
- **v2 build inputs**: a new `previewMessage` or `resolution` builds a new version with new candidates, like a new portrait or voice, while the serving candidate keeps serving. `blackoutRecovery` and `runtimeSeed` apply from the next session and rebuild nothing.
- **Knowledge**: knowledge files stay; replace them with `PUT /v1/avatars/{avatarId}/knowledge`.
- **Visibility**: `public` needs a title, a tag, a subtitle, a description and a thumbnail (`409 public_requirements_missing` lists what is missing). `public` and `unlisted` must pass moderation (`409 moderation_blocked`).
- **Atomicity**: every field is checked first. The name, description, share fields, statement, monetization and visibility are written together, and a refusal of any of them writes nothing. The rest is written after, so after a later error, send the same request again to retry.
| Field | Rule | |---|---| | `name` | At most 100 characters once trimmed, counted in UTF-16 units (`400 name_invalid`). | | `whoPrompt`, `whatPrompt`, `selfIntroduction` | Cannot be emptied: `""` is `422`, and so is a blank `selfIntroduction` under 51 characters. Other blank text is `400 invalid_manifest`. | | `personality`, `scenario` | Older names of `whoPrompt` and `whatPrompt`, at the top level or in `persona`. A field given twice is `400 invalid_body`. | | `previewMessage` | `""` goes back to the default sentence. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). | | `knowledge.facts` | Replaces the knowledge text, at most 32,000 characters; `""` removes it. | | `knowledge.questionnaire` | Replaces Creator Studio's questionnaire answers, question to answer; `{}` removes them. An unknown question, or a blank answer or one over 2,000 characters, is `400 invalid_manifest`. | | `title`, `subtitle`, `description` | Share card text, at most 100, 200 and 280 characters; `""` clears it. | | `tags`, `socialLinks` | Whole sets; `[]` clears them. At most 5 tags, each with a letter or digit. Each platform's link at most once, an https URL of at most 500 characters. | | `statementType` | Who the avatar depicts; `""` resets it. It cannot change while the avatar is monetized (`409 avatar_is_earning`), and changing it clears `verified`. | | `monetization` | `enabled` turns monetization on or off. On needs a verified avatar or the fictional statement, verified payouts, the 30-day eligibility and room under the plan's cap (each a `409`), and `confirmSponsorWithdrawal: true` when the sponsor pool holds credits, which turning it on withdraws to the account. Off always works. |
Takes a body of the `application/json` content type.
Corresponds with PATCH /v1/avatars/{avatarId} (the `UpdateAvatar` operationId).
func (*Client) UpdateAvatarSponsor ¶
func (c *Client) UpdateAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateAvatarSponsor Update sponsor settings
Changes who may spend the avatar's sponsor pool, and when. The request applies all of its fields or none.
- `anonymousAccess: true` lets visitors without an account spend the pool. The avatar must be funded first (`409 avatar_not_budget_managed`: grant credits or turn on auto top-up) and public or unlisted (`409 avatar_not_shared`).
- `autoTopupEnabled: true` needs a threshold and an amount, sent or already stored (`400 auto_topup_incomplete`).
- A monetized avatar cannot be sponsored (`409 monetized_avatar_cannot_be_sponsored`).
Takes a body of the `application/json` content type.
Corresponds with PATCH /v1/avatars/{avatarId}/sponsor (the `UpdateAvatarSponsor` operationId).
func (*Client) UpdateAvatarSponsorWithBody ¶
func (c *Client) UpdateAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateAvatarSponsorWithBody Update sponsor settings
Changes who may spend the avatar's sponsor pool, and when. The request applies all of its fields or none.
- `anonymousAccess: true` lets visitors without an account spend the pool. The avatar must be funded first (`409 avatar_not_budget_managed`: grant credits or turn on auto top-up) and public or unlisted (`409 avatar_not_shared`).
- `autoTopupEnabled: true` needs a threshold and an amount, sent or already stored (`400 auto_topup_incomplete`).
- A monetized avatar cannot be sponsored (`409 monetized_avatar_cannot_be_sponsored`).
Takes any type of body and a specified content type.
Corresponds with PATCH /v1/avatars/{avatarId}/sponsor (the `UpdateAvatarSponsor` operationId).
func (*Client) UpdateAvatarWithBody ¶
func (c *Client) UpdateAvatarWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateAvatarWithBody Update an avatar
Changes an avatar's settings, persona, knowledge or share card, and returns the avatar. Send only the fields to change: an absent or `null` field stays as it is, and an empty value (`""`, `[]` or `{}`) clears an optional one.
- **Persona edits** rebuild the persona in the background and are moderated again. A v1 avatar is briefly not ready; a v2 avatar keeps serving until the new persona is live.
- **v2 build inputs**: a new `previewMessage` or `resolution` builds a new version with new candidates, like a new portrait or voice, while the serving candidate keeps serving. `blackoutRecovery` and `runtimeSeed` apply from the next session and rebuild nothing.
- **Knowledge**: knowledge files stay; replace them with `PUT /v1/avatars/{avatarId}/knowledge`.
- **Visibility**: `public` needs a title, a tag, a subtitle, a description and a thumbnail (`409 public_requirements_missing` lists what is missing). `public` and `unlisted` must pass moderation (`409 moderation_blocked`).
- **Atomicity**: every field is checked first. The name, description, share fields, statement, monetization and visibility are written together, and a refusal of any of them writes nothing. The rest is written after, so after a later error, send the same request again to retry.
| Field | Rule | |---|---| | `name` | At most 100 characters once trimmed, counted in UTF-16 units (`400 name_invalid`). | | `whoPrompt`, `whatPrompt`, `selfIntroduction` | Cannot be emptied: `""` is `422`, and so is a blank `selfIntroduction` under 51 characters. Other blank text is `400 invalid_manifest`. | | `personality`, `scenario` | Older names of `whoPrompt` and `whatPrompt`, at the top level or in `persona`. A field given twice is `400 invalid_body`. | | `previewMessage` | `""` goes back to the default sentence. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). | | `knowledge.facts` | Replaces the knowledge text, at most 32,000 characters; `""` removes it. | | `knowledge.questionnaire` | Replaces Creator Studio's questionnaire answers, question to answer; `{}` removes them. An unknown question, or a blank answer or one over 2,000 characters, is `400 invalid_manifest`. | | `title`, `subtitle`, `description` | Share card text, at most 100, 200 and 280 characters; `""` clears it. | | `tags`, `socialLinks` | Whole sets; `[]` clears them. At most 5 tags, each with a letter or digit. Each platform's link at most once, an https URL of at most 500 characters. | | `statementType` | Who the avatar depicts; `""` resets it. It cannot change while the avatar is monetized (`409 avatar_is_earning`), and changing it clears `verified`. | | `monetization` | `enabled` turns monetization on or off. On needs a verified avatar or the fictional statement, verified payouts, the 30-day eligibility and room under the plan's cap (each a `409`), and `confirmSponsorWithdrawal: true` when the sponsor pool holds credits, which turning it on withdraws to the account. Off always works. |
Takes any type of body and a specified content type.
Corresponds with PATCH /v1/avatars/{avatarId} (the `UpdateAvatar` operationId).
func (*Client) WithdrawAvatarSponsor ¶
func (c *Client) WithdrawAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, body WithdrawAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
WithdrawAvatarSponsor Withdraw sponsor credits
Returns the sponsor pool's unreserved credits to the account.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/avatars/{avatarId}/sponsor/withdrawals (the `WithdrawAvatarSponsor` operationId).
func (*Client) WithdrawAvatarSponsorWithBody ¶
func (c *Client) WithdrawAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
WithdrawAvatarSponsorWithBody Withdraw sponsor credits
Returns the sponsor pool's unreserved credits to the account.
Takes any type of body and a specified content type.
Corresponds with POST /v1/avatars/{avatarId}/sponsor/withdrawals (the `WithdrawAvatarSponsor` operationId).
type ClientInterface ¶
type ClientInterface interface {
// GetAccount Get the account
//
// Returns the account's plan, its API limits, its prices and its v2
// capture quota. Prices are in microcredits (100 microcredits = 1 credit).
//
// - **Plan**: the current plan, and the one it changes to at the end of
// the cycle, if any.
// - **Pricing**: the per-minute price of each kind of session (a
// conversation or a render, by avatar engine, and a speech session), a
// preview clip, and each generation call where generation is offered
// (`pricing.generation`).
// - **Limits**: an absent limit or plan field is not set (an absent limit
// is not capped by the plan).
// - **v2**: `v2Access` says whether the account may build v2 avatars;
// `captureQuota` counts v2 captures queued or running against the cap.
// - **Payouts**: `payouts` says whether the account can be paid out, which
// monetizing an avatar needs.
// - Readable by the same callers as `GET /v1/account/balance`.
//
// Corresponds with GET /v1/account (the `GetAccount` operationId).
GetAccount(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAccountBalance Get the balance
//
// Returns the credits the account can spend on sessions, in microcredits
// (100 microcredits = 1 credit). An avatar's sponsor pool is not included
// (see `GET /v1/avatars/{avatarId}/sponsor`).
//
// - `spendableMicrocredits` is what a session is admitted on: every bucket
// for a reserve-mode key or a signed-in user, only the plan and top-up
// buckets for a metered key (`couponSpendable: false`).
// - Live sessions' reservations are already taken out, and reported as
// `heldByLiveSessionsMicrocredits`.
// - `unlimited` is true when sessions are not charged, whatever the
// buckets say.
// - `nextExpiry` lists the credits that will expire, soonest first.
// - Readable by any key with `sessions` or `avatars:read` (an
// avatar-scoped key included), or a signed-in user of the account.
//
// Corresponds with GET /v1/account/balance (the `GetAccountBalance` operationId).
GetAccountBalance(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAccountEarnings Get earnings
//
// Returns what the account's monetized avatars earned, what was paid out,
// and the wallet balance between them, in microcredits (100 microcredits =
// 1 credit). This is not the balance sessions spend (`GET
// /v1/account/balance`); one avatar's earnings are in `GET
// /v1/avatars/{avatarId}/monetization`.
//
// Readable by an account-wide key with `avatars:read` or a signed-in user
// of the account; an avatar-scoped key gets `403 avatar_not_allowed`.
//
// Corresponds with GET /v1/account/earnings (the `GetAccountEarnings` operationId).
GetAccountEarnings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// RedeemAccountCodeWithBody Redeem a code
//
// Redeems an invite or credit code for the account. A code can add
// credits, open v2 avatars (invite-only for now; see `v2Access` on `GET
// /v1/account`), or both, and the answer says what it gave. Each account
// redeems a code at most once.
//
// Only a signed-in user may redeem: an API key gets `403 login_required`,
// so a leaked key cannot spend the account's codes. v2 access applies from
// the next request.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/account/redeem (the `RedeemAccountCode` operationId).
RedeemAccountCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// RedeemAccountCode Redeem a code
//
// Redeems an invite or credit code for the account. A code can add
// credits, open v2 avatars (invite-only for now; see `v2Access` on `GET
// /v1/account`), or both, and the answer says what it gave. Each account
// redeems a code at most once.
//
// Only a signed-in user may redeem: an API key gets `403 login_required`,
// so a leaked key cannot spend the account's codes. v2 access applies from
// the next request.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/account/redeem (the `RedeemAccountCode` operationId).
RedeemAccountCode(ctx context.Context, body RedeemAccountCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListApiKeys List the account's API keys (signed-in user only)
//
// Every API key of the account the user acts for, newest first,
// revoked ones included (`active: false`). The secrets are never
// returned: a key is recognised by `keyPrefix` and `lastFour`.
//
// Only a signed-in user may manage keys, and only the account's owner
// or an admin (a member is `403 owner_or_admin_required`): an API key
// is answered `403 login_required`, so a leaked key can never mint
// more keys. The owner or an admin may grant any scope, as in Studio.
//
// Corresponds with GET /v1/api_keys (the `ListApiKeys` operationId).
ListApiKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateApiKeyWithBody Create an API key (signed-in user only); the secret is shown once
//
// Creates a key for the account the user acts for and returns its
// secret in `apiKey`. **The secret is returned only here** (and by
// rotate): store it at once, in your backend's secret store or an
// environment variable, never in a browser or a repository.
//
// Keep keys narrow: give a key only the scopes it needs (`sessions` is
// always included), bind it to one avatar with `avatarId` when it
// serves one app, and set its own caps. Omitted caps take the plan's
// maximum; a value above the plan's is lowered to it. The spend cap
// defaults to 500 credits (50,000 microcredits) per `spendCapWindow`.
//
// Only a signed-in user may create keys, and only the account's owner
// or an admin: an API key is answered `403 login_required`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/api_keys (the `CreateApiKey` operationId).
CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateApiKey Create an API key (signed-in user only); the secret is shown once
//
// Creates a key for the account the user acts for and returns its
// secret in `apiKey`. **The secret is returned only here** (and by
// rotate): store it at once, in your backend's secret store or an
// environment variable, never in a browser or a repository.
//
// Keep keys narrow: give a key only the scopes it needs (`sessions` is
// always included), bind it to one avatar with `avatarId` when it
// serves one app, and set its own caps. Omitted caps take the plan's
// maximum; a value above the plan's is lowered to it. The spend cap
// defaults to 500 credits (50,000 microcredits) per `spendCapWindow`.
//
// Only a signed-in user may create keys, and only the account's owner
// or an admin: an API key is answered `403 login_required`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/api_keys (the `CreateApiKey` operationId).
CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCurrentApiKey Get the current credential
//
// Describes the credential making this call. Readable by the same callers
// as `GET /v1/account/balance`.
//
// - **API key** (`kind: api_key`): its name, scopes, the avatar it is
// restricted to, its billing mode, its session caps and how much of its
// spend cap the current window used. The secret is never returned.
// `spendCap.enforced` is false when the cap is not applied;
// `limitMicrocredits` and `remainingMicrocredits` are absent when the
// key has no cap, and `windowResetsAt` for a lifetime cap (`window:
// total`).
// - **Signed-in user** (`kind: user`): the user and the account it acts
// for. A user has no key, no scopes beyond the avatar ones and no spend
// cap.
//
// Corresponds with GET /v1/api_keys/current (the `GetCurrentApiKey` operationId).
GetCurrentApiKey(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// RevokeApiKey Revoke an API key (signed-in user only)
//
// Revokes the key for good: it stops authenticating within about 30
// seconds (a resolved key is cached that long); sessions it started
// keep running. Revoking a revoked key answers `200` again with the
// same key. Only the account's owner or an admin may revoke; an API
// key is answered `403 login_required`.
//
// Corresponds with DELETE /v1/api_keys/{apiKeyId} (the `RevokeApiKey` operationId).
RevokeApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateApiKeyWithBody Edit an API key's scopes and limits (signed-in user only)
//
// Changes the fields sent; the secret stays. `scopes` replaces the whole
// set (`sessions` is always kept). `avatarId` binds the key to one
// avatar, and `null` widens it to the whole account. The plan's ceilings
// are applied again on every edit, also to limits not sent, so the
// answer can show lower limits than before: read them from it.
//
// Only the account's owner or an admin may edit a key; an API key is
// answered `403 login_required`. A revoked key is `409 api_key_revoked`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PATCH /v1/api_keys/{apiKeyId} (the `UpdateApiKey` operationId).
UpdateApiKeyWithBody(ctx context.Context, apiKeyId ApiKeyIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateApiKey Edit an API key's scopes and limits (signed-in user only)
//
// Changes the fields sent; the secret stays. `scopes` replaces the whole
// set (`sessions` is always kept). `avatarId` binds the key to one
// avatar, and `null` widens it to the whole account. The plan's ceilings
// are applied again on every edit, also to limits not sent, so the
// answer can show lower limits than before: read them from it.
//
// Only the account's owner or an admin may edit a key; an API key is
// answered `403 login_required`. A revoked key is `409 api_key_revoked`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PATCH /v1/api_keys/{apiKeyId} (the `UpdateApiKey` operationId).
UpdateApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RotateApiKey Issue a new secret for an API key (signed-in user only); the old secret stops working
//
// Replaces the key's secret and returns the new one in `apiKey`, shown
// only here. The key keeps its id, name, scopes, avatar and caps; the
// old secret stops authenticating within about 30 seconds. A revoked
// key cannot be rotated (`409 api_key_revoked`). Only the account's
// owner or an admin may rotate; an API key is answered `403
// login_required`.
//
// Corresponds with POST /v1/api_keys/{apiKeyId}/rotate (the `RotateApiKey` operationId).
RotateApiKey(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvatarSession Get an avatar session
//
// Reads an API session's state, end reason and cost: a conversation (`POST
// /v1/sessions`, `kind: conversation`) or a render (`POST
// /v1/avatar_sessions`, `kind: render`).
//
// - `status` is `pending` (starting), `active` (live), `completed` (ended
// normally, including by you) or `failed` (it never really started;
// nothing is billed for time it did not run).
// - Once it ended, `endReason` says why, `failureCode` names the failure
// of a failed session, and `billedSeconds` and `chargedMicrocredits` say
// what it cost (100 microcredits = 1 credit).
// - Billing runs only while both the avatar and the visitor (or your
// agent) are in the room; `userJoinedAt` and `avatarJoinedAt` say when
// each joined.
//
// Corresponds with GET /v1/avatar_sessions/{id} (the `GetAvatarSession` operationId).
GetAvatarSession(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// EndAvatarSession End an avatar session
//
// Ends an API session now and stops billing. It settles `completed` with
// `endReason: ended_by_api`. For a conversation, this is the same as `POST
// /v1/sessions/{id}/end` with an API key.
//
// - **Idempotent**: a session that already ended answers `200` with
// `alreadyEnded: true`, so it is safe to call from every teardown path.
// - **Renders** usually end on their own when your agent leaves, the room
// closes or you remove the avatar participant. Call this to stop paying
// while your room stays open; it does not remove the avatar from your
// room, so remove the participant yourself.
// - **Conversations**: the room is closed.
// - Only sessions started through the API can be ended here (website
// sessions are `404`), and an avatar-scoped key ends only its avatar's.
//
// Corresponds with POST /v1/avatar_sessions/{id}/end (the `EndAvatarSession` operationId).
EndAvatarSession(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListAvatars List avatars
//
// Lists the account's avatars, newest first. Page with `before`.
//
// Corresponds with GET /v1/avatars (the `ListAvatars` operationId).
ListAvatars(ctx context.Context, params *ListAvatarsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAvatarWithBody Create an avatar
//
// Creates an avatar from a portrait, a voice sample, a persona and
// knowledge. A complete avatar builds in the background (`202`, `status:
// building`): follow it with `GET /v1/avatars/{avatarId}`.
//
// Send one of three body shapes:
//
// | Body | Content type | Contents |
// |---|---|---|
// | Image | `multipart/form-data` | The portrait as the `file` part, plus `name` (and optional `description`). Makes a render-only avatar: `201`, `ready` at once. Add a voice later to make it talk. |
// | Zip | `multipart/form-data` (`file`) or `application/zip` | `avatar.json` plus `image/`, `voice/`, `prompt/prompt.txt` and `knowledge/`. |
// | JSON | `application/json` | The manifest, with an `assets` block naming each file by https URL or `upload:<uploadId>`. |
//
// - **Engine**: `engine` is `v1` (default) or `v2`. A v2 create captures
// `seedPreviews.count` candidates and, with `seedSelection: auto`
// (default), serves the first that completes. v2 is invite-only (`403
// v2_access_required`).
// - **Drafts**: the portrait and the voice are optional in zip and JSON
// bodies. Without either (other than a v1 avatar with a portrait, which
// is render-only) the avatar is a `draft`, and `missingInputs` names
// what to add with `PUT /v1/avatars/{avatarId}/appearance` or
// `PUT /v1/avatars/{avatarId}/voice`.
// - **Portrait**: use a front-facing photo of one person, head and
// shoulders, the face at least a third of the frame, in even light, with
// the lips slightly parted. A clearly bad portrait fails the
// `appearance` stage with a `portrait_*` reason.
// - **Uploads**: a create that succeeds consumes its uploads; one that
// fails leaves them usable for a retry.
// - **Captures** count against the account's limit of 10 queued or
// running. A v2 create returns `X-RateLimit-Limit` and
// `X-RateLimit-Remaining`, and `429 rate_limited` when the captures do
// not fit.
// - **Scopes**: `avatars:write`, plus `billing:write` with a `sponsor`
// block.
//
// | Manifest field | Rule |
// |---|---|
// | `persona` | `whoPrompt` (who the avatar is), `whatPrompt` (what it does with the visitor; in a zip, `prompt/prompt.txt` instead, not both), `preferredAlias`, `spokenName`, `knownAliases`, `greeting`, `selfIntroduction` (derived from `whoPrompt` when absent), `guardrails`, `conversationalHabits`. `personality` and `scenario` are older names of `whoPrompt` and `whatPrompt`; a field under both names is `400 invalid_manifest`. |
// | `previewMessage` | The line preview clips speak; omit it for a default sentence in the avatar's language. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). |
// | `previews` | `true` generates preview clips (default off; change it with PATCH). |
// | `seedPreviews`, `seedSelection` | v2 only, and only with the portrait and the voice: `count` candidates (default 1, at most 10), and `auto` (default) or `manual` selection. |
// | `knowledge.facts` | The avatar's knowledge as text, at most 32,000 characters (`400 invalid_manifest`). |
// | `knowledge.questionnaire` | Answers to Creator Studio's knowledge questions (listed by `GET /v1/avatars/{avatarId}/knowledge`), each at most 2,000 characters. |
// | `knowledge.descriptions` | Maps a knowledge file name to a short description. |
// | `blackoutRecovery`, `runtimeSeed`, `resolution` | v2 render settings (see their schemas). v1 avatars ignore the first two and refuse `resolution` (`400 invalid_input`). |
// | `aspectRatio` | v2 only: the avatar's shape, `square` (default, 512 × 512), `portrait` (384 × 640) or `landscape` (640 × 384); see `AspectRatio`. `resolution` names a size this deployment offers instead; send one or the other, not both. v1 avatars refuse it (`400 invalid_input`). |
//
// v2 conversations do not use knowledge yet.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/avatars (the `CreateAvatar` operationId).
CreateAvatarWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAvatar Create an avatar
//
// Creates an avatar from a portrait, a voice sample, a persona and
// knowledge. A complete avatar builds in the background (`202`, `status:
// building`): follow it with `GET /v1/avatars/{avatarId}`.
//
// Send one of three body shapes:
//
// | Body | Content type | Contents |
// |---|---|---|
// | Image | `multipart/form-data` | The portrait as the `file` part, plus `name` (and optional `description`). Makes a render-only avatar: `201`, `ready` at once. Add a voice later to make it talk. |
// | Zip | `multipart/form-data` (`file`) or `application/zip` | `avatar.json` plus `image/`, `voice/`, `prompt/prompt.txt` and `knowledge/`. |
// | JSON | `application/json` | The manifest, with an `assets` block naming each file by https URL or `upload:<uploadId>`. |
//
// - **Engine**: `engine` is `v1` (default) or `v2`. A v2 create captures
// `seedPreviews.count` candidates and, with `seedSelection: auto`
// (default), serves the first that completes. v2 is invite-only (`403
// v2_access_required`).
// - **Drafts**: the portrait and the voice are optional in zip and JSON
// bodies. Without either (other than a v1 avatar with a portrait, which
// is render-only) the avatar is a `draft`, and `missingInputs` names
// what to add with `PUT /v1/avatars/{avatarId}/appearance` or
// `PUT /v1/avatars/{avatarId}/voice`.
// - **Portrait**: use a front-facing photo of one person, head and
// shoulders, the face at least a third of the frame, in even light, with
// the lips slightly parted. A clearly bad portrait fails the
// `appearance` stage with a `portrait_*` reason.
// - **Uploads**: a create that succeeds consumes its uploads; one that
// fails leaves them usable for a retry.
// - **Captures** count against the account's limit of 10 queued or
// running. A v2 create returns `X-RateLimit-Limit` and
// `X-RateLimit-Remaining`, and `429 rate_limited` when the captures do
// not fit.
// - **Scopes**: `avatars:write`, plus `billing:write` with a `sponsor`
// block.
//
// | Manifest field | Rule |
// |---|---|
// | `persona` | `whoPrompt` (who the avatar is), `whatPrompt` (what it does with the visitor; in a zip, `prompt/prompt.txt` instead, not both), `preferredAlias`, `spokenName`, `knownAliases`, `greeting`, `selfIntroduction` (derived from `whoPrompt` when absent), `guardrails`, `conversationalHabits`. `personality` and `scenario` are older names of `whoPrompt` and `whatPrompt`; a field under both names is `400 invalid_manifest`. |
// | `previewMessage` | The line preview clips speak; omit it for a default sentence in the avatar's language. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). |
// | `previews` | `true` generates preview clips (default off; change it with PATCH). |
// | `seedPreviews`, `seedSelection` | v2 only, and only with the portrait and the voice: `count` candidates (default 1, at most 10), and `auto` (default) or `manual` selection. |
// | `knowledge.facts` | The avatar's knowledge as text, at most 32,000 characters (`400 invalid_manifest`). |
// | `knowledge.questionnaire` | Answers to Creator Studio's knowledge questions (listed by `GET /v1/avatars/{avatarId}/knowledge`), each at most 2,000 characters. |
// | `knowledge.descriptions` | Maps a knowledge file name to a short description. |
// | `blackoutRecovery`, `runtimeSeed`, `resolution` | v2 render settings (see their schemas). v1 avatars ignore the first two and refuse `resolution` (`400 invalid_input`). |
// | `aspectRatio` | v2 only: the avatar's shape, `square` (default, 512 × 512), `portrait` (384 × 640) or `landscape` (640 × 384); see `AspectRatio`. `resolution` names a size this deployment offers instead; send one or the other, not both. v1 avatars refuse it (`400 invalid_input`). |
//
// v2 conversations do not use knowledge yet.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/avatars (the `CreateAvatar` operationId).
CreateAvatar(ctx context.Context, body CreateAvatarJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAvatar Delete an avatar
//
// Deletes the avatar: it disappears from the API at once and its
// unfinished captures are cancelled. Its files, every version's included,
// are removed permanently after the retention period.
//
// Corresponds with DELETE /v1/avatars/{avatarId} (the `DeleteAvatar` operationId).
DeleteAvatar(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvatar Get an avatar
//
// Returns the avatar's settings and its build status, stage by stage.
// Poll it after a create or a change: `stages` and `rebuilding` show
// progress, and `status` says when it needs you (`failed`,
// `awaiting_selection`, `stalled`, `draft`). A v2 avatar stays `ready`
// while a new version builds; when that build needs a candidate picked,
// `selectionRequired` turns true while `status` stays `ready`.
//
// Corresponds with GET /v1/avatars/{avatarId} (the `GetAvatar` operationId).
GetAvatar(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateAvatarWithBody Update an avatar
//
// Changes an avatar's settings, persona, knowledge or share card, and
// returns the avatar. Send only the fields to change: an absent or `null`
// field stays as it is, and an empty value (`""`, `[]` or `{}`) clears an
// optional one.
//
// - **Persona edits** rebuild the persona in the background and are
// moderated again. A v1 avatar is briefly not ready; a v2 avatar keeps
// serving until the new persona is live.
// - **v2 build inputs**: a new `previewMessage` or `resolution` builds a
// new version with new candidates, like a new portrait or voice, while
// the serving candidate keeps serving. `blackoutRecovery` and
// `runtimeSeed` apply from the next session and rebuild nothing.
// - **Knowledge**: knowledge files stay; replace them with `PUT
// /v1/avatars/{avatarId}/knowledge`.
// - **Visibility**: `public` needs a title, a tag, a subtitle, a
// description and a thumbnail (`409 public_requirements_missing` lists
// what is missing). `public` and `unlisted` must pass moderation (`409
// moderation_blocked`).
// - **Atomicity**: every field is checked first. The name, description,
// share fields, statement, monetization and visibility are written
// together, and a refusal of any of them writes nothing. The rest is
// written after, so after a later error, send the same request again to
// retry.
//
// | Field | Rule |
// |---|---|
// | `name` | At most 100 characters once trimmed, counted in UTF-16 units (`400 name_invalid`). |
// | `whoPrompt`, `whatPrompt`, `selfIntroduction` | Cannot be emptied: `""` is `422`, and so is a blank `selfIntroduction` under 51 characters. Other blank text is `400 invalid_manifest`. |
// | `personality`, `scenario` | Older names of `whoPrompt` and `whatPrompt`, at the top level or in `persona`. A field given twice is `400 invalid_body`. |
// | `previewMessage` | `""` goes back to the default sentence. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). |
// | `knowledge.facts` | Replaces the knowledge text, at most 32,000 characters; `""` removes it. |
// | `knowledge.questionnaire` | Replaces Creator Studio's questionnaire answers, question to answer; `{}` removes them. An unknown question, or a blank answer or one over 2,000 characters, is `400 invalid_manifest`. |
// | `title`, `subtitle`, `description` | Share card text, at most 100, 200 and 280 characters; `""` clears it. |
// | `tags`, `socialLinks` | Whole sets; `[]` clears them. At most 5 tags, each with a letter or digit. Each platform's link at most once, an https URL of at most 500 characters. |
// | `statementType` | Who the avatar depicts; `""` resets it. It cannot change while the avatar is monetized (`409 avatar_is_earning`), and changing it clears `verified`. |
// | `monetization` | `enabled` turns monetization on or off. On needs a verified avatar or the fictional statement, verified payouts, the 30-day eligibility and room under the plan's cap (each a `409`), and `confirmSponsorWithdrawal: true` when the sponsor pool holds credits, which turning it on withdraws to the account. Off always works. |
//
// Takes any type of body and a specified content type.
//
// Corresponds with PATCH /v1/avatars/{avatarId} (the `UpdateAvatar` operationId).
UpdateAvatarWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateAvatar Update an avatar
//
// Changes an avatar's settings, persona, knowledge or share card, and
// returns the avatar. Send only the fields to change: an absent or `null`
// field stays as it is, and an empty value (`""`, `[]` or `{}`) clears an
// optional one.
//
// - **Persona edits** rebuild the persona in the background and are
// moderated again. A v1 avatar is briefly not ready; a v2 avatar keeps
// serving until the new persona is live.
// - **v2 build inputs**: a new `previewMessage` or `resolution` builds a
// new version with new candidates, like a new portrait or voice, while
// the serving candidate keeps serving. `blackoutRecovery` and
// `runtimeSeed` apply from the next session and rebuild nothing.
// - **Knowledge**: knowledge files stay; replace them with `PUT
// /v1/avatars/{avatarId}/knowledge`.
// - **Visibility**: `public` needs a title, a tag, a subtitle, a
// description and a thumbnail (`409 public_requirements_missing` lists
// what is missing). `public` and `unlisted` must pass moderation (`409
// moderation_blocked`).
// - **Atomicity**: every field is checked first. The name, description,
// share fields, statement, monetization and visibility are written
// together, and a refusal of any of them writes nothing. The rest is
// written after, so after a later error, send the same request again to
// retry.
//
// | Field | Rule |
// |---|---|
// | `name` | At most 100 characters once trimmed, counted in UTF-16 units (`400 name_invalid`). |
// | `whoPrompt`, `whatPrompt`, `selfIntroduction` | Cannot be emptied: `""` is `422`, and so is a blank `selfIntroduction` under 51 characters. Other blank text is `400 invalid_manifest`. |
// | `personality`, `scenario` | Older names of `whoPrompt` and `whatPrompt`, at the top level or in `persona`. A field given twice is `400 invalid_body`. |
// | `previewMessage` | `""` goes back to the default sentence. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). |
// | `knowledge.facts` | Replaces the knowledge text, at most 32,000 characters; `""` removes it. |
// | `knowledge.questionnaire` | Replaces Creator Studio's questionnaire answers, question to answer; `{}` removes them. An unknown question, or a blank answer or one over 2,000 characters, is `400 invalid_manifest`. |
// | `title`, `subtitle`, `description` | Share card text, at most 100, 200 and 280 characters; `""` clears it. |
// | `tags`, `socialLinks` | Whole sets; `[]` clears them. At most 5 tags, each with a letter or digit. Each platform's link at most once, an https URL of at most 500 characters. |
// | `statementType` | Who the avatar depicts; `""` resets it. It cannot change while the avatar is monetized (`409 avatar_is_earning`), and changing it clears `verified`. |
// | `monetization` | `enabled` turns monetization on or off. On needs a verified avatar or the fictional statement, verified payouts, the 30-day eligibility and room under the plan's cap (each a `409`), and `confirmSponsorWithdrawal: true` when the sponsor pool holds credits, which turning it on withdraws to the account. Off always works. |
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PATCH /v1/avatars/{avatarId} (the `UpdateAvatar` operationId).
UpdateAvatar(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvatarAppearance Get the portrait
//
// Returns a presigned URL of the portrait last given. The URL expires
// after about an hour.
//
// Corresponds with GET /v1/avatars/{avatarId}/appearance (the `GetAvatarAppearance` operationId).
GetAvatarAppearance(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceAvatarAppearanceWithBody Replace the portrait
//
// Replaces the avatar's portrait and re-runs the build stages that depend
// on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its
// portrait this way (on v2, the first candidate is captured once the voice
// is there too).
//
// - **Body**: the image (jpg, png or webp, up to 10 MB) as the `file` part
// of `multipart/form-data`. Where `POST /v1/uploads` is available, JSON
// `{"image": "<https URL or upload:<uploadId>>"}` also works, with a
// `portrait` upload consumed on success.
// - **Portrait**: front-facing, head and shoulders with some margin around
// the head, the face at least a third of the frame, in even light, with
// the lips slightly parted. A clearly bad portrait fails the
// `appearance` stage with a `portrait_*` reason.
// - **Scope**: `avatars:write`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/appearance (the `ReplaceAvatarAppearance` operationId).
ReplaceAvatarAppearanceWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceAvatarAppearance Replace the portrait
//
// Replaces the avatar's portrait and re-runs the build stages that depend
// on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its
// portrait this way (on v2, the first candidate is captured once the voice
// is there too).
//
// - **Body**: the image (jpg, png or webp, up to 10 MB) as the `file` part
// of `multipart/form-data`. Where `POST /v1/uploads` is available, JSON
// `{"image": "<https URL or upload:<uploadId>>"}` also works, with a
// `portrait` upload consumed on success.
// - **Portrait**: front-facing, head and shoulders with some margin around
// the head, the face at least a third of the frame, in even light, with
// the lips slightly parted. A clearly bad portrait fails the
// `appearance` stage with a `portrait_*` reason.
// - **Scope**: `avatars:write`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/appearance (the `ReplaceAvatarAppearance` operationId).
ReplaceAvatarAppearance(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarAppearanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAvatarSessionWithBody Render an avatar into your own LiveKit room (API-key authenticated)
//
// Starts an **avatar session**: the avatar is rendered into a LiveKit room
// that YOU own, on behalf of YOUR agent — the bring-your-own-agent path the
// `livekit-plugins-atmee` plugin uses. Nothing here creates a room or a
// conversation: you mint a LiveKit access token for the avatar participant
// with your own project's API secret (grant `roomJoin` for your room, set the
// participant attribute `lk.publish_on_behalf` to your agent's identity, and
// `kind: agent`) and pass it here. The rendering worker joins your room with
// that token, waits for your agent, receives its audio over the LiveKit data
// stream (`lk.audio_stream`, 16 kHz PCM — livekit-agents'
// `DataStreamAudioOutput`) and publishes synced video and audio.
//
// Responds `202` as soon as the worker acknowledged the start (`status:
// initializing`), typically within a second; the avatar's tracks appear in
// your room a few seconds later. Pass `?waitFor=avatar_joined` to block
// until the worker is in the room instead. Billing runs by the minute while
// the render lasts and stops when the worker reports the end (your agent
// left, the room closed, you removed the avatar participant), when you call
// `POST /v1/avatar_sessions/{id}/end`, or at `maxDurationSeconds`.
//
// The token is read, not verified — your secret never leaves you. A token
// your LiveKit server rejects simply never joins and the session fails as
// `AVATAR_DID_NOT_JOIN` after the join timeout.
//
// **Atmee-hosted room** (no LiveKit project of your own, e.g. a Pipecat
// bot on any transport): omit both `livekitUrl` and `livekitToken`. The
// service then creates a room on Atmee's LiveKit project, the avatar joins
// it as `atmee-avatar-agent` publishing on behalf of `agentIdentity`
// (default `agent`), and the response carries `livekitUrl` and
// `agentToken` for your agent to join that room with. The protocol inside
// the room is the same: stream your agent's audio to the avatar
// (`lk.audio_stream`), subscribe to the avatar's video and audio tracks.
// The room is deleted when the session ends. Requires the `sessions`
// scope; the avatar must be on the key's allow-list.
//
// **v2 avatars** (invite-only) render on a separate GPU pool: the avatar's
// own configuration decides, there is nothing to set on the request. That
// pool scales to zero, so the first v2 session after a quiet period can
// take a few minutes to start: the service waits up to 4 minutes for the
// pool to start the render and up to 6 for the avatar to join. Use
// `?waitFor=avatar_joined` with a client timeout of at least 7 minutes, or
// retry on `avatar_warming`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/avatars/{avatarId}/avatar_sessions (the `CreateAvatarSession` operationId).
//
// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
CreateAvatarSessionWithBody(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAvatarSession Render an avatar into your own LiveKit room (API-key authenticated)
//
// Starts an **avatar session**: the avatar is rendered into a LiveKit room
// that YOU own, on behalf of YOUR agent — the bring-your-own-agent path the
// `livekit-plugins-atmee` plugin uses. Nothing here creates a room or a
// conversation: you mint a LiveKit access token for the avatar participant
// with your own project's API secret (grant `roomJoin` for your room, set the
// participant attribute `lk.publish_on_behalf` to your agent's identity, and
// `kind: agent`) and pass it here. The rendering worker joins your room with
// that token, waits for your agent, receives its audio over the LiveKit data
// stream (`lk.audio_stream`, 16 kHz PCM — livekit-agents'
// `DataStreamAudioOutput`) and publishes synced video and audio.
//
// Responds `202` as soon as the worker acknowledged the start (`status:
// initializing`), typically within a second; the avatar's tracks appear in
// your room a few seconds later. Pass `?waitFor=avatar_joined` to block
// until the worker is in the room instead. Billing runs by the minute while
// the render lasts and stops when the worker reports the end (your agent
// left, the room closed, you removed the avatar participant), when you call
// `POST /v1/avatar_sessions/{id}/end`, or at `maxDurationSeconds`.
//
// The token is read, not verified — your secret never leaves you. A token
// your LiveKit server rejects simply never joins and the session fails as
// `AVATAR_DID_NOT_JOIN` after the join timeout.
//
// **Atmee-hosted room** (no LiveKit project of your own, e.g. a Pipecat
// bot on any transport): omit both `livekitUrl` and `livekitToken`. The
// service then creates a room on Atmee's LiveKit project, the avatar joins
// it as `atmee-avatar-agent` publishing on behalf of `agentIdentity`
// (default `agent`), and the response carries `livekitUrl` and
// `agentToken` for your agent to join that room with. The protocol inside
// the room is the same: stream your agent's audio to the avatar
// (`lk.audio_stream`), subscribe to the avatar's video and audio tracks.
// The room is deleted when the session ends. Requires the `sessions`
// scope; the avatar must be on the key's allow-list.
//
// **v2 avatars** (invite-only) render on a separate GPU pool: the avatar's
// own configuration decides, there is nothing to set on the request. That
// pool scales to zero, so the first v2 session after a quiet period can
// take a few minutes to start: the service waits up to 4 minutes for the
// pool to start the render and up to 6 for the avatar to join. Use
// `?waitFor=avatar_joined` with a client timeout of at least 7 minutes, or
// retry on `avatar_warming`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/avatars/{avatarId}/avatar_sessions (the `CreateAvatarSession` operationId).
//
// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
CreateAvatarSession(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, body CreateAvatarSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListAvatarCandidates List candidates
//
// Lists a v2 avatar's candidates and versions. A candidate (a take) is one
// capture of the avatar's lip sync and motion, with a short talking
// preview to compare. A version is one set of capture inputs: the
// portrait, the voice sample and the preview message.
//
// - `items` lists the current version's takes and the serving take;
// `versions=all` adds every older version's.
// - `versions` always lists every version, oldest first, with what going
// back to it restores.
// - Pick one with `PUT /v1/avatars/{avatarId}/selected_candidate`. With
// `seedSelection: auto`, the first completed take of the current version
// is picked for you.
// - `seed` is informational: the same seed does not reproduce a capture.
//
// Corresponds with GET /v1/avatars/{avatarId}/candidates (the `ListAvatarCandidates` operationId).
ListAvatarCandidates(ctx context.Context, avatarId AvatarIdPath, params *ListAvatarCandidatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAvatarCandidatesWithBody Capture more candidates
//
// Captures `count` more candidates of a v2 avatar from its current inputs,
// without preprocessing again. Captures count against the account's limit
// of 10 queued or running (`X-RateLimit-Limit`, `X-RateLimit-Remaining`).
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/avatars/{avatarId}/candidates (the `CreateAvatarCandidates` operationId).
CreateAvatarCandidatesWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAvatarCandidates Capture more candidates
//
// Captures `count` more candidates of a v2 avatar from its current inputs,
// without preprocessing again. Captures count against the account's limit
// of 10 queued or running (`X-RateLimit-Limit`, `X-RateLimit-Remaining`).
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/avatars/{avatarId}/candidates (the `CreateAvatarCandidates` operationId).
CreateAvatarCandidates(ctx context.Context, avatarId AvatarIdPath, body CreateAvatarCandidatesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAvatarConductor Remove the conductor
//
// Removes a v2 avatar's conductor, including one its own configuration
// carries: the next session runs without one, and a running session keeps
// its own. Nothing is rebuilt. Removing a conductor that is not set is not
// an error.
//
// Corresponds with DELETE /v1/avatars/{avatarId}/conductor (the `DeleteAvatarConductor` operationId).
DeleteAvatarConductor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvatarConductor Get the conductor
//
// Returns a v2 avatar's conductor as saved: the whole graph and
// `speakAfterS`. `GET /v1/avatars/{avatarId}` only reports whether one is
// set and its node count.
//
// Corresponds with GET /v1/avatars/{avatarId}/conductor (the `GetAvatarConductor` operationId).
GetAvatarConductor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// SetAvatarConductorWithBody Set the conductor
//
// Gives a v2 avatar's conversations an agenda: a graph of steps, each with
// instructions for the avatar and edges that say when to move on. It
// replaces any earlier conductor, including one the avatar's own
// configuration carries, and applies from the next session. Nothing is
// rebuilt.
//
// - **How it runs**: after each turn, a judge model scores each edge's
// `when` condition. Edges without a condition share the chance that none
// holds, by `weight`. The step takes its likeliest edge, or draws one
// when `random`. A step without edges is the end. A `speak` edge lets
// the avatar go on without waiting for the user, `speakAfterS` seconds
// later.
// - **Validation**: the graph is checked before it is saved. `400
// invalid_conductor` names the field (e.g.
// `/graph/nodes/2/edges/0/weight`); a value of the wrong JSON type is
// `422`. Per-field limits are on the schema.
// - **Limits**: at most 100 nodes and 100 edges, and 150,000 characters of
// graph JSON (non-ASCII characters count as their `\uXXXX` escapes). The
// request body may be up to 512 KiB. A session whose whole configuration
// would be too large starts without the conductor.
// - v1 avatars are refused (`409 not_v2_avatar`).
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/conductor (the `SetAvatarConductor` operationId).
SetAvatarConductorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// SetAvatarConductor Set the conductor
//
// Gives a v2 avatar's conversations an agenda: a graph of steps, each with
// instructions for the avatar and edges that say when to move on. It
// replaces any earlier conductor, including one the avatar's own
// configuration carries, and applies from the next session. Nothing is
// rebuilt.
//
// - **How it runs**: after each turn, a judge model scores each edge's
// `when` condition. Edges without a condition share the chance that none
// holds, by `weight`. The step takes its likeliest edge, or draws one
// when `random`. A step without edges is the end. A `speak` edge lets
// the avatar go on without waiting for the user, `speakAfterS` seconds
// later.
// - **Validation**: the graph is checked before it is saved. `400
// invalid_conductor` names the field (e.g.
// `/graph/nodes/2/edges/0/weight`); a value of the wrong JSON type is
// `422`. Per-field limits are on the schema.
// - **Limits**: at most 100 nodes and 100 edges, and 150,000 characters of
// graph JSON (non-ASCII characters count as their `\uXXXX` escapes). The
// request body may be up to 512 KiB. A session whose whole configuration
// would be too large starts without the conductor.
// - v1 avatars are refused (`409 not_v2_avatar`).
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/conductor (the `SetAvatarConductor` operationId).
SetAvatarConductor(ctx context.Context, avatarId AvatarIdPath, body SetAvatarConductorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvatarKnowledge Get the knowledge
//
// Returns the facts text, the knowledge questionnaire's questions and
// answers, and the knowledge files with presigned URLs.
//
// Corresponds with GET /v1/avatars/{avatarId}/knowledge (the `GetAvatarKnowledge` operationId).
GetAvatarKnowledge(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceAvatarKnowledgeWithBody Replace the knowledge files
//
// Replaces the avatar's whole set of knowledge files and re-runs the build
// stages that depend on them; send none to clear the set. The
// `knowledge.facts` text and the questionnaire answers are kept (change
// them with `PATCH /v1/avatars/{avatarId}`).
//
// - **Body**: repeat the `files` part for each document (pdf, docx, doc,
// txt, md, html or csv, up to 50 MB each, at most 20), with an optional
// `descriptions` JSON object of file name to description. Where `POST
// /v1/uploads` is available, JSON `{"files": [...], "descriptions":
// {...}}` also works, with https URLs or `knowledge` uploads consumed on
// success.
// - A URL's file is named by its last path segment, an upload's by its
// `fileName`; `descriptions` uses those names.
// - v2 conversations do not use knowledge yet.
// - **Scope**: `avatars:write`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/knowledge (the `ReplaceAvatarKnowledge` operationId).
ReplaceAvatarKnowledgeWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceAvatarKnowledge Replace the knowledge files
//
// Replaces the avatar's whole set of knowledge files and re-runs the build
// stages that depend on them; send none to clear the set. The
// `knowledge.facts` text and the questionnaire answers are kept (change
// them with `PATCH /v1/avatars/{avatarId}`).
//
// - **Body**: repeat the `files` part for each document (pdf, docx, doc,
// txt, md, html or csv, up to 50 MB each, at most 20), with an optional
// `descriptions` JSON object of file name to description. Where `POST
// /v1/uploads` is available, JSON `{"files": [...], "descriptions":
// {...}}` also works, with https URLs or `knowledge` uploads consumed on
// success.
// - A URL's file is named by its last path segment, an upload's by its
// `fileName`; `descriptions` uses those names.
// - v2 conversations do not use knowledge yet.
// - **Scope**: `avatars:write`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/knowledge (the `ReplaceAvatarKnowledge` operationId).
ReplaceAvatarKnowledge(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarKnowledgeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvatarMonetization Get monetization
//
// Returns whether the avatar is monetized, its last 30 days against the
// eligibility requirements (the account's own conversations left out), the
// account's cap on monetized avatars, and what the avatar earned, in
// microcredits (100 = 1 credit). Requires `avatars:read`.
//
// Corresponds with GET /v1/avatars/{avatarId}/monetization (the `GetAvatarMonetization` operationId).
GetAvatarMonetization(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// SelectAvatarCandidateWithBody Select a candidate
//
// Picks the completed candidate a v2 avatar serves. The pick is recorded
// at once (`selectedCandidateId`) and served a few seconds later
// (`servingCandidateId`). The first pick makes the avatar `ready`; a later
// one switches without downtime, with `rebuilding` true until it serves.
//
// - **Older versions**: picking a restorable take of an older version
// (`current: false`, `restorable: true`) restores that version's
// portrait, voice sample, preview message and default-sentence language
// in one step. Other settings stay as they are, nothing is captured or
// charged, and the newer version's unfinished takes are cancelled.
// - **Moderation**: inputs already checked together are not checked again;
// a combination never checked is moderated like an edit.
// - Queued, failed and superseded candidates cannot be selected (`409
// candidate_not_ready`). Selecting the current pick again is always
// allowed.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/selected_candidate (the `SelectAvatarCandidate` operationId).
SelectAvatarCandidateWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// SelectAvatarCandidate Select a candidate
//
// Picks the completed candidate a v2 avatar serves. The pick is recorded
// at once (`selectedCandidateId`) and served a few seconds later
// (`servingCandidateId`). The first pick makes the avatar `ready`; a later
// one switches without downtime, with `rebuilding` true until it serves.
//
// - **Older versions**: picking a restorable take of an older version
// (`current: false`, `restorable: true`) restores that version's
// portrait, voice sample, preview message and default-sentence language
// in one step. Other settings stay as they are, nothing is captured or
// charged, and the newer version's unfinished takes are cancelled.
// - **Moderation**: inputs already checked together are not checked again;
// a combination never checked is moderated like an edit.
// - Queued, failed and superseded candidates cannot be selected (`409
// candidate_not_ready`). Selecting the current pick again is always
// allowed.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/selected_candidate (the `SelectAvatarCandidate` operationId).
SelectAvatarCandidate(ctx context.Context, avatarId AvatarIdPath, body SelectAvatarCandidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvatarSponsor Get the sponsor pool
//
// Returns the avatar's sponsor pool balance and settings. Readable by an
// API key with `avatars:read` or a signed-in user of the account. Changing
// the pool takes an API key with `billing:write` or a signed-in user.
//
// Corresponds with GET /v1/avatars/{avatarId}/sponsor (the `GetAvatarSponsor` operationId).
GetAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateAvatarSponsorWithBody Update sponsor settings
//
// Changes who may spend the avatar's sponsor pool, and when. The request
// applies all of its fields or none.
//
// - `anonymousAccess: true` lets visitors without an account spend the
// pool. The avatar must be funded first (`409
// avatar_not_budget_managed`: grant credits or turn on auto top-up) and
// public or unlisted (`409 avatar_not_shared`).
// - `autoTopupEnabled: true` needs a threshold and an amount, sent or
// already stored (`400 auto_topup_incomplete`).
// - A monetized avatar cannot be sponsored (`409
// monetized_avatar_cannot_be_sponsored`).
//
// Takes any type of body and a specified content type.
//
// Corresponds with PATCH /v1/avatars/{avatarId}/sponsor (the `UpdateAvatarSponsor` operationId).
UpdateAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateAvatarSponsor Update sponsor settings
//
// Changes who may spend the avatar's sponsor pool, and when. The request
// applies all of its fields or none.
//
// - `anonymousAccess: true` lets visitors without an account spend the
// pool. The avatar must be funded first (`409
// avatar_not_budget_managed`: grant credits or turn on auto top-up) and
// public or unlisted (`409 avatar_not_shared`).
// - `autoTopupEnabled: true` needs a threshold and an amount, sent or
// already stored (`400 auto_topup_incomplete`).
// - A monetized avatar cannot be sponsored (`409
// monetized_avatar_cannot_be_sponsored`).
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PATCH /v1/avatars/{avatarId}/sponsor (the `UpdateAvatarSponsor` operationId).
UpdateAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GrantAvatarSponsorWithBody Fund the sponsor pool
//
// Moves credits from the account into the avatar's sponsor pool. Send an
// `Idempotency-Key` to retry safely: the same key replays the first result
// instead of granting twice.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/avatars/{avatarId}/sponsor/grants (the `GrantAvatarSponsor` operationId).
GrantAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// GrantAvatarSponsor Fund the sponsor pool
//
// Moves credits from the account into the avatar's sponsor pool. Send an
// `Idempotency-Key` to retry safely: the same key replays the first result
// instead of granting twice.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/avatars/{avatarId}/sponsor/grants (the `GrantAvatarSponsor` operationId).
GrantAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, body GrantAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// WithdrawAvatarSponsorWithBody Withdraw sponsor credits
//
// Returns the sponsor pool's unreserved credits to the account.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/avatars/{avatarId}/sponsor/withdrawals (the `WithdrawAvatarSponsor` operationId).
WithdrawAvatarSponsorWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// WithdrawAvatarSponsor Withdraw sponsor credits
//
// Returns the sponsor pool's unreserved credits to the account.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/avatars/{avatarId}/sponsor/withdrawals (the `WithdrawAvatarSponsor` operationId).
WithdrawAvatarSponsor(ctx context.Context, avatarId AvatarIdPath, body WithdrawAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAvatarThumbnail Remove the thumbnail
//
// Removes the thumbnail, custom or automatic: Explore shows the portrait
// instead, and an automatic thumbnail may be made again. Returns the
// avatar. Requires `avatars:write`.
//
// A public avatar needs a thumbnail, so this is `409
// public_requirements_missing` until you make it unlisted or private.
//
// Corresponds with DELETE /v1/avatars/{avatarId}/thumbnail (the `DeleteAvatarThumbnail` operationId).
DeleteAvatarThumbnail(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceAvatarThumbnailWithBody Set the thumbnail
//
// Sets a custom thumbnail for the avatar's Explore card, replacing any
// other; automatic thumbnails are no longer made for it. Nothing is
// rebuilt. Returns the avatar, with `profile.thumbnailSource: custom`.
//
// - **Body**: one image (jpg, png or webp, up to 10 MB) as the `file`
// part. Where `POST /v1/uploads` is available, JSON `{"image": "<https
// URL or upload:<uploadId>>"}` also works, with a `portrait` upload
// consumed on success.
// - **Scope**: `avatars:write`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/thumbnail (the `ReplaceAvatarThumbnail` operationId).
ReplaceAvatarThumbnailWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceAvatarThumbnail Set the thumbnail
//
// Sets a custom thumbnail for the avatar's Explore card, replacing any
// other; automatic thumbnails are no longer made for it. Nothing is
// rebuilt. Returns the avatar, with `profile.thumbnailSource: custom`.
//
// - **Body**: one image (jpg, png or webp, up to 10 MB) as the `file`
// part. Where `POST /v1/uploads` is available, JSON `{"image": "<https
// URL or upload:<uploadId>>"}` also works, with a `portrait` upload
// consumed on success.
// - **Scope**: `avatars:write`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/thumbnail (the `ReplaceAvatarThumbnail` operationId).
ReplaceAvatarThumbnail(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarThumbnailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAvatarVersion Delete a version
//
// Deletes an older version of a v2 avatar: its takes and the files only it
// uses. It can no longer be restored.
//
// - Files that a kept take or the current inputs use are never deleted.
// - The current version, a version holding the serving or selected take
// (`409 version_in_use`) and one whose capture is still running (`409
// version_busy`) cannot be deleted.
// - If storage cannot delete every file now, the takes are still gone and
// `pendingFiles` counts what is left: call again to retry.
//
// Corresponds with DELETE /v1/avatars/{avatarId}/versions/{versionId} (the `DeleteAvatarVersion` operationId).
DeleteAvatarVersion(ctx context.Context, avatarId AvatarIdPath, versionId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvatarVoice Get the voice
//
// Returns a presigned URL of the voice sample last given, and the voice engine.
//
// Corresponds with GET /v1/avatars/{avatarId}/voice (the `GetAvatarVoice` operationId).
GetAvatarVoice(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceAvatarVoiceWithBody Replace the voice
//
// Replaces the avatar's voice sample and re-runs the build stages that
// depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft
// gets its voice this way (on v2, the first candidate is captured once the
// portrait is there too).
//
// - **Body**: one 10 to 60 second recording of clear speech (mp3, wav,
// m4a, aac, ogg, flac, opus or webm, up to 12 MB) as the `file` part.
// Where `POST /v1/uploads` is available, JSON `{"voice": "<https URL or
// upload:<uploadId>>"}` also works, with a `voice` upload consumed on
// success.
// - Silence, pure tones or heavy noise fail the voice stage.
// - **Scope**: `avatars:write`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/voice (the `ReplaceAvatarVoice` operationId).
ReplaceAvatarVoiceWithBody(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceAvatarVoice Replace the voice
//
// Replaces the avatar's voice sample and re-runs the build stages that
// depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft
// gets its voice this way (on v2, the first candidate is captured once the
// portrait is there too).
//
// - **Body**: one 10 to 60 second recording of clear speech (mp3, wav,
// m4a, aac, ogg, flac, opus or webm, up to 12 MB) as the `file` part.
// Where `POST /v1/uploads` is available, JSON `{"voice": "<https URL or
// upload:<uploadId>>"}` also works, with a `voice` upload consumed on
// success.
// - Silence, pure tones or heavy noise fail the voice stage.
// - **Scope**: `avatars:write`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PUT /v1/avatars/{avatarId}/voice (the `ReplaceAvatarVoice` operationId).
ReplaceAvatarVoice(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarVoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GenerateClipWithBody Generate a clip
//
// Renders a short mp4 (1 to 30 seconds, 25 fps) of the person or character
// in `image`, moving as `prompt` describes and optionally speaking
// `audio`. No avatar is needed.
//
// - **Inputs**: `image` is a `portrait` upload or a public https link
// (jpg, png or webp, up to 10 MB); `audio` is a `voice` upload or link.
// The audio plays once from the start, padded with silence or cut at the
// end. The prompt and the image are moderated; if the image shows a real
// person other than you, get their permission first.
// - **Duration**: `durationSeconds` is required with `audio` (set it to
// the audio's length; the file is not measured) and defaults to 8 for a
// silent clip. At most 15 seconds where clips render on the sessions'
// pool (`pricing.generation.clipAnySize` false), else 30 seconds within
// the size's budget (1920 × 1080: 10 seconds, 1280 × 720: 22).
// - **Resolution**: 512 × 512 unless you pass `resolution`, the clip's
// output size (see `ClipResolution`), or `aspectRatio` (`square`,
// `portrait` 384 × 640, `landscape` 640 × 384). It renders at each
// side rounded up to 32 and the centre is cropped. Where
// `clipAnySize` is false the render size must be one of
// `pricing.generation.clipResolutions` on `GET /v1/account`.
// - **Output**: the clip as `upload:<uploadId>` (kept 24 hours), with a
// short-lived `url` to download it.
// - **Billing**: the per-15-second price from `GET /v1/account`
// (`pricing.generation.clipPer15SecondsMicrocredits`), pro rata to
// `durationSeconds` and rounded up, charged only when the clip comes
// back.
// - **Slow starts**: a cold render can take minutes. After about 45
// seconds the call answers `409 request_in_progress`; retry with the
// same `Idempotency-Key` after `Retry-After` to get the clip, charged
// once.
// - **Access**: needs v2 access (`403 v2_access_required`) and the
// `generation:write` and `avatars:write` scopes.
//
// | Error | When |
// |---|---|
// | `400 invalid_input` | A bad input, `audio` without `durationSeconds`, or an input the renderer cannot use: `input_failure image` or `audio` (no face, an unreadable file), `input_failure resolution` (a size not served right now) |
// | `503 generation_unavailable` | Clips are not offered here |
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/generation/clips (the `GenerateClip` operationId).
GenerateClipWithBody(ctx context.Context, params *GenerateClipParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// GenerateClip Generate a clip
//
// Renders a short mp4 (1 to 30 seconds, 25 fps) of the person or character
// in `image`, moving as `prompt` describes and optionally speaking
// `audio`. No avatar is needed.
//
// - **Inputs**: `image` is a `portrait` upload or a public https link
// (jpg, png or webp, up to 10 MB); `audio` is a `voice` upload or link.
// The audio plays once from the start, padded with silence or cut at the
// end. The prompt and the image are moderated; if the image shows a real
// person other than you, get their permission first.
// - **Duration**: `durationSeconds` is required with `audio` (set it to
// the audio's length; the file is not measured) and defaults to 8 for a
// silent clip. At most 15 seconds where clips render on the sessions'
// pool (`pricing.generation.clipAnySize` false), else 30 seconds within
// the size's budget (1920 × 1080: 10 seconds, 1280 × 720: 22).
// - **Resolution**: 512 × 512 unless you pass `resolution`, the clip's
// output size (see `ClipResolution`), or `aspectRatio` (`square`,
// `portrait` 384 × 640, `landscape` 640 × 384). It renders at each
// side rounded up to 32 and the centre is cropped. Where
// `clipAnySize` is false the render size must be one of
// `pricing.generation.clipResolutions` on `GET /v1/account`.
// - **Output**: the clip as `upload:<uploadId>` (kept 24 hours), with a
// short-lived `url` to download it.
// - **Billing**: the per-15-second price from `GET /v1/account`
// (`pricing.generation.clipPer15SecondsMicrocredits`), pro rata to
// `durationSeconds` and rounded up, charged only when the clip comes
// back.
// - **Slow starts**: a cold render can take minutes. After about 45
// seconds the call answers `409 request_in_progress`; retry with the
// same `Idempotency-Key` after `Retry-After` to get the clip, charged
// once.
// - **Access**: needs v2 access (`403 v2_access_required`) and the
// `generation:write` and `avatars:write` scopes.
//
// | Error | When |
// |---|---|
// | `400 invalid_input` | A bad input, `audio` without `durationSeconds`, or an input the renderer cannot use: `input_failure image` or `audio` (no face, an unreadable file), `input_failure resolution` (a size not served right now) |
// | `503 generation_unavailable` | Clips are not offered here |
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/generation/clips (the `GenerateClip` operationId).
GenerateClip(ctx context.Context, params *GenerateClipParams, body GenerateClipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// EnhancePortraitWithBody Enhance a portrait
//
// Crops your photo to a square and returns up to four enhanced portraits
// that keep the subject's identity. With `prompt`, they restyle the photo
// as the prompt asks ("this person as a 1920s detective"), keeping the
// person unless the prompt says otherwise.
//
// - **Input**: `image` is a `portrait` upload (`upload:<uploadId>`, still
// usable afterwards) or a public https link to a jpg, png or webp of at
// most 10 MB. The prompt and the photo are moderated first.
// - **Consent**: if the photo shows a real person other than you, get
// their permission first.
// - **Output, billing and idempotency**: as for `POST
// /v1/generation/portraits`.
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/generation/enhancements (the `EnhancePortrait` operationId).
EnhancePortraitWithBody(ctx context.Context, params *EnhancePortraitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// EnhancePortrait Enhance a portrait
//
// Crops your photo to a square and returns up to four enhanced portraits
// that keep the subject's identity. With `prompt`, they restyle the photo
// as the prompt asks ("this person as a 1920s detective"), keeping the
// person unless the prompt says otherwise.
//
// - **Input**: `image` is a `portrait` upload (`upload:<uploadId>`, still
// usable afterwards) or a public https link to a jpg, png or webp of at
// most 10 MB. The prompt and the photo are moderated first.
// - **Consent**: if the photo shows a real person other than you, get
// their permission first.
// - **Output, billing and idempotency**: as for `POST
// /v1/generation/portraits`.
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/generation/enhancements (the `EnhancePortrait` operationId).
EnhancePortrait(ctx context.Context, params *EnhancePortraitParams, body EnhancePortraitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GeneratePortraitsWithBody Generate portraits
//
// Generates up to four square portraits of an invented character from a
// text description. Never use it to depict a real person: for a real
// person, enhance their own photo with `POST /v1/generation/enhancements`,
// with their permission.
//
// - **Output**: each portrait is an `upload:<uploadId>` that `POST
// /v1/avatars` (`assets.image`) and `PUT
// /v1/avatars/{avatarId}/appearance` take as is (it expires after 24
// hours), with a short-lived `url` and a small JPEG `preview`.
// - **Billing**: the operation's price from `GET /v1/account`, charged
// only when at least one portrait comes back. A flagged, failed or
// refused call costs nothing.
// - **Idempotency**: `Idempotency-Key` is required. A retry with the same
// key never charges twice and returns the first result (`replayed:
// true`).
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/generation/portraits (the `GeneratePortraits` operationId).
GeneratePortraitsWithBody(ctx context.Context, params *GeneratePortraitsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// GeneratePortraits Generate portraits
//
// Generates up to four square portraits of an invented character from a
// text description. Never use it to depict a real person: for a real
// person, enhance their own photo with `POST /v1/generation/enhancements`,
// with their permission.
//
// - **Output**: each portrait is an `upload:<uploadId>` that `POST
// /v1/avatars` (`assets.image`) and `PUT
// /v1/avatars/{avatarId}/appearance` take as is (it expires after 24
// hours), with a short-lived `url` and a small JPEG `preview`.
// - **Billing**: the operation's price from `GET /v1/account`, charged
// only when at least one portrait comes back. A flagged, failed or
// refused call costs nothing.
// - **Idempotency**: `Idempotency-Key` is required. A retry with the same
// key never charges twice and returns the first result (`replayed:
// true`).
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/generation/portraits (the `GeneratePortraits` operationId).
GeneratePortraits(ctx context.Context, params *GeneratePortraitsParams, body GeneratePortraitsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DesignVoiceWithBody Design a voice
//
// Designs voice previews from a description of how the voice should sound.
// Each preview runs 10 to 60 seconds, the length an avatar's voice sample
// needs: a short one is made once more with a longer read, and one still
// outside that range is dropped.
//
// - **Text**: `sampleText` is what every preview says, in `language`;
// without it, a greeting is written from the description. Each preview
// reports what it actually says in `spokenText`.
// - **Output**: each preview is an `upload:<uploadId>` that `POST
// /v1/avatars` (`assets.voice`) and `PUT /v1/avatars/{avatarId}/voice`
// take as is, with a short-lived `url` to play it. `durationSeconds` is
// `null` when the length is unknown.
// - **Billing and idempotency**: as for `POST /v1/generation/portraits`.
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/generation/voices (the `DesignVoice` operationId).
DesignVoiceWithBody(ctx context.Context, params *DesignVoiceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// DesignVoice Design a voice
//
// Designs voice previews from a description of how the voice should sound.
// Each preview runs 10 to 60 seconds, the length an avatar's voice sample
// needs: a short one is made once more with a longer read, and one still
// outside that range is dropped.
//
// - **Text**: `sampleText` is what every preview says, in `language`;
// without it, a greeting is written from the description. Each preview
// reports what it actually says in `spokenText`.
// - **Output**: each preview is an `upload:<uploadId>` that `POST
// /v1/avatars` (`assets.voice`) and `PUT /v1/avatars/{avatarId}/voice`
// take as is, with a short-lived `url` to play it. `durationSeconds` is
// `null` when the length is unknown.
// - **Billing and idempotency**: as for `POST /v1/generation/portraits`.
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/generation/voices (the `DesignVoice` operationId).
DesignVoice(ctx context.Context, params *DesignVoiceParams, body DesignVoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// StartEmbedSessionWithBody Start an embed avatar session (API-key authenticated, LiveKit only)
//
// Starts a session on behalf of an embed API key instead of a signed-in
// user. Called by the customer's own backend — never a browser —
// with `X-Api-Key` in place of a JWT. Always LiveKit; there is no
// `framework` field. Responds 201 only once the avatar has actually
// joined the room, and returns `serverUrl`/`roomName` as explicit
// fields (not a combined `roomUrl`), since that's what
// `livekit-client`'s `Room.connect()` needs directly.
//
// **Length.** `maxDurationSeconds` is capped server-side at the
// smallest of the key's own `maxSessionSeconds`, the plan's
// `limits.maxSessionSeconds` (`GET /v1/account`) and, for `reserve`
// billing, what the balance can pay for. The response reports what you
// asked for (`requestedDurationSeconds`), what you got
// (`actualDurationSeconds`) and whether it was cut (`durationCapped`).
// The granted length counts from the moment both the visitor and the
// avatar are in the room, which is also when billing starts.
//
// **Joining and ending.** The visitor must join within 60 seconds of
// the avatar; otherwise the session ends `failed` with `endReason:
// no_user_joined` and nothing is billed. End it early with `POST
// /v1/session/{id}/end`; read its state, end reason and cost with `GET
// /v1/avatar_sessions/{id}`. An avatar renders one live conversation at
// a time: a second start on an avatar that is already in a live
// session of the account answers `409 avatar_busy`.
//
// **App tools.** `appTools.tools` declares functions the avatar may
// call during the conversation, with `appTools.instructions` saying
// how and when to use them. Every call reaches the visitor's LiveKit
// client as an RPC (method `atmee.tool`, payload `{id, name,
// arguments}`): register a handler for it on the room's local
// participant; with `x-atmee.mode` `await` its answer is the result
// the avatar is given. Tools run on Causeur, the conversation runtime
// v2 avatars are moving to. A session the behavior module runs (every v1 avatar, and a v2
// avatar not yet moved) accepts them and never calls them: which
// runtime serves a session is decided at launch, not by the request,
// so the start cannot refuse them. A rule broken answers
// `400 invalid_tools`, the message naming it; so does a tool set that
// would push the session over Causeur's payload limit with the
// avatar's own config. The request body may be up to 128 KiB.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/session (the `StartEmbedSession` operationId).
//
// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
StartEmbedSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// StartEmbedSession Start an embed avatar session (API-key authenticated, LiveKit only)
//
// Starts a session on behalf of an embed API key instead of a signed-in
// user. Called by the customer's own backend — never a browser —
// with `X-Api-Key` in place of a JWT. Always LiveKit; there is no
// `framework` field. Responds 201 only once the avatar has actually
// joined the room, and returns `serverUrl`/`roomName` as explicit
// fields (not a combined `roomUrl`), since that's what
// `livekit-client`'s `Room.connect()` needs directly.
//
// **Length.** `maxDurationSeconds` is capped server-side at the
// smallest of the key's own `maxSessionSeconds`, the plan's
// `limits.maxSessionSeconds` (`GET /v1/account`) and, for `reserve`
// billing, what the balance can pay for. The response reports what you
// asked for (`requestedDurationSeconds`), what you got
// (`actualDurationSeconds`) and whether it was cut (`durationCapped`).
// The granted length counts from the moment both the visitor and the
// avatar are in the room, which is also when billing starts.
//
// **Joining and ending.** The visitor must join within 60 seconds of
// the avatar; otherwise the session ends `failed` with `endReason:
// no_user_joined` and nothing is billed. End it early with `POST
// /v1/session/{id}/end`; read its state, end reason and cost with `GET
// /v1/avatar_sessions/{id}`. An avatar renders one live conversation at
// a time: a second start on an avatar that is already in a live
// session of the account answers `409 avatar_busy`.
//
// **App tools.** `appTools.tools` declares functions the avatar may
// call during the conversation, with `appTools.instructions` saying
// how and when to use them. Every call reaches the visitor's LiveKit
// client as an RPC (method `atmee.tool`, payload `{id, name,
// arguments}`): register a handler for it on the room's local
// participant; with `x-atmee.mode` `await` its answer is the result
// the avatar is given. Tools run on Causeur, the conversation runtime
// v2 avatars are moving to. A session the behavior module runs (every v1 avatar, and a v2
// avatar not yet moved) accepts them and never calls them: which
// runtime serves a session is decided at launch, not by the request,
// so the start cannot refuse them. A rule broken answers
// `400 invalid_tools`, the message naming it; so does a tool set that
// would push the session over Causeur's payload limit with the
// avatar's own config. The request body may be up to 128 KiB.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/session (the `StartEmbedSession` operationId).
//
// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
StartEmbedSession(ctx context.Context, body StartEmbedSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateSpeechSessionWithBody Start a speech session
//
// Starts a realtime speech-to-speech conversation with an avatar over a
// WebSocket, without video. The answer carries the WebSocket `url` and a
// short-lived `token`: connect within 60 seconds (`tokenExpiresAt`).
//
// - **Connecting**: present the token as `Authorization: Bearer <token>`
// or as the WebSocket subprotocols `atmee-live` and
// `atmee-token.<token>`. The first connection holds the session for
// good; a client that loses it starts a new session.
// - **Avatar**: `avatarId` is required, and the session uses that avatar's
// persona and voice. An avatar without a voice is `422
// avatar_has_no_voice`.
// - **Pinned settings**: `settings` pins `session.start` fields from your
// backend, over the client's. A client `session.start` or
// `session.update` that sets a pinned field is refused, naming it;
// appends such as `session.instructions.append` still add to it. Pinned
// persona fields override the avatar's.
// - **Length**: the session ends at `endsAt` (the reservation plus
// `actualDurationSeconds`), whenever the connection opened.
// - **Billing**: by the minute from the first usage report (within 30
// seconds of connecting) until the end, always to the account that owns
// the avatar. A session nobody connects to costs nothing and is closed
// as `failed` (`no_user_joined`).
// - **Credentials**: an API key with the `sessions` scope (an
// avatar-scoped key must name its avatar), or the owner's signed-in user
// token where the deployment accepts one (`X-Account-Id` picks among
// several accounts). There are no anonymous speech sessions. Read and
// end a session with either credential of its account.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/speech_sessions (the `CreateSpeechSession` operationId).
CreateSpeechSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateSpeechSession Start a speech session
//
// Starts a realtime speech-to-speech conversation with an avatar over a
// WebSocket, without video. The answer carries the WebSocket `url` and a
// short-lived `token`: connect within 60 seconds (`tokenExpiresAt`).
//
// - **Connecting**: present the token as `Authorization: Bearer <token>`
// or as the WebSocket subprotocols `atmee-live` and
// `atmee-token.<token>`. The first connection holds the session for
// good; a client that loses it starts a new session.
// - **Avatar**: `avatarId` is required, and the session uses that avatar's
// persona and voice. An avatar without a voice is `422
// avatar_has_no_voice`.
// - **Pinned settings**: `settings` pins `session.start` fields from your
// backend, over the client's. A client `session.start` or
// `session.update` that sets a pinned field is refused, naming it;
// appends such as `session.instructions.append` still add to it. Pinned
// persona fields override the avatar's.
// - **Length**: the session ends at `endsAt` (the reservation plus
// `actualDurationSeconds`), whenever the connection opened.
// - **Billing**: by the minute from the first usage report (within 30
// seconds of connecting) until the end, always to the account that owns
// the avatar. A session nobody connects to costs nothing and is closed
// as `failed` (`no_user_joined`).
// - **Credentials**: an API key with the `sessions` scope (an
// avatar-scoped key must name its avatar), or the owner's signed-in user
// token where the deployment accepts one (`X-Account-Id` picks among
// several accounts). There are no anonymous speech sessions. Read and
// end a session with either credential of its account.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/speech_sessions (the `CreateSpeechSession` operationId).
CreateSpeechSession(ctx context.Context, body CreateSpeechSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSpeechSession Get a speech session
//
// Reads a speech session's state and, once it ended, why and what it cost.
//
// - `status` is `active` while the session is reserved or connected, then
// `completed` or `failed`.
// - `connectedAt` is when billing started, `endsAt` when the session's
// time runs out, and `endRequestedAt` when you ended it with a
// connection open.
// - Once it ended, `endReason` says why, and `billedSeconds` and
// `chargedMicrocredits` what it cost (100 microcredits = 1 credit).
//
// Corresponds with GET /v1/speech_sessions/{session_id} (the `GetSpeechSession` operationId).
GetSpeechSession(ctx context.Context, sessionId SpeechSessionPathId, reqEditors ...RequestEditorFn) (*http.Response, error)
// EndSpeechSession End a speech session
//
// Ends the session with `endReason: ended_by_api`. With no connection open
// it settles at once. With one open, it ends at the next usage report
// (within 30 seconds) and is billed until then: the answer reads `status:
// active` with `endRequestedAt` set, and `GET` reads it `completed` once
// settled.
//
// Idempotent: a repeat keeps the first request, and ending a settled
// session answers `alreadyEnded: true`.
//
// Corresponds with POST /v1/speech_sessions/{session_id}/end (the `EndSpeechSession` operationId).
EndSpeechSession(ctx context.Context, sessionId SpeechSessionPathId, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateUploadWithBody Create an upload
//
// Creates a one-time upload for a file you cannot send in the same
// request, for example from an MCP tool or a chat assistant. Once it is
// `uploaded`, pass `upload:<uploadId>` wherever a create or replace takes
// a file URL.
//
// | `kind` | Accepts |
// |---|---|
// | `portrait` | jpg, png or webp, up to 10 MB |
// | `voice` | a 10 to 60 second recording: mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB |
// | `knowledge` | pdf, docx, doc, txt, md, html or csv up to 50 MB; audio or video up to 20 MB |
//
// Send the file one of two ways:
//
// - `PUT` it to `uploadUrl` with `uploadHeaders` (a `Content-Type` from
// `allowedTypes` if you declared none), at most `maxBytes`: `curl -X PUT
// -H 'Content-Type: image/png' --data-binary @portrait.png
// '<uploadUrl>'`.
// - Or give a person `uploadPageUrl`, a page that takes the file (or
// records a voice). It works for 15 minutes (`uploadPageExpiresAt`) and
// until the file arrives.
//
// Then poll `GET /v1/uploads/{uploadId}` until `status` is `uploaded`. An
// upload is used once and expires an hour after it was created.
// `contentType`, when given, is the only type accepted. Requires
// `avatars:write`.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/uploads (the `CreateUpload` operationId).
CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateUpload Create an upload
//
// Creates a one-time upload for a file you cannot send in the same
// request, for example from an MCP tool or a chat assistant. Once it is
// `uploaded`, pass `upload:<uploadId>` wherever a create or replace takes
// a file URL.
//
// | `kind` | Accepts |
// |---|---|
// | `portrait` | jpg, png or webp, up to 10 MB |
// | `voice` | a 10 to 60 second recording: mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB |
// | `knowledge` | pdf, docx, doc, txt, md, html or csv up to 50 MB; audio or video up to 20 MB |
//
// Send the file one of two ways:
//
// - `PUT` it to `uploadUrl` with `uploadHeaders` (a `Content-Type` from
// `allowedTypes` if you declared none), at most `maxBytes`: `curl -X PUT
// -H 'Content-Type: image/png' --data-binary @portrait.png
// '<uploadUrl>'`.
// - Or give a person `uploadPageUrl`, a page that takes the file (or
// records a voice). It works for 15 minutes (`uploadPageExpiresAt`) and
// until the file arrives.
//
// Then poll `GET /v1/uploads/{uploadId}` until `status` is `uploaded`. An
// upload is used once and expires an hour after it was created.
// `contentType`, when given, is the only type accepted. Requires
// `avatars:write`.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/uploads (the `CreateUpload` operationId).
CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetUpload Get an upload
//
// Returns the upload's `status`: `pending` until the file arrives, then
// `uploaded` (usable once), `consumed` once a create or replace used it,
// or `expired` an hour after it was created. Only the account that created
// it can read it. Requires `avatars:read` or `avatars:write`.
//
// Corresponds with GET /v1/uploads/{uploadId} (the `GetUpload` operationId).
GetUpload(ctx context.Context, uploadId UploadIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateApiKeyWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)
CreateApiKeyWithBodyWithResponse Create an API key (signed-in user only); the secret is shown once
Creates a key for the account the user acts for and returns its secret in `apiKey`. **The secret is returned only here** (and by rotate): store it at once, in your backend's secret store or an environment variable, never in a browser or a repository.
Keep keys narrow: give a key only the scopes it needs (`sessions` is always included), bind it to one avatar with `avatarId` when it serves one app, and set its own caps. Omitted caps take the plan's maximum; a value above the plan's is lowered to it. The spend cap defaults to 500 credits (50,000 microcredits) per `spendCapWindow`.
Only a signed-in user may create keys, and only the account's owner or an admin: an API key is answered `403 login_required`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/api_keys (the `CreateApiKey` operationId).
func (*ClientWithResponses) CreateApiKeyWithResponse ¶
func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)
CreateApiKeyWithResponse Create an API key (signed-in user only); the secret is shown once
Creates a key for the account the user acts for and returns its secret in `apiKey`. **The secret is returned only here** (and by rotate): store it at once, in your backend's secret store or an environment variable, never in a browser or a repository.
Keep keys narrow: give a key only the scopes it needs (`sessions` is always included), bind it to one avatar with `avatarId` when it serves one app, and set its own caps. Omitted caps take the plan's maximum; a value above the plan's is lowered to it. The spend cap defaults to 500 credits (50,000 microcredits) per `spendCapWindow`.
Only a signed-in user may create keys, and only the account's owner or an admin: an API key is answered `403 login_required`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/api_keys (the `CreateApiKey` operationId).
func (*ClientWithResponses) CreateAvatarCandidatesWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateAvatarCandidatesWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAvatarCandidatesResponse, error)
CreateAvatarCandidatesWithBodyWithResponse Capture more candidates
Captures `count` more candidates of a v2 avatar from its current inputs, without preprocessing again. Captures count against the account's limit of 10 queued or running (`X-RateLimit-Limit`, `X-RateLimit-Remaining`).
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars/{avatarId}/candidates (the `CreateAvatarCandidates` operationId).
func (*ClientWithResponses) CreateAvatarCandidatesWithResponse ¶
func (c *ClientWithResponses) CreateAvatarCandidatesWithResponse(ctx context.Context, avatarId AvatarIdPath, body CreateAvatarCandidatesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAvatarCandidatesResponse, error)
CreateAvatarCandidatesWithResponse Capture more candidates
Captures `count` more candidates of a v2 avatar from its current inputs, without preprocessing again. Captures count against the account's limit of 10 queued or running (`X-RateLimit-Limit`, `X-RateLimit-Remaining`).
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars/{avatarId}/candidates (the `CreateAvatarCandidates` operationId).
func (*ClientWithResponses) CreateAvatarSessionWithBodyWithResponse
deprecated
func (c *ClientWithResponses) CreateAvatarSessionWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAvatarSessionResponse, error)
CreateAvatarSessionWithBodyWithResponse Render an avatar into your own LiveKit room (API-key authenticated)
Starts an **avatar session**: the avatar is rendered into a LiveKit room that YOU own, on behalf of YOUR agent — the bring-your-own-agent path the `livekit-plugins-atmee` plugin uses. Nothing here creates a room or a conversation: you mint a LiveKit access token for the avatar participant with your own project's API secret (grant `roomJoin` for your room, set the participant attribute `lk.publish_on_behalf` to your agent's identity, and `kind: agent`) and pass it here. The rendering worker joins your room with that token, waits for your agent, receives its audio over the LiveKit data stream (`lk.audio_stream`, 16 kHz PCM — livekit-agents' `DataStreamAudioOutput`) and publishes synced video and audio.
Responds `202` as soon as the worker acknowledged the start (`status: initializing`), typically within a second; the avatar's tracks appear in your room a few seconds later. Pass `?waitFor=avatar_joined` to block until the worker is in the room instead. Billing runs by the minute while the render lasts and stops when the worker reports the end (your agent left, the room closed, you removed the avatar participant), when you call `POST /v1/avatar_sessions/{id}/end`, or at `maxDurationSeconds`.
The token is read, not verified — your secret never leaves you. A token your LiveKit server rejects simply never joins and the session fails as `AVATAR_DID_NOT_JOIN` after the join timeout.
**Atmee-hosted room** (no LiveKit project of your own, e.g. a Pipecat bot on any transport): omit both `livekitUrl` and `livekitToken`. The service then creates a room on Atmee's LiveKit project, the avatar joins it as `atmee-avatar-agent` publishing on behalf of `agentIdentity` (default `agent`), and the response carries `livekitUrl` and `agentToken` for your agent to join that room with. The protocol inside the room is the same: stream your agent's audio to the avatar (`lk.audio_stream`), subscribe to the avatar's video and audio tracks. The room is deleted when the session ends. Requires the `sessions` scope; the avatar must be on the key's allow-list.
**v2 avatars** (invite-only) render on a separate GPU pool: the avatar's own configuration decides, there is nothing to set on the request. That pool scales to zero, so the first v2 session after a quiet period can take a few minutes to start: the service waits up to 4 minutes for the pool to start the render and up to 6 for the avatar to join. Use `?waitFor=avatar_joined` with a client timeout of at least 7 minutes, or retry on `avatar_warming`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars/{avatarId}/avatar_sessions (the `CreateAvatarSession` operationId).
Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
func (*ClientWithResponses) CreateAvatarSessionWithResponse ¶
func (c *ClientWithResponses) CreateAvatarSessionWithResponse(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, body CreateAvatarSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAvatarSessionResponse, error)
CreateAvatarSessionWithResponse Render an avatar into your own LiveKit room (API-key authenticated)
Starts an **avatar session**: the avatar is rendered into a LiveKit room that YOU own, on behalf of YOUR agent — the bring-your-own-agent path the `livekit-plugins-atmee` plugin uses. Nothing here creates a room or a conversation: you mint a LiveKit access token for the avatar participant with your own project's API secret (grant `roomJoin` for your room, set the participant attribute `lk.publish_on_behalf` to your agent's identity, and `kind: agent`) and pass it here. The rendering worker joins your room with that token, waits for your agent, receives its audio over the LiveKit data stream (`lk.audio_stream`, 16 kHz PCM — livekit-agents' `DataStreamAudioOutput`) and publishes synced video and audio.
Responds `202` as soon as the worker acknowledged the start (`status: initializing`), typically within a second; the avatar's tracks appear in your room a few seconds later. Pass `?waitFor=avatar_joined` to block until the worker is in the room instead. Billing runs by the minute while the render lasts and stops when the worker reports the end (your agent left, the room closed, you removed the avatar participant), when you call `POST /v1/avatar_sessions/{id}/end`, or at `maxDurationSeconds`.
The token is read, not verified — your secret never leaves you. A token your LiveKit server rejects simply never joins and the session fails as `AVATAR_DID_NOT_JOIN` after the join timeout.
**Atmee-hosted room** (no LiveKit project of your own, e.g. a Pipecat bot on any transport): omit both `livekitUrl` and `livekitToken`. The service then creates a room on Atmee's LiveKit project, the avatar joins it as `atmee-avatar-agent` publishing on behalf of `agentIdentity` (default `agent`), and the response carries `livekitUrl` and `agentToken` for your agent to join that room with. The protocol inside the room is the same: stream your agent's audio to the avatar (`lk.audio_stream`), subscribe to the avatar's video and audio tracks. The room is deleted when the session ends. Requires the `sessions` scope; the avatar must be on the key's allow-list.
**v2 avatars** (invite-only) render on a separate GPU pool: the avatar's own configuration decides, there is nothing to set on the request. That pool scales to zero, so the first v2 session after a quiet period can take a few minutes to start: the service waits up to 4 minutes for the pool to start the render and up to 6 for the avatar to join. Use `?waitFor=avatar_joined` with a client timeout of at least 7 minutes, or retry on `avatar_warming`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars/{avatarId}/avatar_sessions (the `CreateAvatarSession` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
func (*ClientWithResponses) CreateAvatarWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateAvatarWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAvatarResponse, error)
CreateAvatarWithBodyWithResponse Create an avatar
Creates an avatar from a portrait, a voice sample, a persona and knowledge. A complete avatar builds in the background (`202`, `status: building`): follow it with `GET /v1/avatars/{avatarId}`.
Send one of three body shapes:
| Body | Content type | Contents | |---|---|---| | Image | `multipart/form-data` | The portrait as the `file` part, plus `name` (and optional `description`). Makes a render-only avatar: `201`, `ready` at once. Add a voice later to make it talk. | | Zip | `multipart/form-data` (`file`) or `application/zip` | `avatar.json` plus `image/`, `voice/`, `prompt/prompt.txt` and `knowledge/`. | | JSON | `application/json` | The manifest, with an `assets` block naming each file by https URL or `upload:<uploadId>`. |
- **Engine**: `engine` is `v1` (default) or `v2`. A v2 create captures `seedPreviews.count` candidates and, with `seedSelection: auto` (default), serves the first that completes. v2 is invite-only (`403 v2_access_required`).
- **Drafts**: the portrait and the voice are optional in zip and JSON bodies. Without either (other than a v1 avatar with a portrait, which is render-only) the avatar is a `draft`, and `missingInputs` names what to add with `PUT /v1/avatars/{avatarId}/appearance` or `PUT /v1/avatars/{avatarId}/voice`.
- **Portrait**: use a front-facing photo of one person, head and shoulders, the face at least a third of the frame, in even light, with the lips slightly parted. A clearly bad portrait fails the `appearance` stage with a `portrait_*` reason.
- **Uploads**: a create that succeeds consumes its uploads; one that fails leaves them usable for a retry.
- **Captures** count against the account's limit of 10 queued or running. A v2 create returns `X-RateLimit-Limit` and `X-RateLimit-Remaining`, and `429 rate_limited` when the captures do not fit.
- **Scopes**: `avatars:write`, plus `billing:write` with a `sponsor` block.
| Manifest field | Rule | |---|---| | `persona` | `whoPrompt` (who the avatar is), `whatPrompt` (what it does with the visitor; in a zip, `prompt/prompt.txt` instead, not both), `preferredAlias`, `spokenName`, `knownAliases`, `greeting`, `selfIntroduction` (derived from `whoPrompt` when absent), `guardrails`, `conversationalHabits`. `personality` and `scenario` are older names of `whoPrompt` and `whatPrompt`; a field under both names is `400 invalid_manifest`. | | `previewMessage` | The line preview clips speak; omit it for a default sentence in the avatar's language. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). | | `previews` | `true` generates preview clips (default off; change it with PATCH). | | `seedPreviews`, `seedSelection` | v2 only, and only with the portrait and the voice: `count` candidates (default 1, at most 10), and `auto` (default) or `manual` selection. | | `knowledge.facts` | The avatar's knowledge as text, at most 32,000 characters (`400 invalid_manifest`). | | `knowledge.questionnaire` | Answers to Creator Studio's knowledge questions (listed by `GET /v1/avatars/{avatarId}/knowledge`), each at most 2,000 characters. | | `knowledge.descriptions` | Maps a knowledge file name to a short description. | | `blackoutRecovery`, `runtimeSeed`, `resolution` | v2 render settings (see their schemas). v1 avatars ignore the first two and refuse `resolution` (`400 invalid_input`). | | `aspectRatio` | v2 only: the avatar's shape, `square` (default, 512 × 512), `portrait` (384 × 640) or `landscape` (640 × 384); see `AspectRatio`. `resolution` names a size this deployment offers instead; send one or the other, not both. v1 avatars refuse it (`400 invalid_input`). |
v2 conversations do not use knowledge yet.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars (the `CreateAvatar` operationId).
func (*ClientWithResponses) CreateAvatarWithResponse ¶
func (c *ClientWithResponses) CreateAvatarWithResponse(ctx context.Context, body CreateAvatarJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAvatarResponse, error)
CreateAvatarWithResponse Create an avatar
Creates an avatar from a portrait, a voice sample, a persona and knowledge. A complete avatar builds in the background (`202`, `status: building`): follow it with `GET /v1/avatars/{avatarId}`.
Send one of three body shapes:
| Body | Content type | Contents | |---|---|---| | Image | `multipart/form-data` | The portrait as the `file` part, plus `name` (and optional `description`). Makes a render-only avatar: `201`, `ready` at once. Add a voice later to make it talk. | | Zip | `multipart/form-data` (`file`) or `application/zip` | `avatar.json` plus `image/`, `voice/`, `prompt/prompt.txt` and `knowledge/`. | | JSON | `application/json` | The manifest, with an `assets` block naming each file by https URL or `upload:<uploadId>`. |
- **Engine**: `engine` is `v1` (default) or `v2`. A v2 create captures `seedPreviews.count` candidates and, with `seedSelection: auto` (default), serves the first that completes. v2 is invite-only (`403 v2_access_required`).
- **Drafts**: the portrait and the voice are optional in zip and JSON bodies. Without either (other than a v1 avatar with a portrait, which is render-only) the avatar is a `draft`, and `missingInputs` names what to add with `PUT /v1/avatars/{avatarId}/appearance` or `PUT /v1/avatars/{avatarId}/voice`.
- **Portrait**: use a front-facing photo of one person, head and shoulders, the face at least a third of the frame, in even light, with the lips slightly parted. A clearly bad portrait fails the `appearance` stage with a `portrait_*` reason.
- **Uploads**: a create that succeeds consumes its uploads; one that fails leaves them usable for a retry.
- **Captures** count against the account's limit of 10 queued or running. A v2 create returns `X-RateLimit-Limit` and `X-RateLimit-Remaining`, and `429 rate_limited` when the captures do not fit.
- **Scopes**: `avatars:write`, plus `billing:write` with a `sponsor` block.
| Manifest field | Rule | |---|---| | `persona` | `whoPrompt` (who the avatar is), `whatPrompt` (what it does with the visitor; in a zip, `prompt/prompt.txt` instead, not both), `preferredAlias`, `spokenName`, `knownAliases`, `greeting`, `selfIntroduction` (derived from `whoPrompt` when absent), `guardrails`, `conversationalHabits`. `personality` and `scenario` are older names of `whoPrompt` and `whatPrompt`; a field under both names is `400 invalid_manifest`. | | `previewMessage` | The line preview clips speak; omit it for a default sentence in the avatar's language. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). | | `previews` | `true` generates preview clips (default off; change it with PATCH). | | `seedPreviews`, `seedSelection` | v2 only, and only with the portrait and the voice: `count` candidates (default 1, at most 10), and `auto` (default) or `manual` selection. | | `knowledge.facts` | The avatar's knowledge as text, at most 32,000 characters (`400 invalid_manifest`). | | `knowledge.questionnaire` | Answers to Creator Studio's knowledge questions (listed by `GET /v1/avatars/{avatarId}/knowledge`), each at most 2,000 characters. | | `knowledge.descriptions` | Maps a knowledge file name to a short description. | | `blackoutRecovery`, `runtimeSeed`, `resolution` | v2 render settings (see their schemas). v1 avatars ignore the first two and refuse `resolution` (`400 invalid_input`). | | `aspectRatio` | v2 only: the avatar's shape, `square` (default, 512 × 512), `portrait` (384 × 640) or `landscape` (640 × 384); see `AspectRatio`. `resolution` names a size this deployment offers instead; send one or the other, not both. v1 avatars refuse it (`400 invalid_input`). |
v2 conversations do not use knowledge yet.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars (the `CreateAvatar` operationId).
func (*ClientWithResponses) CreateSpeechSessionWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateSpeechSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpeechSessionResponse, error)
CreateSpeechSessionWithBodyWithResponse Start a speech session
Starts a realtime speech-to-speech conversation with an avatar over a WebSocket, without video. The answer carries the WebSocket `url` and a short-lived `token`: connect within 60 seconds (`tokenExpiresAt`).
- **Connecting**: present the token as `Authorization: Bearer <token>` or as the WebSocket subprotocols `atmee-live` and `atmee-token.<token>`. The first connection holds the session for good; a client that loses it starts a new session.
- **Avatar**: `avatarId` is required, and the session uses that avatar's persona and voice. An avatar without a voice is `422 avatar_has_no_voice`.
- **Pinned settings**: `settings` pins `session.start` fields from your backend, over the client's. A client `session.start` or `session.update` that sets a pinned field is refused, naming it; appends such as `session.instructions.append` still add to it. Pinned persona fields override the avatar's.
- **Length**: the session ends at `endsAt` (the reservation plus `actualDurationSeconds`), whenever the connection opened.
- **Billing**: by the minute from the first usage report (within 30 seconds of connecting) until the end, always to the account that owns the avatar. A session nobody connects to costs nothing and is closed as `failed` (`no_user_joined`).
- **Credentials**: an API key with the `sessions` scope (an avatar-scoped key must name its avatar), or the owner's signed-in user token where the deployment accepts one (`X-Account-Id` picks among several accounts). There are no anonymous speech sessions. Read and end a session with either credential of its account.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/speech_sessions (the `CreateSpeechSession` operationId).
func (*ClientWithResponses) CreateSpeechSessionWithResponse ¶
func (c *ClientWithResponses) CreateSpeechSessionWithResponse(ctx context.Context, body CreateSpeechSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpeechSessionResponse, error)
CreateSpeechSessionWithResponse Start a speech session
Starts a realtime speech-to-speech conversation with an avatar over a WebSocket, without video. The answer carries the WebSocket `url` and a short-lived `token`: connect within 60 seconds (`tokenExpiresAt`).
- **Connecting**: present the token as `Authorization: Bearer <token>` or as the WebSocket subprotocols `atmee-live` and `atmee-token.<token>`. The first connection holds the session for good; a client that loses it starts a new session.
- **Avatar**: `avatarId` is required, and the session uses that avatar's persona and voice. An avatar without a voice is `422 avatar_has_no_voice`.
- **Pinned settings**: `settings` pins `session.start` fields from your backend, over the client's. A client `session.start` or `session.update` that sets a pinned field is refused, naming it; appends such as `session.instructions.append` still add to it. Pinned persona fields override the avatar's.
- **Length**: the session ends at `endsAt` (the reservation plus `actualDurationSeconds`), whenever the connection opened.
- **Billing**: by the minute from the first usage report (within 30 seconds of connecting) until the end, always to the account that owns the avatar. A session nobody connects to costs nothing and is closed as `failed` (`no_user_joined`).
- **Credentials**: an API key with the `sessions` scope (an avatar-scoped key must name its avatar), or the owner's signed-in user token where the deployment accepts one (`X-Account-Id` picks among several accounts). There are no anonymous speech sessions. Read and end a session with either credential of its account.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/speech_sessions (the `CreateSpeechSession` operationId).
func (*ClientWithResponses) CreateUploadWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error)
CreateUploadWithBodyWithResponse Create an upload
Creates a one-time upload for a file you cannot send in the same request, for example from an MCP tool or a chat assistant. Once it is `uploaded`, pass `upload:<uploadId>` wherever a create or replace takes a file URL.
| `kind` | Accepts | |---|---| | `portrait` | jpg, png or webp, up to 10 MB | | `voice` | a 10 to 60 second recording: mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB | | `knowledge` | pdf, docx, doc, txt, md, html or csv up to 50 MB; audio or video up to 20 MB |
Send the file one of two ways:
- `PUT` it to `uploadUrl` with `uploadHeaders` (a `Content-Type` from `allowedTypes` if you declared none), at most `maxBytes`: `curl -X PUT -H 'Content-Type: image/png' --data-binary @portrait.png '<uploadUrl>'`.
- Or give a person `uploadPageUrl`, a page that takes the file (or records a voice). It works for 15 minutes (`uploadPageExpiresAt`) and until the file arrives.
Then poll `GET /v1/uploads/{uploadId}` until `status` is `uploaded`. An upload is used once and expires an hour after it was created. `contentType`, when given, is the only type accepted. Requires `avatars:write`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/uploads (the `CreateUpload` operationId).
func (*ClientWithResponses) CreateUploadWithResponse ¶
func (c *ClientWithResponses) CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error)
CreateUploadWithResponse Create an upload
Creates a one-time upload for a file you cannot send in the same request, for example from an MCP tool or a chat assistant. Once it is `uploaded`, pass `upload:<uploadId>` wherever a create or replace takes a file URL.
| `kind` | Accepts | |---|---| | `portrait` | jpg, png or webp, up to 10 MB | | `voice` | a 10 to 60 second recording: mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB | | `knowledge` | pdf, docx, doc, txt, md, html or csv up to 50 MB; audio or video up to 20 MB |
Send the file one of two ways:
- `PUT` it to `uploadUrl` with `uploadHeaders` (a `Content-Type` from `allowedTypes` if you declared none), at most `maxBytes`: `curl -X PUT -H 'Content-Type: image/png' --data-binary @portrait.png '<uploadUrl>'`.
- Or give a person `uploadPageUrl`, a page that takes the file (or records a voice). It works for 15 minutes (`uploadPageExpiresAt`) and until the file arrives.
Then poll `GET /v1/uploads/{uploadId}` until `status` is `uploaded`. An upload is used once and expires an hour after it was created. `contentType`, when given, is the only type accepted. Requires `avatars:write`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/uploads (the `CreateUpload` operationId).
func (*ClientWithResponses) DeleteAvatarConductorWithResponse ¶
func (c *ClientWithResponses) DeleteAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarConductorResponse, error)
DeleteAvatarConductorWithResponse Remove the conductor
Removes a v2 avatar's conductor, including one its own configuration carries: the next session runs without one, and a running session keeps its own. Nothing is rebuilt. Removing a conductor that is not set is not an error.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/avatars/{avatarId}/conductor (the `DeleteAvatarConductor` operationId).
func (*ClientWithResponses) DeleteAvatarThumbnailWithResponse ¶
func (c *ClientWithResponses) DeleteAvatarThumbnailWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarThumbnailResponse, error)
DeleteAvatarThumbnailWithResponse Remove the thumbnail
Removes the thumbnail, custom or automatic: Explore shows the portrait instead, and an automatic thumbnail may be made again. Returns the avatar. Requires `avatars:write`.
A public avatar needs a thumbnail, so this is `409 public_requirements_missing` until you make it unlisted or private.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/avatars/{avatarId}/thumbnail (the `DeleteAvatarThumbnail` operationId).
func (*ClientWithResponses) DeleteAvatarVersionWithResponse ¶
func (c *ClientWithResponses) DeleteAvatarVersionWithResponse(ctx context.Context, avatarId AvatarIdPath, versionId string, reqEditors ...RequestEditorFn) (*DeleteAvatarVersionResponse, error)
DeleteAvatarVersionWithResponse Delete a version
Deletes an older version of a v2 avatar: its takes and the files only it uses. It can no longer be restored.
- Files that a kept take or the current inputs use are never deleted.
- The current version, a version holding the serving or selected take (`409 version_in_use`) and one whose capture is still running (`409 version_busy`) cannot be deleted.
- If storage cannot delete every file now, the takes are still gone and `pendingFiles` counts what is left: call again to retry.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/avatars/{avatarId}/versions/{versionId} (the `DeleteAvatarVersion` operationId).
func (*ClientWithResponses) DeleteAvatarWithResponse ¶
func (c *ClientWithResponses) DeleteAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarResponse, error)
DeleteAvatarWithResponse Delete an avatar
Deletes the avatar: it disappears from the API at once and its unfinished captures are cancelled. Its files, every version's included, are removed permanently after the retention period.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/avatars/{avatarId} (the `DeleteAvatar` operationId).
func (*ClientWithResponses) DesignVoiceWithBodyWithResponse ¶
func (c *ClientWithResponses) DesignVoiceWithBodyWithResponse(ctx context.Context, params *DesignVoiceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DesignVoiceResponse, error)
DesignVoiceWithBodyWithResponse Design a voice
Designs voice previews from a description of how the voice should sound. Each preview runs 10 to 60 seconds, the length an avatar's voice sample needs: a short one is made once more with a longer read, and one still outside that range is dropped.
- **Text**: `sampleText` is what every preview says, in `language`; without it, a greeting is written from the description. Each preview reports what it actually says in `spokenText`.
- **Output**: each preview is an `upload:<uploadId>` that `POST /v1/avatars` (`assets.voice`) and `PUT /v1/avatars/{avatarId}/voice` take as is, with a short-lived `url` to play it. `durationSeconds` is `null` when the length is unknown.
- **Billing and idempotency**: as for `POST /v1/generation/portraits`.
- **Scopes**: `generation:write` and `avatars:write`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/generation/voices (the `DesignVoice` operationId).
func (*ClientWithResponses) DesignVoiceWithResponse ¶
func (c *ClientWithResponses) DesignVoiceWithResponse(ctx context.Context, params *DesignVoiceParams, body DesignVoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*DesignVoiceResponse, error)
DesignVoiceWithResponse Design a voice
Designs voice previews from a description of how the voice should sound. Each preview runs 10 to 60 seconds, the length an avatar's voice sample needs: a short one is made once more with a longer read, and one still outside that range is dropped.
- **Text**: `sampleText` is what every preview says, in `language`; without it, a greeting is written from the description. Each preview reports what it actually says in `spokenText`.
- **Output**: each preview is an `upload:<uploadId>` that `POST /v1/avatars` (`assets.voice`) and `PUT /v1/avatars/{avatarId}/voice` take as is, with a short-lived `url` to play it. `durationSeconds` is `null` when the length is unknown.
- **Billing and idempotency**: as for `POST /v1/generation/portraits`.
- **Scopes**: `generation:write` and `avatars:write`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/generation/voices (the `DesignVoice` operationId).
func (*ClientWithResponses) EndAvatarSessionWithResponse ¶
func (c *ClientWithResponses) EndAvatarSessionWithResponse(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*EndAvatarSessionResponse, error)
EndAvatarSessionWithResponse End an avatar session
Ends an API session now and stops billing. It settles `completed` with `endReason: ended_by_api`. For a conversation, this is the same as `POST /v1/sessions/{id}/end` with an API key.
- **Idempotent**: a session that already ended answers `200` with `alreadyEnded: true`, so it is safe to call from every teardown path.
- **Renders** usually end on their own when your agent leaves, the room closes or you remove the avatar participant. Call this to stop paying while your room stays open; it does not remove the avatar from your room, so remove the participant yourself.
- **Conversations**: the room is closed.
- Only sessions started through the API can be ended here (website sessions are `404`), and an avatar-scoped key ends only its avatar's.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatar_sessions/{id}/end (the `EndAvatarSession` operationId).
func (*ClientWithResponses) EndSpeechSessionWithResponse ¶
func (c *ClientWithResponses) EndSpeechSessionWithResponse(ctx context.Context, sessionId SpeechSessionPathId, reqEditors ...RequestEditorFn) (*EndSpeechSessionResponse, error)
EndSpeechSessionWithResponse End a speech session
Ends the session with `endReason: ended_by_api`. With no connection open it settles at once. With one open, it ends at the next usage report (within 30 seconds) and is billed until then: the answer reads `status: active` with `endRequestedAt` set, and `GET` reads it `completed` once settled.
Idempotent: a repeat keeps the first request, and ending a settled session answers `alreadyEnded: true`.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/speech_sessions/{session_id}/end (the `EndSpeechSession` operationId).
func (*ClientWithResponses) EnhancePortraitWithBodyWithResponse ¶
func (c *ClientWithResponses) EnhancePortraitWithBodyWithResponse(ctx context.Context, params *EnhancePortraitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EnhancePortraitResponse, error)
EnhancePortraitWithBodyWithResponse Enhance a portrait
Crops your photo to a square and returns up to four enhanced portraits that keep the subject's identity. With `prompt`, they restyle the photo as the prompt asks ("this person as a 1920s detective"), keeping the person unless the prompt says otherwise.
- **Input**: `image` is a `portrait` upload (`upload:<uploadId>`, still usable afterwards) or a public https link to a jpg, png or webp of at most 10 MB. The prompt and the photo are moderated first.
- **Consent**: if the photo shows a real person other than you, get their permission first.
- **Output, billing and idempotency**: as for `POST /v1/generation/portraits`.
- **Scopes**: `generation:write` and `avatars:write`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/generation/enhancements (the `EnhancePortrait` operationId).
func (*ClientWithResponses) EnhancePortraitWithResponse ¶
func (c *ClientWithResponses) EnhancePortraitWithResponse(ctx context.Context, params *EnhancePortraitParams, body EnhancePortraitJSONRequestBody, reqEditors ...RequestEditorFn) (*EnhancePortraitResponse, error)
EnhancePortraitWithResponse Enhance a portrait
Crops your photo to a square and returns up to four enhanced portraits that keep the subject's identity. With `prompt`, they restyle the photo as the prompt asks ("this person as a 1920s detective"), keeping the person unless the prompt says otherwise.
- **Input**: `image` is a `portrait` upload (`upload:<uploadId>`, still usable afterwards) or a public https link to a jpg, png or webp of at most 10 MB. The prompt and the photo are moderated first.
- **Consent**: if the photo shows a real person other than you, get their permission first.
- **Output, billing and idempotency**: as for `POST /v1/generation/portraits`.
- **Scopes**: `generation:write` and `avatars:write`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/generation/enhancements (the `EnhancePortrait` operationId).
func (*ClientWithResponses) GenerateClipWithBodyWithResponse ¶
func (c *ClientWithResponses) GenerateClipWithBodyWithResponse(ctx context.Context, params *GenerateClipParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GenerateClipResponse, error)
GenerateClipWithBodyWithResponse Generate a clip
Renders a short mp4 (1 to 30 seconds, 25 fps) of the person or character in `image`, moving as `prompt` describes and optionally speaking `audio`. No avatar is needed.
- **Inputs**: `image` is a `portrait` upload or a public https link (jpg, png or webp, up to 10 MB); `audio` is a `voice` upload or link. The audio plays once from the start, padded with silence or cut at the end. The prompt and the image are moderated; if the image shows a real person other than you, get their permission first.
- **Duration**: `durationSeconds` is required with `audio` (set it to the audio's length; the file is not measured) and defaults to 8 for a silent clip. At most 15 seconds where clips render on the sessions' pool (`pricing.generation.clipAnySize` false), else 30 seconds within the size's budget (1920 × 1080: 10 seconds, 1280 × 720: 22).
- **Resolution**: 512 × 512 unless you pass `resolution`, the clip's output size (see `ClipResolution`), or `aspectRatio` (`square`, `portrait` 384 × 640, `landscape` 640 × 384). It renders at each side rounded up to 32 and the centre is cropped. Where `clipAnySize` is false the render size must be one of `pricing.generation.clipResolutions` on `GET /v1/account`.
- **Output**: the clip as `upload:<uploadId>` (kept 24 hours), with a short-lived `url` to download it.
- **Billing**: the per-15-second price from `GET /v1/account` (`pricing.generation.clipPer15SecondsMicrocredits`), pro rata to `durationSeconds` and rounded up, charged only when the clip comes back.
- **Slow starts**: a cold render can take minutes. After about 45 seconds the call answers `409 request_in_progress`; retry with the same `Idempotency-Key` after `Retry-After` to get the clip, charged once.
- **Access**: needs v2 access (`403 v2_access_required`) and the `generation:write` and `avatars:write` scopes.
| Error | When | |---|---| | `400 invalid_input` | A bad input, `audio` without `durationSeconds`, or an input the renderer cannot use: `input_failure image` or `audio` (no face, an unreadable file), `input_failure resolution` (a size not served right now) | | `503 generation_unavailable` | Clips are not offered here |
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/generation/clips (the `GenerateClip` operationId).
func (*ClientWithResponses) GenerateClipWithResponse ¶
func (c *ClientWithResponses) GenerateClipWithResponse(ctx context.Context, params *GenerateClipParams, body GenerateClipJSONRequestBody, reqEditors ...RequestEditorFn) (*GenerateClipResponse, error)
GenerateClipWithResponse Generate a clip
Renders a short mp4 (1 to 30 seconds, 25 fps) of the person or character in `image`, moving as `prompt` describes and optionally speaking `audio`. No avatar is needed.
- **Inputs**: `image` is a `portrait` upload or a public https link (jpg, png or webp, up to 10 MB); `audio` is a `voice` upload or link. The audio plays once from the start, padded with silence or cut at the end. The prompt and the image are moderated; if the image shows a real person other than you, get their permission first.
- **Duration**: `durationSeconds` is required with `audio` (set it to the audio's length; the file is not measured) and defaults to 8 for a silent clip. At most 15 seconds where clips render on the sessions' pool (`pricing.generation.clipAnySize` false), else 30 seconds within the size's budget (1920 × 1080: 10 seconds, 1280 × 720: 22).
- **Resolution**: 512 × 512 unless you pass `resolution`, the clip's output size (see `ClipResolution`), or `aspectRatio` (`square`, `portrait` 384 × 640, `landscape` 640 × 384). It renders at each side rounded up to 32 and the centre is cropped. Where `clipAnySize` is false the render size must be one of `pricing.generation.clipResolutions` on `GET /v1/account`.
- **Output**: the clip as `upload:<uploadId>` (kept 24 hours), with a short-lived `url` to download it.
- **Billing**: the per-15-second price from `GET /v1/account` (`pricing.generation.clipPer15SecondsMicrocredits`), pro rata to `durationSeconds` and rounded up, charged only when the clip comes back.
- **Slow starts**: a cold render can take minutes. After about 45 seconds the call answers `409 request_in_progress`; retry with the same `Idempotency-Key` after `Retry-After` to get the clip, charged once.
- **Access**: needs v2 access (`403 v2_access_required`) and the `generation:write` and `avatars:write` scopes.
| Error | When | |---|---| | `400 invalid_input` | A bad input, `audio` without `durationSeconds`, or an input the renderer cannot use: `input_failure image` or `audio` (no face, an unreadable file), `input_failure resolution` (a size not served right now) | | `503 generation_unavailable` | Clips are not offered here |
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/generation/clips (the `GenerateClip` operationId).
func (*ClientWithResponses) GeneratePortraitsWithBodyWithResponse ¶
func (c *ClientWithResponses) GeneratePortraitsWithBodyWithResponse(ctx context.Context, params *GeneratePortraitsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GeneratePortraitsResponse, error)
GeneratePortraitsWithBodyWithResponse Generate portraits
Generates up to four square portraits of an invented character from a text description. Never use it to depict a real person: for a real person, enhance their own photo with `POST /v1/generation/enhancements`, with their permission.
- **Output**: each portrait is an `upload:<uploadId>` that `POST /v1/avatars` (`assets.image`) and `PUT /v1/avatars/{avatarId}/appearance` take as is (it expires after 24 hours), with a short-lived `url` and a small JPEG `preview`.
- **Billing**: the operation's price from `GET /v1/account`, charged only when at least one portrait comes back. A flagged, failed or refused call costs nothing.
- **Idempotency**: `Idempotency-Key` is required. A retry with the same key never charges twice and returns the first result (`replayed: true`).
- **Scopes**: `generation:write` and `avatars:write`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/generation/portraits (the `GeneratePortraits` operationId).
func (*ClientWithResponses) GeneratePortraitsWithResponse ¶
func (c *ClientWithResponses) GeneratePortraitsWithResponse(ctx context.Context, params *GeneratePortraitsParams, body GeneratePortraitsJSONRequestBody, reqEditors ...RequestEditorFn) (*GeneratePortraitsResponse, error)
GeneratePortraitsWithResponse Generate portraits
Generates up to four square portraits of an invented character from a text description. Never use it to depict a real person: for a real person, enhance their own photo with `POST /v1/generation/enhancements`, with their permission.
- **Output**: each portrait is an `upload:<uploadId>` that `POST /v1/avatars` (`assets.image`) and `PUT /v1/avatars/{avatarId}/appearance` take as is (it expires after 24 hours), with a short-lived `url` and a small JPEG `preview`.
- **Billing**: the operation's price from `GET /v1/account`, charged only when at least one portrait comes back. A flagged, failed or refused call costs nothing.
- **Idempotency**: `Idempotency-Key` is required. A retry with the same key never charges twice and returns the first result (`replayed: true`).
- **Scopes**: `generation:write` and `avatars:write`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/generation/portraits (the `GeneratePortraits` operationId).
func (*ClientWithResponses) GetAccountBalanceWithResponse ¶
func (c *ClientWithResponses) GetAccountBalanceWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountBalanceResponse, error)
GetAccountBalanceWithResponse Get the balance
Returns the credits the account can spend on sessions, in microcredits (100 microcredits = 1 credit). An avatar's sponsor pool is not included (see `GET /v1/avatars/{avatarId}/sponsor`).
- `spendableMicrocredits` is what a session is admitted on: every bucket for a reserve-mode key or a signed-in user, only the plan and top-up buckets for a metered key (`couponSpendable: false`).
- Live sessions' reservations are already taken out, and reported as `heldByLiveSessionsMicrocredits`.
- `unlimited` is true when sessions are not charged, whatever the buckets say.
- `nextExpiry` lists the credits that will expire, soonest first.
- Readable by any key with `sessions` or `avatars:read` (an avatar-scoped key included), or a signed-in user of the account.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/account/balance (the `GetAccountBalance` operationId).
func (*ClientWithResponses) GetAccountEarningsWithResponse ¶
func (c *ClientWithResponses) GetAccountEarningsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountEarningsResponse, error)
GetAccountEarningsWithResponse Get earnings
Returns what the account's monetized avatars earned, what was paid out, and the wallet balance between them, in microcredits (100 microcredits = 1 credit). This is not the balance sessions spend (`GET /v1/account/balance`); one avatar's earnings are in `GET /v1/avatars/{avatarId}/monetization`.
Readable by an account-wide key with `avatars:read` or a signed-in user of the account; an avatar-scoped key gets `403 avatar_not_allowed`.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/account/earnings (the `GetAccountEarnings` operationId).
func (*ClientWithResponses) GetAccountWithResponse ¶
func (c *ClientWithResponses) GetAccountWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountResponse, error)
GetAccountWithResponse Get the account
Returns the account's plan, its API limits, its prices and its v2 capture quota. Prices are in microcredits (100 microcredits = 1 credit).
- **Plan**: the current plan, and the one it changes to at the end of the cycle, if any.
- **Pricing**: the per-minute price of each kind of session (a conversation or a render, by avatar engine, and a speech session), a preview clip, and each generation call where generation is offered (`pricing.generation`).
- **Limits**: an absent limit or plan field is not set (an absent limit is not capped by the plan).
- **v2**: `v2Access` says whether the account may build v2 avatars; `captureQuota` counts v2 captures queued or running against the cap.
- **Payouts**: `payouts` says whether the account can be paid out, which monetizing an avatar needs.
- Readable by the same callers as `GET /v1/account/balance`.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/account (the `GetAccount` operationId).
func (*ClientWithResponses) GetAvatarAppearanceWithResponse ¶
func (c *ClientWithResponses) GetAvatarAppearanceWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarAppearanceResponse, error)
GetAvatarAppearanceWithResponse Get the portrait
Returns a presigned URL of the portrait last given. The URL expires after about an hour.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars/{avatarId}/appearance (the `GetAvatarAppearance` operationId).
func (*ClientWithResponses) GetAvatarConductorWithResponse ¶
func (c *ClientWithResponses) GetAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarConductorResponse, error)
GetAvatarConductorWithResponse Get the conductor
Returns a v2 avatar's conductor as saved: the whole graph and `speakAfterS`. `GET /v1/avatars/{avatarId}` only reports whether one is set and its node count.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars/{avatarId}/conductor (the `GetAvatarConductor` operationId).
func (*ClientWithResponses) GetAvatarKnowledgeWithResponse ¶
func (c *ClientWithResponses) GetAvatarKnowledgeWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarKnowledgeResponse, error)
GetAvatarKnowledgeWithResponse Get the knowledge
Returns the facts text, the knowledge questionnaire's questions and answers, and the knowledge files with presigned URLs.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars/{avatarId}/knowledge (the `GetAvatarKnowledge` operationId).
func (*ClientWithResponses) GetAvatarMonetizationWithResponse ¶
func (c *ClientWithResponses) GetAvatarMonetizationWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarMonetizationResponse, error)
GetAvatarMonetizationWithResponse Get monetization
Returns whether the avatar is monetized, its last 30 days against the eligibility requirements (the account's own conversations left out), the account's cap on monetized avatars, and what the avatar earned, in microcredits (100 = 1 credit). Requires `avatars:read`.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars/{avatarId}/monetization (the `GetAvatarMonetization` operationId).
func (*ClientWithResponses) GetAvatarSessionWithResponse ¶
func (c *ClientWithResponses) GetAvatarSessionWithResponse(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*GetAvatarSessionResponse, error)
GetAvatarSessionWithResponse Get an avatar session
Reads an API session's state, end reason and cost: a conversation (`POST /v1/sessions`, `kind: conversation`) or a render (`POST /v1/avatar_sessions`, `kind: render`).
- `status` is `pending` (starting), `active` (live), `completed` (ended normally, including by you) or `failed` (it never really started; nothing is billed for time it did not run).
- Once it ended, `endReason` says why, `failureCode` names the failure of a failed session, and `billedSeconds` and `chargedMicrocredits` say what it cost (100 microcredits = 1 credit).
- Billing runs only while both the avatar and the visitor (or your agent) are in the room; `userJoinedAt` and `avatarJoinedAt` say when each joined.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatar_sessions/{id} (the `GetAvatarSession` operationId).
func (*ClientWithResponses) GetAvatarSponsorWithResponse ¶
func (c *ClientWithResponses) GetAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarSponsorResponse, error)
GetAvatarSponsorWithResponse Get the sponsor pool
Returns the avatar's sponsor pool balance and settings. Readable by an API key with `avatars:read` or a signed-in user of the account. Changing the pool takes an API key with `billing:write` or a signed-in user.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars/{avatarId}/sponsor (the `GetAvatarSponsor` operationId).
func (*ClientWithResponses) GetAvatarVoiceWithResponse ¶
func (c *ClientWithResponses) GetAvatarVoiceWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarVoiceResponse, error)
GetAvatarVoiceWithResponse Get the voice
Returns a presigned URL of the voice sample last given, and the voice engine.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars/{avatarId}/voice (the `GetAvatarVoice` operationId).
func (*ClientWithResponses) GetAvatarWithResponse ¶
func (c *ClientWithResponses) GetAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarResponse, error)
GetAvatarWithResponse Get an avatar
Returns the avatar's settings and its build status, stage by stage. Poll it after a create or a change: `stages` and `rebuilding` show progress, and `status` says when it needs you (`failed`, `awaiting_selection`, `stalled`, `draft`). A v2 avatar stays `ready` while a new version builds; when that build needs a candidate picked, `selectionRequired` turns true while `status` stays `ready`.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars/{avatarId} (the `GetAvatar` operationId).
func (*ClientWithResponses) GetCurrentApiKeyWithResponse ¶
func (c *ClientWithResponses) GetCurrentApiKeyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentApiKeyResponse, error)
GetCurrentApiKeyWithResponse Get the current credential
Describes the credential making this call. Readable by the same callers as `GET /v1/account/balance`.
- **API key** (`kind: api_key`): its name, scopes, the avatar it is restricted to, its billing mode, its session caps and how much of its spend cap the current window used. The secret is never returned. `spendCap.enforced` is false when the cap is not applied; `limitMicrocredits` and `remainingMicrocredits` are absent when the key has no cap, and `windowResetsAt` for a lifetime cap (`window: total`).
- **Signed-in user** (`kind: user`): the user and the account it acts for. A user has no key, no scopes beyond the avatar ones and no spend cap.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/api_keys/current (the `GetCurrentApiKey` operationId).
func (*ClientWithResponses) GetSpeechSessionWithResponse ¶
func (c *ClientWithResponses) GetSpeechSessionWithResponse(ctx context.Context, sessionId SpeechSessionPathId, reqEditors ...RequestEditorFn) (*GetSpeechSessionResponse, error)
GetSpeechSessionWithResponse Get a speech session
Reads a speech session's state and, once it ended, why and what it cost.
- `status` is `active` while the session is reserved or connected, then `completed` or `failed`.
- `connectedAt` is when billing started, `endsAt` when the session's time runs out, and `endRequestedAt` when you ended it with a connection open.
- Once it ended, `endReason` says why, and `billedSeconds` and `chargedMicrocredits` what it cost (100 microcredits = 1 credit).
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/speech_sessions/{session_id} (the `GetSpeechSession` operationId).
func (*ClientWithResponses) GetUploadWithResponse ¶
func (c *ClientWithResponses) GetUploadWithResponse(ctx context.Context, uploadId UploadIdPath, reqEditors ...RequestEditorFn) (*GetUploadResponse, error)
GetUploadWithResponse Get an upload
Returns the upload's `status`: `pending` until the file arrives, then `uploaded` (usable once), `consumed` once a create or replace used it, or `expired` an hour after it was created. Only the account that created it can read it. Requires `avatars:read` or `avatars:write`.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/uploads/{uploadId} (the `GetUpload` operationId).
func (*ClientWithResponses) GrantAvatarSponsorWithBodyWithResponse ¶
func (c *ClientWithResponses) GrantAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GrantAvatarSponsorResponse, error)
GrantAvatarSponsorWithBodyWithResponse Fund the sponsor pool
Moves credits from the account into the avatar's sponsor pool. Send an `Idempotency-Key` to retry safely: the same key replays the first result instead of granting twice.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars/{avatarId}/sponsor/grants (the `GrantAvatarSponsor` operationId).
func (*ClientWithResponses) GrantAvatarSponsorWithResponse ¶
func (c *ClientWithResponses) GrantAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, body GrantAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*GrantAvatarSponsorResponse, error)
GrantAvatarSponsorWithResponse Fund the sponsor pool
Moves credits from the account into the avatar's sponsor pool. Send an `Idempotency-Key` to retry safely: the same key replays the first result instead of granting twice.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars/{avatarId}/sponsor/grants (the `GrantAvatarSponsor` operationId).
func (*ClientWithResponses) ListApiKeysWithResponse ¶
func (c *ClientWithResponses) ListApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error)
ListApiKeysWithResponse List the account's API keys (signed-in user only)
Every API key of the account the user acts for, newest first, revoked ones included (`active: false`). The secrets are never returned: a key is recognised by `keyPrefix` and `lastFour`.
Only a signed-in user may manage keys, and only the account's owner or an admin (a member is `403 owner_or_admin_required`): an API key is answered `403 login_required`, so a leaked key can never mint more keys. The owner or an admin may grant any scope, as in Studio.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/api_keys (the `ListApiKeys` operationId).
func (*ClientWithResponses) ListAvatarCandidatesWithResponse ¶
func (c *ClientWithResponses) ListAvatarCandidatesWithResponse(ctx context.Context, avatarId AvatarIdPath, params *ListAvatarCandidatesParams, reqEditors ...RequestEditorFn) (*ListAvatarCandidatesResponse, error)
ListAvatarCandidatesWithResponse List candidates
Lists a v2 avatar's candidates and versions. A candidate (a take) is one capture of the avatar's lip sync and motion, with a short talking preview to compare. A version is one set of capture inputs: the portrait, the voice sample and the preview message.
- `items` lists the current version's takes and the serving take; `versions=all` adds every older version's.
- `versions` always lists every version, oldest first, with what going back to it restores.
- Pick one with `PUT /v1/avatars/{avatarId}/selected_candidate`. With `seedSelection: auto`, the first completed take of the current version is picked for you.
- `seed` is informational: the same seed does not reproduce a capture.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars/{avatarId}/candidates (the `ListAvatarCandidates` operationId).
func (*ClientWithResponses) ListAvatarsWithResponse ¶
func (c *ClientWithResponses) ListAvatarsWithResponse(ctx context.Context, params *ListAvatarsParams, reqEditors ...RequestEditorFn) (*ListAvatarsResponse, error)
ListAvatarsWithResponse List avatars
Lists the account's avatars, newest first. Page with `before`.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/avatars (the `ListAvatars` operationId).
func (*ClientWithResponses) RedeemAccountCodeWithBodyWithResponse ¶
func (c *ClientWithResponses) RedeemAccountCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RedeemAccountCodeResponse, error)
RedeemAccountCodeWithBodyWithResponse Redeem a code
Redeems an invite or credit code for the account. A code can add credits, open v2 avatars (invite-only for now; see `v2Access` on `GET /v1/account`), or both, and the answer says what it gave. Each account redeems a code at most once.
Only a signed-in user may redeem: an API key gets `403 login_required`, so a leaked key cannot spend the account's codes. v2 access applies from the next request.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/account/redeem (the `RedeemAccountCode` operationId).
func (*ClientWithResponses) RedeemAccountCodeWithResponse ¶
func (c *ClientWithResponses) RedeemAccountCodeWithResponse(ctx context.Context, body RedeemAccountCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*RedeemAccountCodeResponse, error)
RedeemAccountCodeWithResponse Redeem a code
Redeems an invite or credit code for the account. A code can add credits, open v2 avatars (invite-only for now; see `v2Access` on `GET /v1/account`), or both, and the answer says what it gave. Each account redeems a code at most once.
Only a signed-in user may redeem: an API key gets `403 login_required`, so a leaked key cannot spend the account's codes. v2 access applies from the next request.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/account/redeem (the `RedeemAccountCode` operationId).
func (*ClientWithResponses) ReplaceAvatarAppearanceWithBodyWithResponse ¶
func (c *ClientWithResponses) ReplaceAvatarAppearanceWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceAvatarAppearanceResponse, error)
ReplaceAvatarAppearanceWithBodyWithResponse Replace the portrait
Replaces the avatar's portrait and re-runs the build stages that depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its portrait this way (on v2, the first candidate is captured once the voice is there too).
- **Body**: the image (jpg, png or webp, up to 10 MB) as the `file` part of `multipart/form-data`. Where `POST /v1/uploads` is available, JSON `{"image": "<https URL or upload:<uploadId>>"}` also works, with a `portrait` upload consumed on success.
- **Portrait**: front-facing, head and shoulders with some margin around the head, the face at least a third of the frame, in even light, with the lips slightly parted. A clearly bad portrait fails the `appearance` stage with a `portrait_*` reason.
- **Scope**: `avatars:write`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/appearance (the `ReplaceAvatarAppearance` operationId).
func (*ClientWithResponses) ReplaceAvatarAppearanceWithResponse ¶
func (c *ClientWithResponses) ReplaceAvatarAppearanceWithResponse(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarAppearanceJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceAvatarAppearanceResponse, error)
ReplaceAvatarAppearanceWithResponse Replace the portrait
Replaces the avatar's portrait and re-runs the build stages that depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its portrait this way (on v2, the first candidate is captured once the voice is there too).
- **Body**: the image (jpg, png or webp, up to 10 MB) as the `file` part of `multipart/form-data`. Where `POST /v1/uploads` is available, JSON `{"image": "<https URL or upload:<uploadId>>"}` also works, with a `portrait` upload consumed on success.
- **Portrait**: front-facing, head and shoulders with some margin around the head, the face at least a third of the frame, in even light, with the lips slightly parted. A clearly bad portrait fails the `appearance` stage with a `portrait_*` reason.
- **Scope**: `avatars:write`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/appearance (the `ReplaceAvatarAppearance` operationId).
func (*ClientWithResponses) ReplaceAvatarKnowledgeWithBodyWithResponse ¶
func (c *ClientWithResponses) ReplaceAvatarKnowledgeWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceAvatarKnowledgeResponse, error)
ReplaceAvatarKnowledgeWithBodyWithResponse Replace the knowledge files
Replaces the avatar's whole set of knowledge files and re-runs the build stages that depend on them; send none to clear the set. The `knowledge.facts` text and the questionnaire answers are kept (change them with `PATCH /v1/avatars/{avatarId}`).
- **Body**: repeat the `files` part for each document (pdf, docx, doc, txt, md, html or csv, up to 50 MB each, at most 20), with an optional `descriptions` JSON object of file name to description. Where `POST /v1/uploads` is available, JSON `{"files": [...], "descriptions": {...}}` also works, with https URLs or `knowledge` uploads consumed on success.
- A URL's file is named by its last path segment, an upload's by its `fileName`; `descriptions` uses those names.
- v2 conversations do not use knowledge yet.
- **Scope**: `avatars:write`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/knowledge (the `ReplaceAvatarKnowledge` operationId).
func (*ClientWithResponses) ReplaceAvatarKnowledgeWithResponse ¶
func (c *ClientWithResponses) ReplaceAvatarKnowledgeWithResponse(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarKnowledgeJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceAvatarKnowledgeResponse, error)
ReplaceAvatarKnowledgeWithResponse Replace the knowledge files
Replaces the avatar's whole set of knowledge files and re-runs the build stages that depend on them; send none to clear the set. The `knowledge.facts` text and the questionnaire answers are kept (change them with `PATCH /v1/avatars/{avatarId}`).
- **Body**: repeat the `files` part for each document (pdf, docx, doc, txt, md, html or csv, up to 50 MB each, at most 20), with an optional `descriptions` JSON object of file name to description. Where `POST /v1/uploads` is available, JSON `{"files": [...], "descriptions": {...}}` also works, with https URLs or `knowledge` uploads consumed on success.
- A URL's file is named by its last path segment, an upload's by its `fileName`; `descriptions` uses those names.
- v2 conversations do not use knowledge yet.
- **Scope**: `avatars:write`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/knowledge (the `ReplaceAvatarKnowledge` operationId).
func (*ClientWithResponses) ReplaceAvatarThumbnailWithBodyWithResponse ¶
func (c *ClientWithResponses) ReplaceAvatarThumbnailWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceAvatarThumbnailResponse, error)
ReplaceAvatarThumbnailWithBodyWithResponse Set the thumbnail
Sets a custom thumbnail for the avatar's Explore card, replacing any other; automatic thumbnails are no longer made for it. Nothing is rebuilt. Returns the avatar, with `profile.thumbnailSource: custom`.
- **Body**: one image (jpg, png or webp, up to 10 MB) as the `file` part. Where `POST /v1/uploads` is available, JSON `{"image": "<https URL or upload:<uploadId>>"}` also works, with a `portrait` upload consumed on success.
- **Scope**: `avatars:write`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/thumbnail (the `ReplaceAvatarThumbnail` operationId).
func (*ClientWithResponses) ReplaceAvatarThumbnailWithResponse ¶
func (c *ClientWithResponses) ReplaceAvatarThumbnailWithResponse(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarThumbnailJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceAvatarThumbnailResponse, error)
ReplaceAvatarThumbnailWithResponse Set the thumbnail
Sets a custom thumbnail for the avatar's Explore card, replacing any other; automatic thumbnails are no longer made for it. Nothing is rebuilt. Returns the avatar, with `profile.thumbnailSource: custom`.
- **Body**: one image (jpg, png or webp, up to 10 MB) as the `file` part. Where `POST /v1/uploads` is available, JSON `{"image": "<https URL or upload:<uploadId>>"}` also works, with a `portrait` upload consumed on success.
- **Scope**: `avatars:write`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/thumbnail (the `ReplaceAvatarThumbnail` operationId).
func (*ClientWithResponses) ReplaceAvatarVoiceWithBodyWithResponse ¶
func (c *ClientWithResponses) ReplaceAvatarVoiceWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceAvatarVoiceResponse, error)
ReplaceAvatarVoiceWithBodyWithResponse Replace the voice
Replaces the avatar's voice sample and re-runs the build stages that depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its voice this way (on v2, the first candidate is captured once the portrait is there too).
- **Body**: one 10 to 60 second recording of clear speech (mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB) as the `file` part. Where `POST /v1/uploads` is available, JSON `{"voice": "<https URL or upload:<uploadId>>"}` also works, with a `voice` upload consumed on success.
- Silence, pure tones or heavy noise fail the voice stage.
- **Scope**: `avatars:write`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/voice (the `ReplaceAvatarVoice` operationId).
func (*ClientWithResponses) ReplaceAvatarVoiceWithResponse ¶
func (c *ClientWithResponses) ReplaceAvatarVoiceWithResponse(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarVoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceAvatarVoiceResponse, error)
ReplaceAvatarVoiceWithResponse Replace the voice
Replaces the avatar's voice sample and re-runs the build stages that depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its voice this way (on v2, the first candidate is captured once the portrait is there too).
- **Body**: one 10 to 60 second recording of clear speech (mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB) as the `file` part. Where `POST /v1/uploads` is available, JSON `{"voice": "<https URL or upload:<uploadId>>"}` also works, with a `voice` upload consumed on success.
- Silence, pure tones or heavy noise fail the voice stage.
- **Scope**: `avatars:write`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/voice (the `ReplaceAvatarVoice` operationId).
func (*ClientWithResponses) RevokeApiKeyWithResponse ¶
func (c *ClientWithResponses) RevokeApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*RevokeApiKeyResponse, error)
RevokeApiKeyWithResponse Revoke an API key (signed-in user only)
Revokes the key for good: it stops authenticating within about 30 seconds (a resolved key is cached that long); sessions it started keep running. Revoking a revoked key answers `200` again with the same key. Only the account's owner or an admin may revoke; an API key is answered `403 login_required`.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/api_keys/{apiKeyId} (the `RevokeApiKey` operationId).
func (*ClientWithResponses) RotateApiKeyWithResponse ¶
func (c *ClientWithResponses) RotateApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*RotateApiKeyResponse, error)
RotateApiKeyWithResponse Issue a new secret for an API key (signed-in user only); the old secret stops working
Replaces the key's secret and returns the new one in `apiKey`, shown only here. The key keeps its id, name, scopes, avatar and caps; the old secret stops authenticating within about 30 seconds. A revoked key cannot be rotated (`409 api_key_revoked`). Only the account's owner or an admin may rotate; an API key is answered `403 login_required`.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/api_keys/{apiKeyId}/rotate (the `RotateApiKey` operationId).
func (*ClientWithResponses) SelectAvatarCandidateWithBodyWithResponse ¶
func (c *ClientWithResponses) SelectAvatarCandidateWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SelectAvatarCandidateResponse, error)
SelectAvatarCandidateWithBodyWithResponse Select a candidate
Picks the completed candidate a v2 avatar serves. The pick is recorded at once (`selectedCandidateId`) and served a few seconds later (`servingCandidateId`). The first pick makes the avatar `ready`; a later one switches without downtime, with `rebuilding` true until it serves.
- **Older versions**: picking a restorable take of an older version (`current: false`, `restorable: true`) restores that version's portrait, voice sample, preview message and default-sentence language in one step. Other settings stay as they are, nothing is captured or charged, and the newer version's unfinished takes are cancelled.
- **Moderation**: inputs already checked together are not checked again; a combination never checked is moderated like an edit.
- Queued, failed and superseded candidates cannot be selected (`409 candidate_not_ready`). Selecting the current pick again is always allowed.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/selected_candidate (the `SelectAvatarCandidate` operationId).
func (*ClientWithResponses) SelectAvatarCandidateWithResponse ¶
func (c *ClientWithResponses) SelectAvatarCandidateWithResponse(ctx context.Context, avatarId AvatarIdPath, body SelectAvatarCandidateJSONRequestBody, reqEditors ...RequestEditorFn) (*SelectAvatarCandidateResponse, error)
SelectAvatarCandidateWithResponse Select a candidate
Picks the completed candidate a v2 avatar serves. The pick is recorded at once (`selectedCandidateId`) and served a few seconds later (`servingCandidateId`). The first pick makes the avatar `ready`; a later one switches without downtime, with `rebuilding` true until it serves.
- **Older versions**: picking a restorable take of an older version (`current: false`, `restorable: true`) restores that version's portrait, voice sample, preview message and default-sentence language in one step. Other settings stay as they are, nothing is captured or charged, and the newer version's unfinished takes are cancelled.
- **Moderation**: inputs already checked together are not checked again; a combination never checked is moderated like an edit.
- Queued, failed and superseded candidates cannot be selected (`409 candidate_not_ready`). Selecting the current pick again is always allowed.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/selected_candidate (the `SelectAvatarCandidate` operationId).
func (*ClientWithResponses) SetAvatarConductorWithBodyWithResponse ¶
func (c *ClientWithResponses) SetAvatarConductorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetAvatarConductorResponse, error)
SetAvatarConductorWithBodyWithResponse Set the conductor
Gives a v2 avatar's conversations an agenda: a graph of steps, each with instructions for the avatar and edges that say when to move on. It replaces any earlier conductor, including one the avatar's own configuration carries, and applies from the next session. Nothing is rebuilt.
- **How it runs**: after each turn, a judge model scores each edge's `when` condition. Edges without a condition share the chance that none holds, by `weight`. The step takes its likeliest edge, or draws one when `random`. A step without edges is the end. A `speak` edge lets the avatar go on without waiting for the user, `speakAfterS` seconds later.
- **Validation**: the graph is checked before it is saved. `400 invalid_conductor` names the field (e.g. `/graph/nodes/2/edges/0/weight`); a value of the wrong JSON type is `422`. Per-field limits are on the schema.
- **Limits**: at most 100 nodes and 100 edges, and 150,000 characters of graph JSON (non-ASCII characters count as their `\uXXXX` escapes). The request body may be up to 512 KiB. A session whose whole configuration would be too large starts without the conductor.
- v1 avatars are refused (`409 not_v2_avatar`).
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/conductor (the `SetAvatarConductor` operationId).
func (*ClientWithResponses) SetAvatarConductorWithResponse ¶
func (c *ClientWithResponses) SetAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, body SetAvatarConductorJSONRequestBody, reqEditors ...RequestEditorFn) (*SetAvatarConductorResponse, error)
SetAvatarConductorWithResponse Set the conductor
Gives a v2 avatar's conversations an agenda: a graph of steps, each with instructions for the avatar and edges that say when to move on. It replaces any earlier conductor, including one the avatar's own configuration carries, and applies from the next session. Nothing is rebuilt.
- **How it runs**: after each turn, a judge model scores each edge's `when` condition. Edges without a condition share the chance that none holds, by `weight`. The step takes its likeliest edge, or draws one when `random`. A step without edges is the end. A `speak` edge lets the avatar go on without waiting for the user, `speakAfterS` seconds later.
- **Validation**: the graph is checked before it is saved. `400 invalid_conductor` names the field (e.g. `/graph/nodes/2/edges/0/weight`); a value of the wrong JSON type is `422`. Per-field limits are on the schema.
- **Limits**: at most 100 nodes and 100 edges, and 150,000 characters of graph JSON (non-ASCII characters count as their `\uXXXX` escapes). The request body may be up to 512 KiB. A session whose whole configuration would be too large starts without the conductor.
- v1 avatars are refused (`409 not_v2_avatar`).
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PUT /v1/avatars/{avatarId}/conductor (the `SetAvatarConductor` operationId).
func (*ClientWithResponses) StartEmbedSessionWithBodyWithResponse
deprecated
func (c *ClientWithResponses) StartEmbedSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartEmbedSessionResponse, error)
StartEmbedSessionWithBodyWithResponse Start an embed avatar session (API-key authenticated, LiveKit only)
Starts a session on behalf of an embed API key instead of a signed-in user. Called by the customer's own backend — never a browser — with `X-Api-Key` in place of a JWT. Always LiveKit; there is no `framework` field. Responds 201 only once the avatar has actually joined the room, and returns `serverUrl`/`roomName` as explicit fields (not a combined `roomUrl`), since that's what `livekit-client`'s `Room.connect()` needs directly.
**Length.** `maxDurationSeconds` is capped server-side at the smallest of the key's own `maxSessionSeconds`, the plan's `limits.maxSessionSeconds` (`GET /v1/account`) and, for `reserve` billing, what the balance can pay for. The response reports what you asked for (`requestedDurationSeconds`), what you got (`actualDurationSeconds`) and whether it was cut (`durationCapped`). The granted length counts from the moment both the visitor and the avatar are in the room, which is also when billing starts.
**Joining and ending.** The visitor must join within 60 seconds of the avatar; otherwise the session ends `failed` with `endReason: no_user_joined` and nothing is billed. End it early with `POST /v1/session/{id}/end`; read its state, end reason and cost with `GET /v1/avatar_sessions/{id}`. An avatar renders one live conversation at a time: a second start on an avatar that is already in a live session of the account answers `409 avatar_busy`.
**App tools.** `appTools.tools` declares functions the avatar may call during the conversation, with `appTools.instructions` saying how and when to use them. Every call reaches the visitor's LiveKit client as an RPC (method `atmee.tool`, payload `{id, name, arguments}`): register a handler for it on the room's local participant; with `x-atmee.mode` `await` its answer is the result the avatar is given. Tools run on Causeur, the conversation runtime v2 avatars are moving to. A session the behavior module runs (every v1 avatar, and a v2 avatar not yet moved) accepts them and never calls them: which runtime serves a session is decided at launch, not by the request, so the start cannot refuse them. A rule broken answers `400 invalid_tools`, the message naming it; so does a tool set that would push the session over Causeur's payload limit with the avatar's own config. The request body may be up to 128 KiB.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/session (the `StartEmbedSession` operationId).
Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
func (*ClientWithResponses) StartEmbedSessionWithResponse ¶
func (c *ClientWithResponses) StartEmbedSessionWithResponse(ctx context.Context, body StartEmbedSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*StartEmbedSessionResponse, error)
StartEmbedSessionWithResponse Start an embed avatar session (API-key authenticated, LiveKit only)
Starts a session on behalf of an embed API key instead of a signed-in user. Called by the customer's own backend — never a browser — with `X-Api-Key` in place of a JWT. Always LiveKit; there is no `framework` field. Responds 201 only once the avatar has actually joined the room, and returns `serverUrl`/`roomName` as explicit fields (not a combined `roomUrl`), since that's what `livekit-client`'s `Room.connect()` needs directly.
**Length.** `maxDurationSeconds` is capped server-side at the smallest of the key's own `maxSessionSeconds`, the plan's `limits.maxSessionSeconds` (`GET /v1/account`) and, for `reserve` billing, what the balance can pay for. The response reports what you asked for (`requestedDurationSeconds`), what you got (`actualDurationSeconds`) and whether it was cut (`durationCapped`). The granted length counts from the moment both the visitor and the avatar are in the room, which is also when billing starts.
**Joining and ending.** The visitor must join within 60 seconds of the avatar; otherwise the session ends `failed` with `endReason: no_user_joined` and nothing is billed. End it early with `POST /v1/session/{id}/end`; read its state, end reason and cost with `GET /v1/avatar_sessions/{id}`. An avatar renders one live conversation at a time: a second start on an avatar that is already in a live session of the account answers `409 avatar_busy`.
**App tools.** `appTools.tools` declares functions the avatar may call during the conversation, with `appTools.instructions` saying how and when to use them. Every call reaches the visitor's LiveKit client as an RPC (method `atmee.tool`, payload `{id, name, arguments}`): register a handler for it on the room's local participant; with `x-atmee.mode` `await` its answer is the result the avatar is given. Tools run on Causeur, the conversation runtime v2 avatars are moving to. A session the behavior module runs (every v1 avatar, and a v2 avatar not yet moved) accepts them and never calls them: which runtime serves a session is decided at launch, not by the request, so the start cannot refuse them. A rule broken answers `400 invalid_tools`, the message naming it; so does a tool set that would push the session over Causeur's payload limit with the avatar's own config. The request body may be up to 128 KiB.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/session (the `StartEmbedSession` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
func (*ClientWithResponses) UpdateApiKeyWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateApiKeyWithBodyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error)
UpdateApiKeyWithBodyWithResponse Edit an API key's scopes and limits (signed-in user only)
Changes the fields sent; the secret stays. `scopes` replaces the whole set (`sessions` is always kept). `avatarId` binds the key to one avatar, and `null` widens it to the whole account. The plan's ceilings are applied again on every edit, also to limits not sent, so the answer can show lower limits than before: read them from it.
Only the account's owner or an admin may edit a key; an API key is answered `403 login_required`. A revoked key is `409 api_key_revoked`.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/api_keys/{apiKeyId} (the `UpdateApiKey` operationId).
func (*ClientWithResponses) UpdateApiKeyWithResponse ¶
func (c *ClientWithResponses) UpdateApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error)
UpdateApiKeyWithResponse Edit an API key's scopes and limits (signed-in user only)
Changes the fields sent; the secret stays. `scopes` replaces the whole set (`sessions` is always kept). `avatarId` binds the key to one avatar, and `null` widens it to the whole account. The plan's ceilings are applied again on every edit, also to limits not sent, so the answer can show lower limits than before: read them from it.
Only the account's owner or an admin may edit a key; an API key is answered `403 login_required`. A revoked key is `409 api_key_revoked`.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/api_keys/{apiKeyId} (the `UpdateApiKey` operationId).
func (*ClientWithResponses) UpdateAvatarSponsorWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAvatarSponsorResponse, error)
UpdateAvatarSponsorWithBodyWithResponse Update sponsor settings
Changes who may spend the avatar's sponsor pool, and when. The request applies all of its fields or none.
- `anonymousAccess: true` lets visitors without an account spend the pool. The avatar must be funded first (`409 avatar_not_budget_managed`: grant credits or turn on auto top-up) and public or unlisted (`409 avatar_not_shared`).
- `autoTopupEnabled: true` needs a threshold and an amount, sent or already stored (`400 auto_topup_incomplete`).
- A monetized avatar cannot be sponsored (`409 monetized_avatar_cannot_be_sponsored`).
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/avatars/{avatarId}/sponsor (the `UpdateAvatarSponsor` operationId).
func (*ClientWithResponses) UpdateAvatarSponsorWithResponse ¶
func (c *ClientWithResponses) UpdateAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAvatarSponsorResponse, error)
UpdateAvatarSponsorWithResponse Update sponsor settings
Changes who may spend the avatar's sponsor pool, and when. The request applies all of its fields or none.
- `anonymousAccess: true` lets visitors without an account spend the pool. The avatar must be funded first (`409 avatar_not_budget_managed`: grant credits or turn on auto top-up) and public or unlisted (`409 avatar_not_shared`).
- `autoTopupEnabled: true` needs a threshold and an amount, sent or already stored (`400 auto_topup_incomplete`).
- A monetized avatar cannot be sponsored (`409 monetized_avatar_cannot_be_sponsored`).
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/avatars/{avatarId}/sponsor (the `UpdateAvatarSponsor` operationId).
func (*ClientWithResponses) UpdateAvatarWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateAvatarWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAvatarResponse, error)
UpdateAvatarWithBodyWithResponse Update an avatar
Changes an avatar's settings, persona, knowledge or share card, and returns the avatar. Send only the fields to change: an absent or `null` field stays as it is, and an empty value (`""`, `[]` or `{}`) clears an optional one.
- **Persona edits** rebuild the persona in the background and are moderated again. A v1 avatar is briefly not ready; a v2 avatar keeps serving until the new persona is live.
- **v2 build inputs**: a new `previewMessage` or `resolution` builds a new version with new candidates, like a new portrait or voice, while the serving candidate keeps serving. `blackoutRecovery` and `runtimeSeed` apply from the next session and rebuild nothing.
- **Knowledge**: knowledge files stay; replace them with `PUT /v1/avatars/{avatarId}/knowledge`.
- **Visibility**: `public` needs a title, a tag, a subtitle, a description and a thumbnail (`409 public_requirements_missing` lists what is missing). `public` and `unlisted` must pass moderation (`409 moderation_blocked`).
- **Atomicity**: every field is checked first. The name, description, share fields, statement, monetization and visibility are written together, and a refusal of any of them writes nothing. The rest is written after, so after a later error, send the same request again to retry.
| Field | Rule | |---|---| | `name` | At most 100 characters once trimmed, counted in UTF-16 units (`400 name_invalid`). | | `whoPrompt`, `whatPrompt`, `selfIntroduction` | Cannot be emptied: `""` is `422`, and so is a blank `selfIntroduction` under 51 characters. Other blank text is `400 invalid_manifest`. | | `personality`, `scenario` | Older names of `whoPrompt` and `whatPrompt`, at the top level or in `persona`. A field given twice is `400 invalid_body`. | | `previewMessage` | `""` goes back to the default sentence. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). | | `knowledge.facts` | Replaces the knowledge text, at most 32,000 characters; `""` removes it. | | `knowledge.questionnaire` | Replaces Creator Studio's questionnaire answers, question to answer; `{}` removes them. An unknown question, or a blank answer or one over 2,000 characters, is `400 invalid_manifest`. | | `title`, `subtitle`, `description` | Share card text, at most 100, 200 and 280 characters; `""` clears it. | | `tags`, `socialLinks` | Whole sets; `[]` clears them. At most 5 tags, each with a letter or digit. Each platform's link at most once, an https URL of at most 500 characters. | | `statementType` | Who the avatar depicts; `""` resets it. It cannot change while the avatar is monetized (`409 avatar_is_earning`), and changing it clears `verified`. | | `monetization` | `enabled` turns monetization on or off. On needs a verified avatar or the fictional statement, verified payouts, the 30-day eligibility and room under the plan's cap (each a `409`), and `confirmSponsorWithdrawal: true` when the sponsor pool holds credits, which turning it on withdraws to the account. Off always works. |
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/avatars/{avatarId} (the `UpdateAvatar` operationId).
func (*ClientWithResponses) UpdateAvatarWithResponse ¶
func (c *ClientWithResponses) UpdateAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAvatarResponse, error)
UpdateAvatarWithResponse Update an avatar
Changes an avatar's settings, persona, knowledge or share card, and returns the avatar. Send only the fields to change: an absent or `null` field stays as it is, and an empty value (`""`, `[]` or `{}`) clears an optional one.
- **Persona edits** rebuild the persona in the background and are moderated again. A v1 avatar is briefly not ready; a v2 avatar keeps serving until the new persona is live.
- **v2 build inputs**: a new `previewMessage` or `resolution` builds a new version with new candidates, like a new portrait or voice, while the serving candidate keeps serving. `blackoutRecovery` and `runtimeSeed` apply from the next session and rebuild nothing.
- **Knowledge**: knowledge files stay; replace them with `PUT /v1/avatars/{avatarId}/knowledge`.
- **Visibility**: `public` needs a title, a tag, a subtitle, a description and a thumbnail (`409 public_requirements_missing` lists what is missing). `public` and `unlisted` must pass moderation (`409 moderation_blocked`).
- **Atomicity**: every field is checked first. The name, description, share fields, statement, monetization and visibility are written together, and a refusal of any of them writes nothing. The rest is written after, so after a later error, send the same request again to retry.
| Field | Rule | |---|---| | `name` | At most 100 characters once trimmed, counted in UTF-16 units (`400 name_invalid`). | | `whoPrompt`, `whatPrompt`, `selfIntroduction` | Cannot be emptied: `""` is `422`, and so is a blank `selfIntroduction` under 51 characters. Other blank text is `400 invalid_manifest`. | | `personality`, `scenario` | Older names of `whoPrompt` and `whatPrompt`, at the top level or in `persona`. A field given twice is `400 invalid_body`. | | `previewMessage` | `""` goes back to the default sentence. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). | | `knowledge.facts` | Replaces the knowledge text, at most 32,000 characters; `""` removes it. | | `knowledge.questionnaire` | Replaces Creator Studio's questionnaire answers, question to answer; `{}` removes them. An unknown question, or a blank answer or one over 2,000 characters, is `400 invalid_manifest`. | | `title`, `subtitle`, `description` | Share card text, at most 100, 200 and 280 characters; `""` clears it. | | `tags`, `socialLinks` | Whole sets; `[]` clears them. At most 5 tags, each with a letter or digit. Each platform's link at most once, an https URL of at most 500 characters. | | `statementType` | Who the avatar depicts; `""` resets it. It cannot change while the avatar is monetized (`409 avatar_is_earning`), and changing it clears `verified`. | | `monetization` | `enabled` turns monetization on or off. On needs a verified avatar or the fictional statement, verified payouts, the 30-day eligibility and room under the plan's cap (each a `409`), and `confirmSponsorWithdrawal: true` when the sponsor pool holds credits, which turning it on withdraws to the account. Off always works. |
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/avatars/{avatarId} (the `UpdateAvatar` operationId).
func (*ClientWithResponses) WithdrawAvatarSponsorWithBodyWithResponse ¶
func (c *ClientWithResponses) WithdrawAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WithdrawAvatarSponsorResponse, error)
WithdrawAvatarSponsorWithBodyWithResponse Withdraw sponsor credits
Returns the sponsor pool's unreserved credits to the account.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars/{avatarId}/sponsor/withdrawals (the `WithdrawAvatarSponsor` operationId).
func (*ClientWithResponses) WithdrawAvatarSponsorWithResponse ¶
func (c *ClientWithResponses) WithdrawAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, body WithdrawAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*WithdrawAvatarSponsorResponse, error)
WithdrawAvatarSponsorWithResponse Withdraw sponsor credits
Returns the sponsor pool's unreserved credits to the account.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/avatars/{avatarId}/sponsor/withdrawals (the `WithdrawAvatarSponsor` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetAccountWithResponse Get the account
//
// Returns the account's plan, its API limits, its prices and its v2
// capture quota. Prices are in microcredits (100 microcredits = 1 credit).
//
// - **Plan**: the current plan, and the one it changes to at the end of
// the cycle, if any.
// - **Pricing**: the per-minute price of each kind of session (a
// conversation or a render, by avatar engine, and a speech session), a
// preview clip, and each generation call where generation is offered
// (`pricing.generation`).
// - **Limits**: an absent limit or plan field is not set (an absent limit
// is not capped by the plan).
// - **v2**: `v2Access` says whether the account may build v2 avatars;
// `captureQuota` counts v2 captures queued or running against the cap.
// - **Payouts**: `payouts` says whether the account can be paid out, which
// monetizing an avatar needs.
// - Readable by the same callers as `GET /v1/account/balance`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/account (the `GetAccount` operationId).
GetAccountWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountResponse, error)
// GetAccountBalanceWithResponse Get the balance
//
// Returns the credits the account can spend on sessions, in microcredits
// (100 microcredits = 1 credit). An avatar's sponsor pool is not included
// (see `GET /v1/avatars/{avatarId}/sponsor`).
//
// - `spendableMicrocredits` is what a session is admitted on: every bucket
// for a reserve-mode key or a signed-in user, only the plan and top-up
// buckets for a metered key (`couponSpendable: false`).
// - Live sessions' reservations are already taken out, and reported as
// `heldByLiveSessionsMicrocredits`.
// - `unlimited` is true when sessions are not charged, whatever the
// buckets say.
// - `nextExpiry` lists the credits that will expire, soonest first.
// - Readable by any key with `sessions` or `avatars:read` (an
// avatar-scoped key included), or a signed-in user of the account.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/account/balance (the `GetAccountBalance` operationId).
GetAccountBalanceWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountBalanceResponse, error)
// GetAccountEarningsWithResponse Get earnings
//
// Returns what the account's monetized avatars earned, what was paid out,
// and the wallet balance between them, in microcredits (100 microcredits =
// 1 credit). This is not the balance sessions spend (`GET
// /v1/account/balance`); one avatar's earnings are in `GET
// /v1/avatars/{avatarId}/monetization`.
//
// Readable by an account-wide key with `avatars:read` or a signed-in user
// of the account; an avatar-scoped key gets `403 avatar_not_allowed`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/account/earnings (the `GetAccountEarnings` operationId).
GetAccountEarningsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountEarningsResponse, error)
// RedeemAccountCodeWithBodyWithResponse Redeem a code
//
// Redeems an invite or credit code for the account. A code can add
// credits, open v2 avatars (invite-only for now; see `v2Access` on `GET
// /v1/account`), or both, and the answer says what it gave. Each account
// redeems a code at most once.
//
// Only a signed-in user may redeem: an API key gets `403 login_required`,
// so a leaked key cannot spend the account's codes. v2 access applies from
// the next request.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/account/redeem (the `RedeemAccountCode` operationId).
RedeemAccountCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RedeemAccountCodeResponse, error)
// RedeemAccountCodeWithResponse Redeem a code
//
// Redeems an invite or credit code for the account. A code can add
// credits, open v2 avatars (invite-only for now; see `v2Access` on `GET
// /v1/account`), or both, and the answer says what it gave. Each account
// redeems a code at most once.
//
// Only a signed-in user may redeem: an API key gets `403 login_required`,
// so a leaked key cannot spend the account's codes. v2 access applies from
// the next request.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/account/redeem (the `RedeemAccountCode` operationId).
RedeemAccountCodeWithResponse(ctx context.Context, body RedeemAccountCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*RedeemAccountCodeResponse, error)
// ListApiKeysWithResponse List the account's API keys (signed-in user only)
//
// Every API key of the account the user acts for, newest first,
// revoked ones included (`active: false`). The secrets are never
// returned: a key is recognised by `keyPrefix` and `lastFour`.
//
// Only a signed-in user may manage keys, and only the account's owner
// or an admin (a member is `403 owner_or_admin_required`): an API key
// is answered `403 login_required`, so a leaked key can never mint
// more keys. The owner or an admin may grant any scope, as in Studio.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/api_keys (the `ListApiKeys` operationId).
ListApiKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error)
// CreateApiKeyWithBodyWithResponse Create an API key (signed-in user only); the secret is shown once
//
// Creates a key for the account the user acts for and returns its
// secret in `apiKey`. **The secret is returned only here** (and by
// rotate): store it at once, in your backend's secret store or an
// environment variable, never in a browser or a repository.
//
// Keep keys narrow: give a key only the scopes it needs (`sessions` is
// always included), bind it to one avatar with `avatarId` when it
// serves one app, and set its own caps. Omitted caps take the plan's
// maximum; a value above the plan's is lowered to it. The spend cap
// defaults to 500 credits (50,000 microcredits) per `spendCapWindow`.
//
// Only a signed-in user may create keys, and only the account's owner
// or an admin: an API key is answered `403 login_required`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/api_keys (the `CreateApiKey` operationId).
CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)
// CreateApiKeyWithResponse Create an API key (signed-in user only); the secret is shown once
//
// Creates a key for the account the user acts for and returns its
// secret in `apiKey`. **The secret is returned only here** (and by
// rotate): store it at once, in your backend's secret store or an
// environment variable, never in a browser or a repository.
//
// Keep keys narrow: give a key only the scopes it needs (`sessions` is
// always included), bind it to one avatar with `avatarId` when it
// serves one app, and set its own caps. Omitted caps take the plan's
// maximum; a value above the plan's is lowered to it. The spend cap
// defaults to 500 credits (50,000 microcredits) per `spendCapWindow`.
//
// Only a signed-in user may create keys, and only the account's owner
// or an admin: an API key is answered `403 login_required`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/api_keys (the `CreateApiKey` operationId).
CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)
// GetCurrentApiKeyWithResponse Get the current credential
//
// Describes the credential making this call. Readable by the same callers
// as `GET /v1/account/balance`.
//
// - **API key** (`kind: api_key`): its name, scopes, the avatar it is
// restricted to, its billing mode, its session caps and how much of its
// spend cap the current window used. The secret is never returned.
// `spendCap.enforced` is false when the cap is not applied;
// `limitMicrocredits` and `remainingMicrocredits` are absent when the
// key has no cap, and `windowResetsAt` for a lifetime cap (`window:
// total`).
// - **Signed-in user** (`kind: user`): the user and the account it acts
// for. A user has no key, no scopes beyond the avatar ones and no spend
// cap.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/api_keys/current (the `GetCurrentApiKey` operationId).
GetCurrentApiKeyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentApiKeyResponse, error)
// RevokeApiKeyWithResponse Revoke an API key (signed-in user only)
//
// Revokes the key for good: it stops authenticating within about 30
// seconds (a resolved key is cached that long); sessions it started
// keep running. Revoking a revoked key answers `200` again with the
// same key. Only the account's owner or an admin may revoke; an API
// key is answered `403 login_required`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/api_keys/{apiKeyId} (the `RevokeApiKey` operationId).
RevokeApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*RevokeApiKeyResponse, error)
// UpdateApiKeyWithBodyWithResponse Edit an API key's scopes and limits (signed-in user only)
//
// Changes the fields sent; the secret stays. `scopes` replaces the whole
// set (`sessions` is always kept). `avatarId` binds the key to one
// avatar, and `null` widens it to the whole account. The plan's ceilings
// are applied again on every edit, also to limits not sent, so the
// answer can show lower limits than before: read them from it.
//
// Only the account's owner or an admin may edit a key; an API key is
// answered `403 login_required`. A revoked key is `409 api_key_revoked`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/api_keys/{apiKeyId} (the `UpdateApiKey` operationId).
UpdateApiKeyWithBodyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error)
// UpdateApiKeyWithResponse Edit an API key's scopes and limits (signed-in user only)
//
// Changes the fields sent; the secret stays. `scopes` replaces the whole
// set (`sessions` is always kept). `avatarId` binds the key to one
// avatar, and `null` widens it to the whole account. The plan's ceilings
// are applied again on every edit, also to limits not sent, so the
// answer can show lower limits than before: read them from it.
//
// Only the account's owner or an admin may edit a key; an API key is
// answered `403 login_required`. A revoked key is `409 api_key_revoked`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/api_keys/{apiKeyId} (the `UpdateApiKey` operationId).
UpdateApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error)
// RotateApiKeyWithResponse Issue a new secret for an API key (signed-in user only); the old secret stops working
//
// Replaces the key's secret and returns the new one in `apiKey`, shown
// only here. The key keeps its id, name, scopes, avatar and caps; the
// old secret stops authenticating within about 30 seconds. A revoked
// key cannot be rotated (`409 api_key_revoked`). Only the account's
// owner or an admin may rotate; an API key is answered `403
// login_required`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/api_keys/{apiKeyId}/rotate (the `RotateApiKey` operationId).
RotateApiKeyWithResponse(ctx context.Context, apiKeyId ApiKeyIdPath, reqEditors ...RequestEditorFn) (*RotateApiKeyResponse, error)
// GetAvatarSessionWithResponse Get an avatar session
//
// Reads an API session's state, end reason and cost: a conversation (`POST
// /v1/sessions`, `kind: conversation`) or a render (`POST
// /v1/avatar_sessions`, `kind: render`).
//
// - `status` is `pending` (starting), `active` (live), `completed` (ended
// normally, including by you) or `failed` (it never really started;
// nothing is billed for time it did not run).
// - Once it ended, `endReason` says why, `failureCode` names the failure
// of a failed session, and `billedSeconds` and `chargedMicrocredits` say
// what it cost (100 microcredits = 1 credit).
// - Billing runs only while both the avatar and the visitor (or your
// agent) are in the room; `userJoinedAt` and `avatarJoinedAt` say when
// each joined.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatar_sessions/{id} (the `GetAvatarSession` operationId).
GetAvatarSessionWithResponse(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*GetAvatarSessionResponse, error)
// EndAvatarSessionWithResponse End an avatar session
//
// Ends an API session now and stops billing. It settles `completed` with
// `endReason: ended_by_api`. For a conversation, this is the same as `POST
// /v1/sessions/{id}/end` with an API key.
//
// - **Idempotent**: a session that already ended answers `200` with
// `alreadyEnded: true`, so it is safe to call from every teardown path.
// - **Renders** usually end on their own when your agent leaves, the room
// closes or you remove the avatar participant. Call this to stop paying
// while your room stays open; it does not remove the avatar from your
// room, so remove the participant yourself.
// - **Conversations**: the room is closed.
// - Only sessions started through the API can be ended here (website
// sessions are `404`), and an avatar-scoped key ends only its avatar's.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatar_sessions/{id}/end (the `EndAvatarSession` operationId).
EndAvatarSessionWithResponse(ctx context.Context, id AvatarSessionIdPath, reqEditors ...RequestEditorFn) (*EndAvatarSessionResponse, error)
// ListAvatarsWithResponse List avatars
//
// Lists the account's avatars, newest first. Page with `before`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars (the `ListAvatars` operationId).
ListAvatarsWithResponse(ctx context.Context, params *ListAvatarsParams, reqEditors ...RequestEditorFn) (*ListAvatarsResponse, error)
// CreateAvatarWithBodyWithResponse Create an avatar
//
// Creates an avatar from a portrait, a voice sample, a persona and
// knowledge. A complete avatar builds in the background (`202`, `status:
// building`): follow it with `GET /v1/avatars/{avatarId}`.
//
// Send one of three body shapes:
//
// | Body | Content type | Contents |
// |---|---|---|
// | Image | `multipart/form-data` | The portrait as the `file` part, plus `name` (and optional `description`). Makes a render-only avatar: `201`, `ready` at once. Add a voice later to make it talk. |
// | Zip | `multipart/form-data` (`file`) or `application/zip` | `avatar.json` plus `image/`, `voice/`, `prompt/prompt.txt` and `knowledge/`. |
// | JSON | `application/json` | The manifest, with an `assets` block naming each file by https URL or `upload:<uploadId>`. |
//
// - **Engine**: `engine` is `v1` (default) or `v2`. A v2 create captures
// `seedPreviews.count` candidates and, with `seedSelection: auto`
// (default), serves the first that completes. v2 is invite-only (`403
// v2_access_required`).
// - **Drafts**: the portrait and the voice are optional in zip and JSON
// bodies. Without either (other than a v1 avatar with a portrait, which
// is render-only) the avatar is a `draft`, and `missingInputs` names
// what to add with `PUT /v1/avatars/{avatarId}/appearance` or
// `PUT /v1/avatars/{avatarId}/voice`.
// - **Portrait**: use a front-facing photo of one person, head and
// shoulders, the face at least a third of the frame, in even light, with
// the lips slightly parted. A clearly bad portrait fails the
// `appearance` stage with a `portrait_*` reason.
// - **Uploads**: a create that succeeds consumes its uploads; one that
// fails leaves them usable for a retry.
// - **Captures** count against the account's limit of 10 queued or
// running. A v2 create returns `X-RateLimit-Limit` and
// `X-RateLimit-Remaining`, and `429 rate_limited` when the captures do
// not fit.
// - **Scopes**: `avatars:write`, plus `billing:write` with a `sponsor`
// block.
//
// | Manifest field | Rule |
// |---|---|
// | `persona` | `whoPrompt` (who the avatar is), `whatPrompt` (what it does with the visitor; in a zip, `prompt/prompt.txt` instead, not both), `preferredAlias`, `spokenName`, `knownAliases`, `greeting`, `selfIntroduction` (derived from `whoPrompt` when absent), `guardrails`, `conversationalHabits`. `personality` and `scenario` are older names of `whoPrompt` and `whatPrompt`; a field under both names is `400 invalid_manifest`. |
// | `previewMessage` | The line preview clips speak; omit it for a default sentence in the avatar's language. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). |
// | `previews` | `true` generates preview clips (default off; change it with PATCH). |
// | `seedPreviews`, `seedSelection` | v2 only, and only with the portrait and the voice: `count` candidates (default 1, at most 10), and `auto` (default) or `manual` selection. |
// | `knowledge.facts` | The avatar's knowledge as text, at most 32,000 characters (`400 invalid_manifest`). |
// | `knowledge.questionnaire` | Answers to Creator Studio's knowledge questions (listed by `GET /v1/avatars/{avatarId}/knowledge`), each at most 2,000 characters. |
// | `knowledge.descriptions` | Maps a knowledge file name to a short description. |
// | `blackoutRecovery`, `runtimeSeed`, `resolution` | v2 render settings (see their schemas). v1 avatars ignore the first two and refuse `resolution` (`400 invalid_input`). |
// | `aspectRatio` | v2 only: the avatar's shape, `square` (default, 512 × 512), `portrait` (384 × 640) or `landscape` (640 × 384); see `AspectRatio`. `resolution` names a size this deployment offers instead; send one or the other, not both. v1 avatars refuse it (`400 invalid_input`). |
//
// v2 conversations do not use knowledge yet.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars (the `CreateAvatar` operationId).
CreateAvatarWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAvatarResponse, error)
// CreateAvatarWithResponse Create an avatar
//
// Creates an avatar from a portrait, a voice sample, a persona and
// knowledge. A complete avatar builds in the background (`202`, `status:
// building`): follow it with `GET /v1/avatars/{avatarId}`.
//
// Send one of three body shapes:
//
// | Body | Content type | Contents |
// |---|---|---|
// | Image | `multipart/form-data` | The portrait as the `file` part, plus `name` (and optional `description`). Makes a render-only avatar: `201`, `ready` at once. Add a voice later to make it talk. |
// | Zip | `multipart/form-data` (`file`) or `application/zip` | `avatar.json` plus `image/`, `voice/`, `prompt/prompt.txt` and `knowledge/`. |
// | JSON | `application/json` | The manifest, with an `assets` block naming each file by https URL or `upload:<uploadId>`. |
//
// - **Engine**: `engine` is `v1` (default) or `v2`. A v2 create captures
// `seedPreviews.count` candidates and, with `seedSelection: auto`
// (default), serves the first that completes. v2 is invite-only (`403
// v2_access_required`).
// - **Drafts**: the portrait and the voice are optional in zip and JSON
// bodies. Without either (other than a v1 avatar with a portrait, which
// is render-only) the avatar is a `draft`, and `missingInputs` names
// what to add with `PUT /v1/avatars/{avatarId}/appearance` or
// `PUT /v1/avatars/{avatarId}/voice`.
// - **Portrait**: use a front-facing photo of one person, head and
// shoulders, the face at least a third of the frame, in even light, with
// the lips slightly parted. A clearly bad portrait fails the
// `appearance` stage with a `portrait_*` reason.
// - **Uploads**: a create that succeeds consumes its uploads; one that
// fails leaves them usable for a retry.
// - **Captures** count against the account's limit of 10 queued or
// running. A v2 create returns `X-RateLimit-Limit` and
// `X-RateLimit-Remaining`, and `429 rate_limited` when the captures do
// not fit.
// - **Scopes**: `avatars:write`, plus `billing:write` with a `sponsor`
// block.
//
// | Manifest field | Rule |
// |---|---|
// | `persona` | `whoPrompt` (who the avatar is), `whatPrompt` (what it does with the visitor; in a zip, `prompt/prompt.txt` instead, not both), `preferredAlias`, `spokenName`, `knownAliases`, `greeting`, `selfIntroduction` (derived from `whoPrompt` when absent), `guardrails`, `conversationalHabits`. `personality` and `scenario` are older names of `whoPrompt` and `whatPrompt`; a field under both names is `400 invalid_manifest`. |
// | `previewMessage` | The line preview clips speak; omit it for a default sentence in the avatar's language. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). |
// | `previews` | `true` generates preview clips (default off; change it with PATCH). |
// | `seedPreviews`, `seedSelection` | v2 only, and only with the portrait and the voice: `count` candidates (default 1, at most 10), and `auto` (default) or `manual` selection. |
// | `knowledge.facts` | The avatar's knowledge as text, at most 32,000 characters (`400 invalid_manifest`). |
// | `knowledge.questionnaire` | Answers to Creator Studio's knowledge questions (listed by `GET /v1/avatars/{avatarId}/knowledge`), each at most 2,000 characters. |
// | `knowledge.descriptions` | Maps a knowledge file name to a short description. |
// | `blackoutRecovery`, `runtimeSeed`, `resolution` | v2 render settings (see their schemas). v1 avatars ignore the first two and refuse `resolution` (`400 invalid_input`). |
// | `aspectRatio` | v2 only: the avatar's shape, `square` (default, 512 × 512), `portrait` (384 × 640) or `landscape` (640 × 384); see `AspectRatio`. `resolution` names a size this deployment offers instead; send one or the other, not both. v1 avatars refuse it (`400 invalid_input`). |
//
// v2 conversations do not use knowledge yet.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars (the `CreateAvatar` operationId).
CreateAvatarWithResponse(ctx context.Context, body CreateAvatarJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAvatarResponse, error)
// DeleteAvatarWithResponse Delete an avatar
//
// Deletes the avatar: it disappears from the API at once and its
// unfinished captures are cancelled. Its files, every version's included,
// are removed permanently after the retention period.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/avatars/{avatarId} (the `DeleteAvatar` operationId).
DeleteAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarResponse, error)
// GetAvatarWithResponse Get an avatar
//
// Returns the avatar's settings and its build status, stage by stage.
// Poll it after a create or a change: `stages` and `rebuilding` show
// progress, and `status` says when it needs you (`failed`,
// `awaiting_selection`, `stalled`, `draft`). A v2 avatar stays `ready`
// while a new version builds; when that build needs a candidate picked,
// `selectionRequired` turns true while `status` stays `ready`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars/{avatarId} (the `GetAvatar` operationId).
GetAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarResponse, error)
// UpdateAvatarWithBodyWithResponse Update an avatar
//
// Changes an avatar's settings, persona, knowledge or share card, and
// returns the avatar. Send only the fields to change: an absent or `null`
// field stays as it is, and an empty value (`""`, `[]` or `{}`) clears an
// optional one.
//
// - **Persona edits** rebuild the persona in the background and are
// moderated again. A v1 avatar is briefly not ready; a v2 avatar keeps
// serving until the new persona is live.
// - **v2 build inputs**: a new `previewMessage` or `resolution` builds a
// new version with new candidates, like a new portrait or voice, while
// the serving candidate keeps serving. `blackoutRecovery` and
// `runtimeSeed` apply from the next session and rebuild nothing.
// - **Knowledge**: knowledge files stay; replace them with `PUT
// /v1/avatars/{avatarId}/knowledge`.
// - **Visibility**: `public` needs a title, a tag, a subtitle, a
// description and a thumbnail (`409 public_requirements_missing` lists
// what is missing). `public` and `unlisted` must pass moderation (`409
// moderation_blocked`).
// - **Atomicity**: every field is checked first. The name, description,
// share fields, statement, monetization and visibility are written
// together, and a refusal of any of them writes nothing. The rest is
// written after, so after a later error, send the same request again to
// retry.
//
// | Field | Rule |
// |---|---|
// | `name` | At most 100 characters once trimmed, counted in UTF-16 units (`400 name_invalid`). |
// | `whoPrompt`, `whatPrompt`, `selfIntroduction` | Cannot be emptied: `""` is `422`, and so is a blank `selfIntroduction` under 51 characters. Other blank text is `400 invalid_manifest`. |
// | `personality`, `scenario` | Older names of `whoPrompt` and `whatPrompt`, at the top level or in `persona`. A field given twice is `400 invalid_body`. |
// | `previewMessage` | `""` goes back to the default sentence. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). |
// | `knowledge.facts` | Replaces the knowledge text, at most 32,000 characters; `""` removes it. |
// | `knowledge.questionnaire` | Replaces Creator Studio's questionnaire answers, question to answer; `{}` removes them. An unknown question, or a blank answer or one over 2,000 characters, is `400 invalid_manifest`. |
// | `title`, `subtitle`, `description` | Share card text, at most 100, 200 and 280 characters; `""` clears it. |
// | `tags`, `socialLinks` | Whole sets; `[]` clears them. At most 5 tags, each with a letter or digit. Each platform's link at most once, an https URL of at most 500 characters. |
// | `statementType` | Who the avatar depicts; `""` resets it. It cannot change while the avatar is monetized (`409 avatar_is_earning`), and changing it clears `verified`. |
// | `monetization` | `enabled` turns monetization on or off. On needs a verified avatar or the fictional statement, verified payouts, the 30-day eligibility and room under the plan's cap (each a `409`), and `confirmSponsorWithdrawal: true` when the sponsor pool holds credits, which turning it on withdraws to the account. Off always works. |
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/avatars/{avatarId} (the `UpdateAvatar` operationId).
UpdateAvatarWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAvatarResponse, error)
// UpdateAvatarWithResponse Update an avatar
//
// Changes an avatar's settings, persona, knowledge or share card, and
// returns the avatar. Send only the fields to change: an absent or `null`
// field stays as it is, and an empty value (`""`, `[]` or `{}`) clears an
// optional one.
//
// - **Persona edits** rebuild the persona in the background and are
// moderated again. A v1 avatar is briefly not ready; a v2 avatar keeps
// serving until the new persona is live.
// - **v2 build inputs**: a new `previewMessage` or `resolution` builds a
// new version with new candidates, like a new portrait or voice, while
// the serving candidate keeps serving. `blackoutRecovery` and
// `runtimeSeed` apply from the next session and rebuild nothing.
// - **Knowledge**: knowledge files stay; replace them with `PUT
// /v1/avatars/{avatarId}/knowledge`.
// - **Visibility**: `public` needs a title, a tag, a subtitle, a
// description and a thumbnail (`409 public_requirements_missing` lists
// what is missing). `public` and `unlisted` must pass moderation (`409
// moderation_blocked`).
// - **Atomicity**: every field is checked first. The name, description,
// share fields, statement, monetization and visibility are written
// together, and a refusal of any of them writes nothing. The rest is
// written after, so after a later error, send the same request again to
// retry.
//
// | Field | Rule |
// |---|---|
// | `name` | At most 100 characters once trimmed, counted in UTF-16 units (`400 name_invalid`). |
// | `whoPrompt`, `whatPrompt`, `selfIntroduction` | Cannot be emptied: `""` is `422`, and so is a blank `selfIntroduction` under 51 characters. Other blank text is `400 invalid_manifest`. |
// | `personality`, `scenario` | Older names of `whoPrompt` and `whatPrompt`, at the top level or in `persona`. A field given twice is `400 invalid_body`. |
// | `previewMessage` | `""` goes back to the default sentence. On v2 at most 300 Unicode code points (`400 preview_message_too_long`). |
// | `knowledge.facts` | Replaces the knowledge text, at most 32,000 characters; `""` removes it. |
// | `knowledge.questionnaire` | Replaces Creator Studio's questionnaire answers, question to answer; `{}` removes them. An unknown question, or a blank answer or one over 2,000 characters, is `400 invalid_manifest`. |
// | `title`, `subtitle`, `description` | Share card text, at most 100, 200 and 280 characters; `""` clears it. |
// | `tags`, `socialLinks` | Whole sets; `[]` clears them. At most 5 tags, each with a letter or digit. Each platform's link at most once, an https URL of at most 500 characters. |
// | `statementType` | Who the avatar depicts; `""` resets it. It cannot change while the avatar is monetized (`409 avatar_is_earning`), and changing it clears `verified`. |
// | `monetization` | `enabled` turns monetization on or off. On needs a verified avatar or the fictional statement, verified payouts, the 30-day eligibility and room under the plan's cap (each a `409`), and `confirmSponsorWithdrawal: true` when the sponsor pool holds credits, which turning it on withdraws to the account. Off always works. |
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/avatars/{avatarId} (the `UpdateAvatar` operationId).
UpdateAvatarWithResponse(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAvatarResponse, error)
// GetAvatarAppearanceWithResponse Get the portrait
//
// Returns a presigned URL of the portrait last given. The URL expires
// after about an hour.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars/{avatarId}/appearance (the `GetAvatarAppearance` operationId).
GetAvatarAppearanceWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarAppearanceResponse, error)
// ReplaceAvatarAppearanceWithBodyWithResponse Replace the portrait
//
// Replaces the avatar's portrait and re-runs the build stages that depend
// on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its
// portrait this way (on v2, the first candidate is captured once the voice
// is there too).
//
// - **Body**: the image (jpg, png or webp, up to 10 MB) as the `file` part
// of `multipart/form-data`. Where `POST /v1/uploads` is available, JSON
// `{"image": "<https URL or upload:<uploadId>>"}` also works, with a
// `portrait` upload consumed on success.
// - **Portrait**: front-facing, head and shoulders with some margin around
// the head, the face at least a third of the frame, in even light, with
// the lips slightly parted. A clearly bad portrait fails the
// `appearance` stage with a `portrait_*` reason.
// - **Scope**: `avatars:write`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/appearance (the `ReplaceAvatarAppearance` operationId).
ReplaceAvatarAppearanceWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceAvatarAppearanceResponse, error)
// ReplaceAvatarAppearanceWithResponse Replace the portrait
//
// Replaces the avatar's portrait and re-runs the build stages that depend
// on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft gets its
// portrait this way (on v2, the first candidate is captured once the voice
// is there too).
//
// - **Body**: the image (jpg, png or webp, up to 10 MB) as the `file` part
// of `multipart/form-data`. Where `POST /v1/uploads` is available, JSON
// `{"image": "<https URL or upload:<uploadId>>"}` also works, with a
// `portrait` upload consumed on success.
// - **Portrait**: front-facing, head and shoulders with some margin around
// the head, the face at least a third of the frame, in even light, with
// the lips slightly parted. A clearly bad portrait fails the
// `appearance` stage with a `portrait_*` reason.
// - **Scope**: `avatars:write`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/appearance (the `ReplaceAvatarAppearance` operationId).
ReplaceAvatarAppearanceWithResponse(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarAppearanceJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceAvatarAppearanceResponse, error)
// CreateAvatarSessionWithBodyWithResponse Render an avatar into your own LiveKit room (API-key authenticated)
//
// Starts an **avatar session**: the avatar is rendered into a LiveKit room
// that YOU own, on behalf of YOUR agent — the bring-your-own-agent path the
// `livekit-plugins-atmee` plugin uses. Nothing here creates a room or a
// conversation: you mint a LiveKit access token for the avatar participant
// with your own project's API secret (grant `roomJoin` for your room, set the
// participant attribute `lk.publish_on_behalf` to your agent's identity, and
// `kind: agent`) and pass it here. The rendering worker joins your room with
// that token, waits for your agent, receives its audio over the LiveKit data
// stream (`lk.audio_stream`, 16 kHz PCM — livekit-agents'
// `DataStreamAudioOutput`) and publishes synced video and audio.
//
// Responds `202` as soon as the worker acknowledged the start (`status:
// initializing`), typically within a second; the avatar's tracks appear in
// your room a few seconds later. Pass `?waitFor=avatar_joined` to block
// until the worker is in the room instead. Billing runs by the minute while
// the render lasts and stops when the worker reports the end (your agent
// left, the room closed, you removed the avatar participant), when you call
// `POST /v1/avatar_sessions/{id}/end`, or at `maxDurationSeconds`.
//
// The token is read, not verified — your secret never leaves you. A token
// your LiveKit server rejects simply never joins and the session fails as
// `AVATAR_DID_NOT_JOIN` after the join timeout.
//
// **Atmee-hosted room** (no LiveKit project of your own, e.g. a Pipecat
// bot on any transport): omit both `livekitUrl` and `livekitToken`. The
// service then creates a room on Atmee's LiveKit project, the avatar joins
// it as `atmee-avatar-agent` publishing on behalf of `agentIdentity`
// (default `agent`), and the response carries `livekitUrl` and
// `agentToken` for your agent to join that room with. The protocol inside
// the room is the same: stream your agent's audio to the avatar
// (`lk.audio_stream`), subscribe to the avatar's video and audio tracks.
// The room is deleted when the session ends. Requires the `sessions`
// scope; the avatar must be on the key's allow-list.
//
// **v2 avatars** (invite-only) render on a separate GPU pool: the avatar's
// own configuration decides, there is nothing to set on the request. That
// pool scales to zero, so the first v2 session after a quiet period can
// take a few minutes to start: the service waits up to 4 minutes for the
// pool to start the render and up to 6 for the avatar to join. Use
// `?waitFor=avatar_joined` with a client timeout of at least 7 minutes, or
// retry on `avatar_warming`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars/{avatarId}/avatar_sessions (the `CreateAvatarSession` operationId).
//
// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
CreateAvatarSessionWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAvatarSessionResponse, error)
// CreateAvatarSessionWithResponse Render an avatar into your own LiveKit room (API-key authenticated)
//
// Starts an **avatar session**: the avatar is rendered into a LiveKit room
// that YOU own, on behalf of YOUR agent — the bring-your-own-agent path the
// `livekit-plugins-atmee` plugin uses. Nothing here creates a room or a
// conversation: you mint a LiveKit access token for the avatar participant
// with your own project's API secret (grant `roomJoin` for your room, set the
// participant attribute `lk.publish_on_behalf` to your agent's identity, and
// `kind: agent`) and pass it here. The rendering worker joins your room with
// that token, waits for your agent, receives its audio over the LiveKit data
// stream (`lk.audio_stream`, 16 kHz PCM — livekit-agents'
// `DataStreamAudioOutput`) and publishes synced video and audio.
//
// Responds `202` as soon as the worker acknowledged the start (`status:
// initializing`), typically within a second; the avatar's tracks appear in
// your room a few seconds later. Pass `?waitFor=avatar_joined` to block
// until the worker is in the room instead. Billing runs by the minute while
// the render lasts and stops when the worker reports the end (your agent
// left, the room closed, you removed the avatar participant), when you call
// `POST /v1/avatar_sessions/{id}/end`, or at `maxDurationSeconds`.
//
// The token is read, not verified — your secret never leaves you. A token
// your LiveKit server rejects simply never joins and the session fails as
// `AVATAR_DID_NOT_JOIN` after the join timeout.
//
// **Atmee-hosted room** (no LiveKit project of your own, e.g. a Pipecat
// bot on any transport): omit both `livekitUrl` and `livekitToken`. The
// service then creates a room on Atmee's LiveKit project, the avatar joins
// it as `atmee-avatar-agent` publishing on behalf of `agentIdentity`
// (default `agent`), and the response carries `livekitUrl` and
// `agentToken` for your agent to join that room with. The protocol inside
// the room is the same: stream your agent's audio to the avatar
// (`lk.audio_stream`), subscribe to the avatar's video and audio tracks.
// The room is deleted when the session ends. Requires the `sessions`
// scope; the avatar must be on the key's allow-list.
//
// **v2 avatars** (invite-only) render on a separate GPU pool: the avatar's
// own configuration decides, there is nothing to set on the request. That
// pool scales to zero, so the first v2 session after a quiet period can
// take a few minutes to start: the service waits up to 4 minutes for the
// pool to start the render and up to 6 for the avatar to join. Use
// `?waitFor=avatar_joined` with a client timeout of at least 7 minutes, or
// retry on `avatar_warming`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars/{avatarId}/avatar_sessions (the `CreateAvatarSession` operationId).
//
// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
CreateAvatarSessionWithResponse(ctx context.Context, avatarId AvatarIdPath, params *CreateAvatarSessionParams, body CreateAvatarSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAvatarSessionResponse, error)
// ListAvatarCandidatesWithResponse List candidates
//
// Lists a v2 avatar's candidates and versions. A candidate (a take) is one
// capture of the avatar's lip sync and motion, with a short talking
// preview to compare. A version is one set of capture inputs: the
// portrait, the voice sample and the preview message.
//
// - `items` lists the current version's takes and the serving take;
// `versions=all` adds every older version's.
// - `versions` always lists every version, oldest first, with what going
// back to it restores.
// - Pick one with `PUT /v1/avatars/{avatarId}/selected_candidate`. With
// `seedSelection: auto`, the first completed take of the current version
// is picked for you.
// - `seed` is informational: the same seed does not reproduce a capture.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars/{avatarId}/candidates (the `ListAvatarCandidates` operationId).
ListAvatarCandidatesWithResponse(ctx context.Context, avatarId AvatarIdPath, params *ListAvatarCandidatesParams, reqEditors ...RequestEditorFn) (*ListAvatarCandidatesResponse, error)
// CreateAvatarCandidatesWithBodyWithResponse Capture more candidates
//
// Captures `count` more candidates of a v2 avatar from its current inputs,
// without preprocessing again. Captures count against the account's limit
// of 10 queued or running (`X-RateLimit-Limit`, `X-RateLimit-Remaining`).
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars/{avatarId}/candidates (the `CreateAvatarCandidates` operationId).
CreateAvatarCandidatesWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAvatarCandidatesResponse, error)
// CreateAvatarCandidatesWithResponse Capture more candidates
//
// Captures `count` more candidates of a v2 avatar from its current inputs,
// without preprocessing again. Captures count against the account's limit
// of 10 queued or running (`X-RateLimit-Limit`, `X-RateLimit-Remaining`).
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars/{avatarId}/candidates (the `CreateAvatarCandidates` operationId).
CreateAvatarCandidatesWithResponse(ctx context.Context, avatarId AvatarIdPath, body CreateAvatarCandidatesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAvatarCandidatesResponse, error)
// DeleteAvatarConductorWithResponse Remove the conductor
//
// Removes a v2 avatar's conductor, including one its own configuration
// carries: the next session runs without one, and a running session keeps
// its own. Nothing is rebuilt. Removing a conductor that is not set is not
// an error.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/avatars/{avatarId}/conductor (the `DeleteAvatarConductor` operationId).
DeleteAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarConductorResponse, error)
// GetAvatarConductorWithResponse Get the conductor
//
// Returns a v2 avatar's conductor as saved: the whole graph and
// `speakAfterS`. `GET /v1/avatars/{avatarId}` only reports whether one is
// set and its node count.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars/{avatarId}/conductor (the `GetAvatarConductor` operationId).
GetAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarConductorResponse, error)
// SetAvatarConductorWithBodyWithResponse Set the conductor
//
// Gives a v2 avatar's conversations an agenda: a graph of steps, each with
// instructions for the avatar and edges that say when to move on. It
// replaces any earlier conductor, including one the avatar's own
// configuration carries, and applies from the next session. Nothing is
// rebuilt.
//
// - **How it runs**: after each turn, a judge model scores each edge's
// `when` condition. Edges without a condition share the chance that none
// holds, by `weight`. The step takes its likeliest edge, or draws one
// when `random`. A step without edges is the end. A `speak` edge lets
// the avatar go on without waiting for the user, `speakAfterS` seconds
// later.
// - **Validation**: the graph is checked before it is saved. `400
// invalid_conductor` names the field (e.g.
// `/graph/nodes/2/edges/0/weight`); a value of the wrong JSON type is
// `422`. Per-field limits are on the schema.
// - **Limits**: at most 100 nodes and 100 edges, and 150,000 characters of
// graph JSON (non-ASCII characters count as their `\uXXXX` escapes). The
// request body may be up to 512 KiB. A session whose whole configuration
// would be too large starts without the conductor.
// - v1 avatars are refused (`409 not_v2_avatar`).
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/conductor (the `SetAvatarConductor` operationId).
SetAvatarConductorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetAvatarConductorResponse, error)
// SetAvatarConductorWithResponse Set the conductor
//
// Gives a v2 avatar's conversations an agenda: a graph of steps, each with
// instructions for the avatar and edges that say when to move on. It
// replaces any earlier conductor, including one the avatar's own
// configuration carries, and applies from the next session. Nothing is
// rebuilt.
//
// - **How it runs**: after each turn, a judge model scores each edge's
// `when` condition. Edges without a condition share the chance that none
// holds, by `weight`. The step takes its likeliest edge, or draws one
// when `random`. A step without edges is the end. A `speak` edge lets
// the avatar go on without waiting for the user, `speakAfterS` seconds
// later.
// - **Validation**: the graph is checked before it is saved. `400
// invalid_conductor` names the field (e.g.
// `/graph/nodes/2/edges/0/weight`); a value of the wrong JSON type is
// `422`. Per-field limits are on the schema.
// - **Limits**: at most 100 nodes and 100 edges, and 150,000 characters of
// graph JSON (non-ASCII characters count as their `\uXXXX` escapes). The
// request body may be up to 512 KiB. A session whose whole configuration
// would be too large starts without the conductor.
// - v1 avatars are refused (`409 not_v2_avatar`).
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/conductor (the `SetAvatarConductor` operationId).
SetAvatarConductorWithResponse(ctx context.Context, avatarId AvatarIdPath, body SetAvatarConductorJSONRequestBody, reqEditors ...RequestEditorFn) (*SetAvatarConductorResponse, error)
// GetAvatarKnowledgeWithResponse Get the knowledge
//
// Returns the facts text, the knowledge questionnaire's questions and
// answers, and the knowledge files with presigned URLs.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars/{avatarId}/knowledge (the `GetAvatarKnowledge` operationId).
GetAvatarKnowledgeWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarKnowledgeResponse, error)
// ReplaceAvatarKnowledgeWithBodyWithResponse Replace the knowledge files
//
// Replaces the avatar's whole set of knowledge files and re-runs the build
// stages that depend on them; send none to clear the set. The
// `knowledge.facts` text and the questionnaire answers are kept (change
// them with `PATCH /v1/avatars/{avatarId}`).
//
// - **Body**: repeat the `files` part for each document (pdf, docx, doc,
// txt, md, html or csv, up to 50 MB each, at most 20), with an optional
// `descriptions` JSON object of file name to description. Where `POST
// /v1/uploads` is available, JSON `{"files": [...], "descriptions":
// {...}}` also works, with https URLs or `knowledge` uploads consumed on
// success.
// - A URL's file is named by its last path segment, an upload's by its
// `fileName`; `descriptions` uses those names.
// - v2 conversations do not use knowledge yet.
// - **Scope**: `avatars:write`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/knowledge (the `ReplaceAvatarKnowledge` operationId).
ReplaceAvatarKnowledgeWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceAvatarKnowledgeResponse, error)
// ReplaceAvatarKnowledgeWithResponse Replace the knowledge files
//
// Replaces the avatar's whole set of knowledge files and re-runs the build
// stages that depend on them; send none to clear the set. The
// `knowledge.facts` text and the questionnaire answers are kept (change
// them with `PATCH /v1/avatars/{avatarId}`).
//
// - **Body**: repeat the `files` part for each document (pdf, docx, doc,
// txt, md, html or csv, up to 50 MB each, at most 20), with an optional
// `descriptions` JSON object of file name to description. Where `POST
// /v1/uploads` is available, JSON `{"files": [...], "descriptions":
// {...}}` also works, with https URLs or `knowledge` uploads consumed on
// success.
// - A URL's file is named by its last path segment, an upload's by its
// `fileName`; `descriptions` uses those names.
// - v2 conversations do not use knowledge yet.
// - **Scope**: `avatars:write`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/knowledge (the `ReplaceAvatarKnowledge` operationId).
ReplaceAvatarKnowledgeWithResponse(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarKnowledgeJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceAvatarKnowledgeResponse, error)
// GetAvatarMonetizationWithResponse Get monetization
//
// Returns whether the avatar is monetized, its last 30 days against the
// eligibility requirements (the account's own conversations left out), the
// account's cap on monetized avatars, and what the avatar earned, in
// microcredits (100 = 1 credit). Requires `avatars:read`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars/{avatarId}/monetization (the `GetAvatarMonetization` operationId).
GetAvatarMonetizationWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarMonetizationResponse, error)
// SelectAvatarCandidateWithBodyWithResponse Select a candidate
//
// Picks the completed candidate a v2 avatar serves. The pick is recorded
// at once (`selectedCandidateId`) and served a few seconds later
// (`servingCandidateId`). The first pick makes the avatar `ready`; a later
// one switches without downtime, with `rebuilding` true until it serves.
//
// - **Older versions**: picking a restorable take of an older version
// (`current: false`, `restorable: true`) restores that version's
// portrait, voice sample, preview message and default-sentence language
// in one step. Other settings stay as they are, nothing is captured or
// charged, and the newer version's unfinished takes are cancelled.
// - **Moderation**: inputs already checked together are not checked again;
// a combination never checked is moderated like an edit.
// - Queued, failed and superseded candidates cannot be selected (`409
// candidate_not_ready`). Selecting the current pick again is always
// allowed.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/selected_candidate (the `SelectAvatarCandidate` operationId).
SelectAvatarCandidateWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SelectAvatarCandidateResponse, error)
// SelectAvatarCandidateWithResponse Select a candidate
//
// Picks the completed candidate a v2 avatar serves. The pick is recorded
// at once (`selectedCandidateId`) and served a few seconds later
// (`servingCandidateId`). The first pick makes the avatar `ready`; a later
// one switches without downtime, with `rebuilding` true until it serves.
//
// - **Older versions**: picking a restorable take of an older version
// (`current: false`, `restorable: true`) restores that version's
// portrait, voice sample, preview message and default-sentence language
// in one step. Other settings stay as they are, nothing is captured or
// charged, and the newer version's unfinished takes are cancelled.
// - **Moderation**: inputs already checked together are not checked again;
// a combination never checked is moderated like an edit.
// - Queued, failed and superseded candidates cannot be selected (`409
// candidate_not_ready`). Selecting the current pick again is always
// allowed.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/selected_candidate (the `SelectAvatarCandidate` operationId).
SelectAvatarCandidateWithResponse(ctx context.Context, avatarId AvatarIdPath, body SelectAvatarCandidateJSONRequestBody, reqEditors ...RequestEditorFn) (*SelectAvatarCandidateResponse, error)
// GetAvatarSponsorWithResponse Get the sponsor pool
//
// Returns the avatar's sponsor pool balance and settings. Readable by an
// API key with `avatars:read` or a signed-in user of the account. Changing
// the pool takes an API key with `billing:write` or a signed-in user.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars/{avatarId}/sponsor (the `GetAvatarSponsor` operationId).
GetAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarSponsorResponse, error)
// UpdateAvatarSponsorWithBodyWithResponse Update sponsor settings
//
// Changes who may spend the avatar's sponsor pool, and when. The request
// applies all of its fields or none.
//
// - `anonymousAccess: true` lets visitors without an account spend the
// pool. The avatar must be funded first (`409
// avatar_not_budget_managed`: grant credits or turn on auto top-up) and
// public or unlisted (`409 avatar_not_shared`).
// - `autoTopupEnabled: true` needs a threshold and an amount, sent or
// already stored (`400 auto_topup_incomplete`).
// - A monetized avatar cannot be sponsored (`409
// monetized_avatar_cannot_be_sponsored`).
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/avatars/{avatarId}/sponsor (the `UpdateAvatarSponsor` operationId).
UpdateAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAvatarSponsorResponse, error)
// UpdateAvatarSponsorWithResponse Update sponsor settings
//
// Changes who may spend the avatar's sponsor pool, and when. The request
// applies all of its fields or none.
//
// - `anonymousAccess: true` lets visitors without an account spend the
// pool. The avatar must be funded first (`409
// avatar_not_budget_managed`: grant credits or turn on auto top-up) and
// public or unlisted (`409 avatar_not_shared`).
// - `autoTopupEnabled: true` needs a threshold and an amount, sent or
// already stored (`400 auto_topup_incomplete`).
// - A monetized avatar cannot be sponsored (`409
// monetized_avatar_cannot_be_sponsored`).
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/avatars/{avatarId}/sponsor (the `UpdateAvatarSponsor` operationId).
UpdateAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, body UpdateAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAvatarSponsorResponse, error)
// GrantAvatarSponsorWithBodyWithResponse Fund the sponsor pool
//
// Moves credits from the account into the avatar's sponsor pool. Send an
// `Idempotency-Key` to retry safely: the same key replays the first result
// instead of granting twice.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars/{avatarId}/sponsor/grants (the `GrantAvatarSponsor` operationId).
GrantAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GrantAvatarSponsorResponse, error)
// GrantAvatarSponsorWithResponse Fund the sponsor pool
//
// Moves credits from the account into the avatar's sponsor pool. Send an
// `Idempotency-Key` to retry safely: the same key replays the first result
// instead of granting twice.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars/{avatarId}/sponsor/grants (the `GrantAvatarSponsor` operationId).
GrantAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, params *GrantAvatarSponsorParams, body GrantAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*GrantAvatarSponsorResponse, error)
// WithdrawAvatarSponsorWithBodyWithResponse Withdraw sponsor credits
//
// Returns the sponsor pool's unreserved credits to the account.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars/{avatarId}/sponsor/withdrawals (the `WithdrawAvatarSponsor` operationId).
WithdrawAvatarSponsorWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WithdrawAvatarSponsorResponse, error)
// WithdrawAvatarSponsorWithResponse Withdraw sponsor credits
//
// Returns the sponsor pool's unreserved credits to the account.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/avatars/{avatarId}/sponsor/withdrawals (the `WithdrawAvatarSponsor` operationId).
WithdrawAvatarSponsorWithResponse(ctx context.Context, avatarId AvatarIdPath, body WithdrawAvatarSponsorJSONRequestBody, reqEditors ...RequestEditorFn) (*WithdrawAvatarSponsorResponse, error)
// DeleteAvatarThumbnailWithResponse Remove the thumbnail
//
// Removes the thumbnail, custom or automatic: Explore shows the portrait
// instead, and an automatic thumbnail may be made again. Returns the
// avatar. Requires `avatars:write`.
//
// A public avatar needs a thumbnail, so this is `409
// public_requirements_missing` until you make it unlisted or private.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/avatars/{avatarId}/thumbnail (the `DeleteAvatarThumbnail` operationId).
DeleteAvatarThumbnailWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*DeleteAvatarThumbnailResponse, error)
// ReplaceAvatarThumbnailWithBodyWithResponse Set the thumbnail
//
// Sets a custom thumbnail for the avatar's Explore card, replacing any
// other; automatic thumbnails are no longer made for it. Nothing is
// rebuilt. Returns the avatar, with `profile.thumbnailSource: custom`.
//
// - **Body**: one image (jpg, png or webp, up to 10 MB) as the `file`
// part. Where `POST /v1/uploads` is available, JSON `{"image": "<https
// URL or upload:<uploadId>>"}` also works, with a `portrait` upload
// consumed on success.
// - **Scope**: `avatars:write`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/thumbnail (the `ReplaceAvatarThumbnail` operationId).
ReplaceAvatarThumbnailWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceAvatarThumbnailResponse, error)
// ReplaceAvatarThumbnailWithResponse Set the thumbnail
//
// Sets a custom thumbnail for the avatar's Explore card, replacing any
// other; automatic thumbnails are no longer made for it. Nothing is
// rebuilt. Returns the avatar, with `profile.thumbnailSource: custom`.
//
// - **Body**: one image (jpg, png or webp, up to 10 MB) as the `file`
// part. Where `POST /v1/uploads` is available, JSON `{"image": "<https
// URL or upload:<uploadId>>"}` also works, with a `portrait` upload
// consumed on success.
// - **Scope**: `avatars:write`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/thumbnail (the `ReplaceAvatarThumbnail` operationId).
ReplaceAvatarThumbnailWithResponse(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarThumbnailJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceAvatarThumbnailResponse, error)
// DeleteAvatarVersionWithResponse Delete a version
//
// Deletes an older version of a v2 avatar: its takes and the files only it
// uses. It can no longer be restored.
//
// - Files that a kept take or the current inputs use are never deleted.
// - The current version, a version holding the serving or selected take
// (`409 version_in_use`) and one whose capture is still running (`409
// version_busy`) cannot be deleted.
// - If storage cannot delete every file now, the takes are still gone and
// `pendingFiles` counts what is left: call again to retry.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/avatars/{avatarId}/versions/{versionId} (the `DeleteAvatarVersion` operationId).
DeleteAvatarVersionWithResponse(ctx context.Context, avatarId AvatarIdPath, versionId string, reqEditors ...RequestEditorFn) (*DeleteAvatarVersionResponse, error)
// GetAvatarVoiceWithResponse Get the voice
//
// Returns a presigned URL of the voice sample last given, and the voice engine.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/avatars/{avatarId}/voice (the `GetAvatarVoice` operationId).
GetAvatarVoiceWithResponse(ctx context.Context, avatarId AvatarIdPath, reqEditors ...RequestEditorFn) (*GetAvatarVoiceResponse, error)
// ReplaceAvatarVoiceWithBodyWithResponse Replace the voice
//
// Replaces the avatar's voice sample and re-runs the build stages that
// depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft
// gets its voice this way (on v2, the first candidate is captured once the
// portrait is there too).
//
// - **Body**: one 10 to 60 second recording of clear speech (mp3, wav,
// m4a, aac, ogg, flac, opus or webm, up to 12 MB) as the `file` part.
// Where `POST /v1/uploads` is available, JSON `{"voice": "<https URL or
// upload:<uploadId>>"}` also works, with a `voice` upload consumed on
// success.
// - Silence, pure tones or heavy noise fail the voice stage.
// - **Scope**: `avatars:write`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/voice (the `ReplaceAvatarVoice` operationId).
ReplaceAvatarVoiceWithBodyWithResponse(ctx context.Context, avatarId AvatarIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceAvatarVoiceResponse, error)
// ReplaceAvatarVoiceWithResponse Replace the voice
//
// Replaces the avatar's voice sample and re-runs the build stages that
// depend on it; poll `GET /v1/avatars/{avatarId}` for progress. A draft
// gets its voice this way (on v2, the first candidate is captured once the
// portrait is there too).
//
// - **Body**: one 10 to 60 second recording of clear speech (mp3, wav,
// m4a, aac, ogg, flac, opus or webm, up to 12 MB) as the `file` part.
// Where `POST /v1/uploads` is available, JSON `{"voice": "<https URL or
// upload:<uploadId>>"}` also works, with a `voice` upload consumed on
// success.
// - Silence, pure tones or heavy noise fail the voice stage.
// - **Scope**: `avatars:write`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PUT /v1/avatars/{avatarId}/voice (the `ReplaceAvatarVoice` operationId).
ReplaceAvatarVoiceWithResponse(ctx context.Context, avatarId AvatarIdPath, body ReplaceAvatarVoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceAvatarVoiceResponse, error)
// GenerateClipWithBodyWithResponse Generate a clip
//
// Renders a short mp4 (1 to 30 seconds, 25 fps) of the person or character
// in `image`, moving as `prompt` describes and optionally speaking
// `audio`. No avatar is needed.
//
// - **Inputs**: `image` is a `portrait` upload or a public https link
// (jpg, png or webp, up to 10 MB); `audio` is a `voice` upload or link.
// The audio plays once from the start, padded with silence or cut at the
// end. The prompt and the image are moderated; if the image shows a real
// person other than you, get their permission first.
// - **Duration**: `durationSeconds` is required with `audio` (set it to
// the audio's length; the file is not measured) and defaults to 8 for a
// silent clip. At most 15 seconds where clips render on the sessions'
// pool (`pricing.generation.clipAnySize` false), else 30 seconds within
// the size's budget (1920 × 1080: 10 seconds, 1280 × 720: 22).
// - **Resolution**: 512 × 512 unless you pass `resolution`, the clip's
// output size (see `ClipResolution`), or `aspectRatio` (`square`,
// `portrait` 384 × 640, `landscape` 640 × 384). It renders at each
// side rounded up to 32 and the centre is cropped. Where
// `clipAnySize` is false the render size must be one of
// `pricing.generation.clipResolutions` on `GET /v1/account`.
// - **Output**: the clip as `upload:<uploadId>` (kept 24 hours), with a
// short-lived `url` to download it.
// - **Billing**: the per-15-second price from `GET /v1/account`
// (`pricing.generation.clipPer15SecondsMicrocredits`), pro rata to
// `durationSeconds` and rounded up, charged only when the clip comes
// back.
// - **Slow starts**: a cold render can take minutes. After about 45
// seconds the call answers `409 request_in_progress`; retry with the
// same `Idempotency-Key` after `Retry-After` to get the clip, charged
// once.
// - **Access**: needs v2 access (`403 v2_access_required`) and the
// `generation:write` and `avatars:write` scopes.
//
// | Error | When |
// |---|---|
// | `400 invalid_input` | A bad input, `audio` without `durationSeconds`, or an input the renderer cannot use: `input_failure image` or `audio` (no face, an unreadable file), `input_failure resolution` (a size not served right now) |
// | `503 generation_unavailable` | Clips are not offered here |
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/generation/clips (the `GenerateClip` operationId).
GenerateClipWithBodyWithResponse(ctx context.Context, params *GenerateClipParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GenerateClipResponse, error)
// GenerateClipWithResponse Generate a clip
//
// Renders a short mp4 (1 to 30 seconds, 25 fps) of the person or character
// in `image`, moving as `prompt` describes and optionally speaking
// `audio`. No avatar is needed.
//
// - **Inputs**: `image` is a `portrait` upload or a public https link
// (jpg, png or webp, up to 10 MB); `audio` is a `voice` upload or link.
// The audio plays once from the start, padded with silence or cut at the
// end. The prompt and the image are moderated; if the image shows a real
// person other than you, get their permission first.
// - **Duration**: `durationSeconds` is required with `audio` (set it to
// the audio's length; the file is not measured) and defaults to 8 for a
// silent clip. At most 15 seconds where clips render on the sessions'
// pool (`pricing.generation.clipAnySize` false), else 30 seconds within
// the size's budget (1920 × 1080: 10 seconds, 1280 × 720: 22).
// - **Resolution**: 512 × 512 unless you pass `resolution`, the clip's
// output size (see `ClipResolution`), or `aspectRatio` (`square`,
// `portrait` 384 × 640, `landscape` 640 × 384). It renders at each
// side rounded up to 32 and the centre is cropped. Where
// `clipAnySize` is false the render size must be one of
// `pricing.generation.clipResolutions` on `GET /v1/account`.
// - **Output**: the clip as `upload:<uploadId>` (kept 24 hours), with a
// short-lived `url` to download it.
// - **Billing**: the per-15-second price from `GET /v1/account`
// (`pricing.generation.clipPer15SecondsMicrocredits`), pro rata to
// `durationSeconds` and rounded up, charged only when the clip comes
// back.
// - **Slow starts**: a cold render can take minutes. After about 45
// seconds the call answers `409 request_in_progress`; retry with the
// same `Idempotency-Key` after `Retry-After` to get the clip, charged
// once.
// - **Access**: needs v2 access (`403 v2_access_required`) and the
// `generation:write` and `avatars:write` scopes.
//
// | Error | When |
// |---|---|
// | `400 invalid_input` | A bad input, `audio` without `durationSeconds`, or an input the renderer cannot use: `input_failure image` or `audio` (no face, an unreadable file), `input_failure resolution` (a size not served right now) |
// | `503 generation_unavailable` | Clips are not offered here |
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/generation/clips (the `GenerateClip` operationId).
GenerateClipWithResponse(ctx context.Context, params *GenerateClipParams, body GenerateClipJSONRequestBody, reqEditors ...RequestEditorFn) (*GenerateClipResponse, error)
// EnhancePortraitWithBodyWithResponse Enhance a portrait
//
// Crops your photo to a square and returns up to four enhanced portraits
// that keep the subject's identity. With `prompt`, they restyle the photo
// as the prompt asks ("this person as a 1920s detective"), keeping the
// person unless the prompt says otherwise.
//
// - **Input**: `image` is a `portrait` upload (`upload:<uploadId>`, still
// usable afterwards) or a public https link to a jpg, png or webp of at
// most 10 MB. The prompt and the photo are moderated first.
// - **Consent**: if the photo shows a real person other than you, get
// their permission first.
// - **Output, billing and idempotency**: as for `POST
// /v1/generation/portraits`.
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/generation/enhancements (the `EnhancePortrait` operationId).
EnhancePortraitWithBodyWithResponse(ctx context.Context, params *EnhancePortraitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EnhancePortraitResponse, error)
// EnhancePortraitWithResponse Enhance a portrait
//
// Crops your photo to a square and returns up to four enhanced portraits
// that keep the subject's identity. With `prompt`, they restyle the photo
// as the prompt asks ("this person as a 1920s detective"), keeping the
// person unless the prompt says otherwise.
//
// - **Input**: `image` is a `portrait` upload (`upload:<uploadId>`, still
// usable afterwards) or a public https link to a jpg, png or webp of at
// most 10 MB. The prompt and the photo are moderated first.
// - **Consent**: if the photo shows a real person other than you, get
// their permission first.
// - **Output, billing and idempotency**: as for `POST
// /v1/generation/portraits`.
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/generation/enhancements (the `EnhancePortrait` operationId).
EnhancePortraitWithResponse(ctx context.Context, params *EnhancePortraitParams, body EnhancePortraitJSONRequestBody, reqEditors ...RequestEditorFn) (*EnhancePortraitResponse, error)
// GeneratePortraitsWithBodyWithResponse Generate portraits
//
// Generates up to four square portraits of an invented character from a
// text description. Never use it to depict a real person: for a real
// person, enhance their own photo with `POST /v1/generation/enhancements`,
// with their permission.
//
// - **Output**: each portrait is an `upload:<uploadId>` that `POST
// /v1/avatars` (`assets.image`) and `PUT
// /v1/avatars/{avatarId}/appearance` take as is (it expires after 24
// hours), with a short-lived `url` and a small JPEG `preview`.
// - **Billing**: the operation's price from `GET /v1/account`, charged
// only when at least one portrait comes back. A flagged, failed or
// refused call costs nothing.
// - **Idempotency**: `Idempotency-Key` is required. A retry with the same
// key never charges twice and returns the first result (`replayed:
// true`).
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/generation/portraits (the `GeneratePortraits` operationId).
GeneratePortraitsWithBodyWithResponse(ctx context.Context, params *GeneratePortraitsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GeneratePortraitsResponse, error)
// GeneratePortraitsWithResponse Generate portraits
//
// Generates up to four square portraits of an invented character from a
// text description. Never use it to depict a real person: for a real
// person, enhance their own photo with `POST /v1/generation/enhancements`,
// with their permission.
//
// - **Output**: each portrait is an `upload:<uploadId>` that `POST
// /v1/avatars` (`assets.image`) and `PUT
// /v1/avatars/{avatarId}/appearance` take as is (it expires after 24
// hours), with a short-lived `url` and a small JPEG `preview`.
// - **Billing**: the operation's price from `GET /v1/account`, charged
// only when at least one portrait comes back. A flagged, failed or
// refused call costs nothing.
// - **Idempotency**: `Idempotency-Key` is required. A retry with the same
// key never charges twice and returns the first result (`replayed:
// true`).
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/generation/portraits (the `GeneratePortraits` operationId).
GeneratePortraitsWithResponse(ctx context.Context, params *GeneratePortraitsParams, body GeneratePortraitsJSONRequestBody, reqEditors ...RequestEditorFn) (*GeneratePortraitsResponse, error)
// DesignVoiceWithBodyWithResponse Design a voice
//
// Designs voice previews from a description of how the voice should sound.
// Each preview runs 10 to 60 seconds, the length an avatar's voice sample
// needs: a short one is made once more with a longer read, and one still
// outside that range is dropped.
//
// - **Text**: `sampleText` is what every preview says, in `language`;
// without it, a greeting is written from the description. Each preview
// reports what it actually says in `spokenText`.
// - **Output**: each preview is an `upload:<uploadId>` that `POST
// /v1/avatars` (`assets.voice`) and `PUT /v1/avatars/{avatarId}/voice`
// take as is, with a short-lived `url` to play it. `durationSeconds` is
// `null` when the length is unknown.
// - **Billing and idempotency**: as for `POST /v1/generation/portraits`.
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/generation/voices (the `DesignVoice` operationId).
DesignVoiceWithBodyWithResponse(ctx context.Context, params *DesignVoiceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DesignVoiceResponse, error)
// DesignVoiceWithResponse Design a voice
//
// Designs voice previews from a description of how the voice should sound.
// Each preview runs 10 to 60 seconds, the length an avatar's voice sample
// needs: a short one is made once more with a longer read, and one still
// outside that range is dropped.
//
// - **Text**: `sampleText` is what every preview says, in `language`;
// without it, a greeting is written from the description. Each preview
// reports what it actually says in `spokenText`.
// - **Output**: each preview is an `upload:<uploadId>` that `POST
// /v1/avatars` (`assets.voice`) and `PUT /v1/avatars/{avatarId}/voice`
// take as is, with a short-lived `url` to play it. `durationSeconds` is
// `null` when the length is unknown.
// - **Billing and idempotency**: as for `POST /v1/generation/portraits`.
// - **Scopes**: `generation:write` and `avatars:write`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/generation/voices (the `DesignVoice` operationId).
DesignVoiceWithResponse(ctx context.Context, params *DesignVoiceParams, body DesignVoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*DesignVoiceResponse, error)
// StartEmbedSessionWithBodyWithResponse Start an embed avatar session (API-key authenticated, LiveKit only)
//
// Starts a session on behalf of an embed API key instead of a signed-in
// user. Called by the customer's own backend — never a browser —
// with `X-Api-Key` in place of a JWT. Always LiveKit; there is no
// `framework` field. Responds 201 only once the avatar has actually
// joined the room, and returns `serverUrl`/`roomName` as explicit
// fields (not a combined `roomUrl`), since that's what
// `livekit-client`'s `Room.connect()` needs directly.
//
// **Length.** `maxDurationSeconds` is capped server-side at the
// smallest of the key's own `maxSessionSeconds`, the plan's
// `limits.maxSessionSeconds` (`GET /v1/account`) and, for `reserve`
// billing, what the balance can pay for. The response reports what you
// asked for (`requestedDurationSeconds`), what you got
// (`actualDurationSeconds`) and whether it was cut (`durationCapped`).
// The granted length counts from the moment both the visitor and the
// avatar are in the room, which is also when billing starts.
//
// **Joining and ending.** The visitor must join within 60 seconds of
// the avatar; otherwise the session ends `failed` with `endReason:
// no_user_joined` and nothing is billed. End it early with `POST
// /v1/session/{id}/end`; read its state, end reason and cost with `GET
// /v1/avatar_sessions/{id}`. An avatar renders one live conversation at
// a time: a second start on an avatar that is already in a live
// session of the account answers `409 avatar_busy`.
//
// **App tools.** `appTools.tools` declares functions the avatar may
// call during the conversation, with `appTools.instructions` saying
// how and when to use them. Every call reaches the visitor's LiveKit
// client as an RPC (method `atmee.tool`, payload `{id, name,
// arguments}`): register a handler for it on the room's local
// participant; with `x-atmee.mode` `await` its answer is the result
// the avatar is given. Tools run on Causeur, the conversation runtime
// v2 avatars are moving to. A session the behavior module runs (every v1 avatar, and a v2
// avatar not yet moved) accepts them and never calls them: which
// runtime serves a session is decided at launch, not by the request,
// so the start cannot refuse them. A rule broken answers
// `400 invalid_tools`, the message naming it; so does a tool set that
// would push the session over Causeur's payload limit with the
// avatar's own config. The request body may be up to 128 KiB.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/session (the `StartEmbedSession` operationId).
//
// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
StartEmbedSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartEmbedSessionResponse, error)
// StartEmbedSessionWithResponse Start an embed avatar session (API-key authenticated, LiveKit only)
//
// Starts a session on behalf of an embed API key instead of a signed-in
// user. Called by the customer's own backend — never a browser —
// with `X-Api-Key` in place of a JWT. Always LiveKit; there is no
// `framework` field. Responds 201 only once the avatar has actually
// joined the room, and returns `serverUrl`/`roomName` as explicit
// fields (not a combined `roomUrl`), since that's what
// `livekit-client`'s `Room.connect()` needs directly.
//
// **Length.** `maxDurationSeconds` is capped server-side at the
// smallest of the key's own `maxSessionSeconds`, the plan's
// `limits.maxSessionSeconds` (`GET /v1/account`) and, for `reserve`
// billing, what the balance can pay for. The response reports what you
// asked for (`requestedDurationSeconds`), what you got
// (`actualDurationSeconds`) and whether it was cut (`durationCapped`).
// The granted length counts from the moment both the visitor and the
// avatar are in the room, which is also when billing starts.
//
// **Joining and ending.** The visitor must join within 60 seconds of
// the avatar; otherwise the session ends `failed` with `endReason:
// no_user_joined` and nothing is billed. End it early with `POST
// /v1/session/{id}/end`; read its state, end reason and cost with `GET
// /v1/avatar_sessions/{id}`. An avatar renders one live conversation at
// a time: a second start on an avatar that is already in a live
// session of the account answers `409 avatar_busy`.
//
// **App tools.** `appTools.tools` declares functions the avatar may
// call during the conversation, with `appTools.instructions` saying
// how and when to use them. Every call reaches the visitor's LiveKit
// client as an RPC (method `atmee.tool`, payload `{id, name,
// arguments}`): register a handler for it on the room's local
// participant; with `x-atmee.mode` `await` its answer is the result
// the avatar is given. Tools run on Causeur, the conversation runtime
// v2 avatars are moving to. A session the behavior module runs (every v1 avatar, and a v2
// avatar not yet moved) accepts them and never calls them: which
// runtime serves a session is decided at launch, not by the request,
// so the start cannot refuse them. A rule broken answers
// `400 invalid_tools`, the message naming it; so does a tool set that
// would push the session over Causeur's payload limit with the
// avatar's own config. The request body may be up to 128 KiB.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/session (the `StartEmbedSession` operationId).
//
// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
StartEmbedSessionWithResponse(ctx context.Context, body StartEmbedSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*StartEmbedSessionResponse, error)
// CreateSpeechSessionWithBodyWithResponse Start a speech session
//
// Starts a realtime speech-to-speech conversation with an avatar over a
// WebSocket, without video. The answer carries the WebSocket `url` and a
// short-lived `token`: connect within 60 seconds (`tokenExpiresAt`).
//
// - **Connecting**: present the token as `Authorization: Bearer <token>`
// or as the WebSocket subprotocols `atmee-live` and
// `atmee-token.<token>`. The first connection holds the session for
// good; a client that loses it starts a new session.
// - **Avatar**: `avatarId` is required, and the session uses that avatar's
// persona and voice. An avatar without a voice is `422
// avatar_has_no_voice`.
// - **Pinned settings**: `settings` pins `session.start` fields from your
// backend, over the client's. A client `session.start` or
// `session.update` that sets a pinned field is refused, naming it;
// appends such as `session.instructions.append` still add to it. Pinned
// persona fields override the avatar's.
// - **Length**: the session ends at `endsAt` (the reservation plus
// `actualDurationSeconds`), whenever the connection opened.
// - **Billing**: by the minute from the first usage report (within 30
// seconds of connecting) until the end, always to the account that owns
// the avatar. A session nobody connects to costs nothing and is closed
// as `failed` (`no_user_joined`).
// - **Credentials**: an API key with the `sessions` scope (an
// avatar-scoped key must name its avatar), or the owner's signed-in user
// token where the deployment accepts one (`X-Account-Id` picks among
// several accounts). There are no anonymous speech sessions. Read and
// end a session with either credential of its account.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/speech_sessions (the `CreateSpeechSession` operationId).
CreateSpeechSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpeechSessionResponse, error)
// CreateSpeechSessionWithResponse Start a speech session
//
// Starts a realtime speech-to-speech conversation with an avatar over a
// WebSocket, without video. The answer carries the WebSocket `url` and a
// short-lived `token`: connect within 60 seconds (`tokenExpiresAt`).
//
// - **Connecting**: present the token as `Authorization: Bearer <token>`
// or as the WebSocket subprotocols `atmee-live` and
// `atmee-token.<token>`. The first connection holds the session for
// good; a client that loses it starts a new session.
// - **Avatar**: `avatarId` is required, and the session uses that avatar's
// persona and voice. An avatar without a voice is `422
// avatar_has_no_voice`.
// - **Pinned settings**: `settings` pins `session.start` fields from your
// backend, over the client's. A client `session.start` or
// `session.update` that sets a pinned field is refused, naming it;
// appends such as `session.instructions.append` still add to it. Pinned
// persona fields override the avatar's.
// - **Length**: the session ends at `endsAt` (the reservation plus
// `actualDurationSeconds`), whenever the connection opened.
// - **Billing**: by the minute from the first usage report (within 30
// seconds of connecting) until the end, always to the account that owns
// the avatar. A session nobody connects to costs nothing and is closed
// as `failed` (`no_user_joined`).
// - **Credentials**: an API key with the `sessions` scope (an
// avatar-scoped key must name its avatar), or the owner's signed-in user
// token where the deployment accepts one (`X-Account-Id` picks among
// several accounts). There are no anonymous speech sessions. Read and
// end a session with either credential of its account.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/speech_sessions (the `CreateSpeechSession` operationId).
CreateSpeechSessionWithResponse(ctx context.Context, body CreateSpeechSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpeechSessionResponse, error)
// GetSpeechSessionWithResponse Get a speech session
//
// Reads a speech session's state and, once it ended, why and what it cost.
//
// - `status` is `active` while the session is reserved or connected, then
// `completed` or `failed`.
// - `connectedAt` is when billing started, `endsAt` when the session's
// time runs out, and `endRequestedAt` when you ended it with a
// connection open.
// - Once it ended, `endReason` says why, and `billedSeconds` and
// `chargedMicrocredits` what it cost (100 microcredits = 1 credit).
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/speech_sessions/{session_id} (the `GetSpeechSession` operationId).
GetSpeechSessionWithResponse(ctx context.Context, sessionId SpeechSessionPathId, reqEditors ...RequestEditorFn) (*GetSpeechSessionResponse, error)
// EndSpeechSessionWithResponse End a speech session
//
// Ends the session with `endReason: ended_by_api`. With no connection open
// it settles at once. With one open, it ends at the next usage report
// (within 30 seconds) and is billed until then: the answer reads `status:
// active` with `endRequestedAt` set, and `GET` reads it `completed` once
// settled.
//
// Idempotent: a repeat keeps the first request, and ending a settled
// session answers `alreadyEnded: true`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/speech_sessions/{session_id}/end (the `EndSpeechSession` operationId).
EndSpeechSessionWithResponse(ctx context.Context, sessionId SpeechSessionPathId, reqEditors ...RequestEditorFn) (*EndSpeechSessionResponse, error)
// CreateUploadWithBodyWithResponse Create an upload
//
// Creates a one-time upload for a file you cannot send in the same
// request, for example from an MCP tool or a chat assistant. Once it is
// `uploaded`, pass `upload:<uploadId>` wherever a create or replace takes
// a file URL.
//
// | `kind` | Accepts |
// |---|---|
// | `portrait` | jpg, png or webp, up to 10 MB |
// | `voice` | a 10 to 60 second recording: mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB |
// | `knowledge` | pdf, docx, doc, txt, md, html or csv up to 50 MB; audio or video up to 20 MB |
//
// Send the file one of two ways:
//
// - `PUT` it to `uploadUrl` with `uploadHeaders` (a `Content-Type` from
// `allowedTypes` if you declared none), at most `maxBytes`: `curl -X PUT
// -H 'Content-Type: image/png' --data-binary @portrait.png
// '<uploadUrl>'`.
// - Or give a person `uploadPageUrl`, a page that takes the file (or
// records a voice). It works for 15 minutes (`uploadPageExpiresAt`) and
// until the file arrives.
//
// Then poll `GET /v1/uploads/{uploadId}` until `status` is `uploaded`. An
// upload is used once and expires an hour after it was created.
// `contentType`, when given, is the only type accepted. Requires
// `avatars:write`.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/uploads (the `CreateUpload` operationId).
CreateUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error)
// CreateUploadWithResponse Create an upload
//
// Creates a one-time upload for a file you cannot send in the same
// request, for example from an MCP tool or a chat assistant. Once it is
// `uploaded`, pass `upload:<uploadId>` wherever a create or replace takes
// a file URL.
//
// | `kind` | Accepts |
// |---|---|
// | `portrait` | jpg, png or webp, up to 10 MB |
// | `voice` | a 10 to 60 second recording: mp3, wav, m4a, aac, ogg, flac, opus or webm, up to 12 MB |
// | `knowledge` | pdf, docx, doc, txt, md, html or csv up to 50 MB; audio or video up to 20 MB |
//
// Send the file one of two ways:
//
// - `PUT` it to `uploadUrl` with `uploadHeaders` (a `Content-Type` from
// `allowedTypes` if you declared none), at most `maxBytes`: `curl -X PUT
// -H 'Content-Type: image/png' --data-binary @portrait.png
// '<uploadUrl>'`.
// - Or give a person `uploadPageUrl`, a page that takes the file (or
// records a voice). It works for 15 minutes (`uploadPageExpiresAt`) and
// until the file arrives.
//
// Then poll `GET /v1/uploads/{uploadId}` until `status` is `uploaded`. An
// upload is used once and expires an hour after it was created.
// `contentType`, when given, is the only type accepted. Requires
// `avatars:write`.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/uploads (the `CreateUpload` operationId).
CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error)
// GetUploadWithResponse Get an upload
//
// Returns the upload's `status`: `pending` until the file arrives, then
// `uploaded` (usable once), `consumed` once a create or replace used it,
// or `expired` an hour after it was created. Only the account that created
// it can read it. Requires `avatars:read` or `avatars:write`.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/uploads/{uploadId} (the `GetUpload` operationId).
GetUploadWithResponse(ctx context.Context, uploadId UploadIdPath, reqEditors ...RequestEditorFn) (*GetUploadResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ClipResolution ¶
ClipResolution A clip's size in pixels: width and height are each even, from 256 to 1920, e.g. 1920 x 1080, 1080 x 1920 or 1280 x 720. The renderer works at each side rounded up to a multiple of 32 (1920 x 1080 at 1920 x 1088) and crops the centre to the size asked for, so at most 31 pixels are lost on a side and nothing is resampled. The render size is at most 1920 x 1088 pixels in all. Where clips render on the sessions' pool (`GET /v1/account` `pricing.generation.clipAnySize` false), the render size must also be one of `clipResolutions`. Another size is `400 invalid_input`.
type CodeRedemption ¶
type CodeRedemption struct {
// MicrocreditsGranted Credits the code added, in microcredits (100 = 1 credit); 0 for a code that only gives v2 access.
MicrocreditsGranted int64 `json:"microcreditsGranted"`
// V2Access The account's v2 access after redeeming, as `GET /v1/account` reports it. Absent when it could not be read.
V2Access *CodeRedemptionV2Access `json:"v2Access,omitempty"`
}
CodeRedemption defines model for CodeRedemption.
type CodeRedemptionV2Access ¶
type CodeRedemptionV2Access string
CodeRedemptionV2Access The account's v2 access after redeeming, as `GET /v1/account` reports it. Absent when it could not be read.
const ( CodeRedemptionV2AccessGranted CodeRedemptionV2Access = "granted" CodeRedemptionV2AccessInviteRequired CodeRedemptionV2Access = "invite_required" )
Defines values for CodeRedemptionV2Access.
func (CodeRedemptionV2Access) Valid ¶
func (e CodeRedemptionV2Access) Valid() bool
Valid indicates whether the value is a known member of the CodeRedemptionV2Access enum.
type Conductor ¶
type Conductor struct {
AvatarId openapi_types.UUID `json:"avatarId"`
// Edges The graph's edge count, all nodes together.
Edges int `json:"edges"`
// Graph The steps of the conversation (`nodes`) and the one it starts in
// (`start`). Every node must be reachable from `start`. Only `start`,
// `nodes` and `reasoning` are accepted.
Graph ConductorGraph `json:"graph"`
// Nodes The graph's node count.
Nodes int `json:"nodes"`
// SpeakAfterS As set; absent when it was not (the default, 0.5, applies).
SpeakAfterS *float64 `json:"speakAfterS,omitempty"`
}
Conductor defines model for Conductor.
type ConductorEdge ¶
type ConductorEdge struct {
// Speak Taken at the end of an avatar turn, the avatar goes on at once
// under the step it leads to, which must have instructions.
// Default false.
Speak *bool `json:"speak,omitempty"`
// To The id of the node it leads to.
To string `json:"to"`
// Weight Only on an edge without a condition: its share of the
// probability that no condition holds, above 0 and at most 1000.
// Default 1.
Weight *float64 `json:"weight,omitempty"`
// When The condition the judge checks at the end of every turn, at most
// 300 characters (e.g. "The user has said why they came.").
// Absent, null or blank: an edge without a condition.
When *string `json:"when,omitempty"`
}
ConductorEdge An edge, with a condition (`when`) or a weight. Only the fields below are accepted.
type ConductorGraph ¶
type ConductorGraph struct {
// Nodes 1 to 100 nodes; at most 100 edges in all.
Nodes []ConductorNode `json:"nodes"`
// Reasoning Optional free notes on the plan (any JSON); not used by the conductor.
Reasoning interface{} `json:"reasoning,omitempty"`
// Start The id of the node the conversation starts in.
Start string `json:"start"`
}
ConductorGraph The steps of the conversation (`nodes`) and the one it starts in (`start`). Every node must be reachable from `start`. Only `start`, `nodes` and `reasoning` are accepted.
type ConductorNode ¶
type ConductorNode struct {
// Edges Where the conversation may go from this step, this step itself
// included (an edge back to it keeps the conversation here). No
// edges: the step is the end. At most one edge with a condition
// and one without per target.
Edges *[]ConductorEdge `json:"edges,omitempty"`
// Emotion The avatar's feeling while in this step, one of: neutral, calm,
// thoughtful, curious, amused, playful, warm, happy, excited,
// proud, grateful, relieved, hopeful, impressed, determined,
// surprised, confused, skeptical, embarrassed, shy, apologetic,
// nervous, afraid, worried, sympathetic, sad, disappointed, tired,
// bored, frustrated, annoyed, angry, disgusted. Absent, empty or
// null leaves it to the conversation.
Emotion *string `json:"emotion,omitempty"`
// Id `[a-z][a-z0-9_]{0,39}` (lowercase letters, digits and _, starting with a letter, at most 40), unique, not `none`.
Id string `json:"id"`
// Instructions What the avatar does while the conversation is in this step, at
// most 1000 characters. Empty or absent for a step that only
// chooses between others.
Instructions *string `json:"instructions,omitempty"`
// Languages The languages the avatar is expected to speak in this step, as distinct ISO 639-1 codes (two lowercase letters), at least one.
Languages *[]string `json:"languages,omitempty"`
// Random Draw the edge by the probabilities instead of taking the likeliest. Default false.
Random *bool `json:"random,omitempty"`
// Replan Must be false or absent here (the graph runs as given; the model never rewrites it).
Replan *bool `json:"replan,omitempty"`
// RolePlay In this step the avatar may play someone else, in part or whole (a character in a scene it acts out). Default false.
RolePlay *bool `json:"role_play,omitempty"`
}
ConductorNode A step. Only the fields below are accepted. Text must not contain a `!<...>!` placeholder or start with `supabase/` (both are reserved).
type ConductorRequest ¶
type ConductorRequest struct {
// Graph The steps of the conversation (`nodes`) and the one it starts in
// (`start`). Every node must be reachable from `start`. Only `start`,
// `nodes` and `reasoning` are accepted.
Graph ConductorGraph `json:"graph"`
// SpeakAfterS Seconds after an avatar turn before it speaks again along a `speak`
// edge, if the user has not spoken. 0.1 to 10; absent or null uses the
// default, 0.5.
SpeakAfterS *float64 `json:"speakAfterS,omitempty"`
}
ConductorRequest defines model for ConductorRequest.
type ConductorSummary ¶
type ConductorSummary struct {
// Configured Whether a conductor is set (`PUT /conductor`).
Configured bool `json:"configured"`
// Nodes Its node count, when one is set. `GET /conductor` returns the graph.
Nodes *int `json:"nodes,omitempty"`
}
ConductorSummary defines model for ConductorSummary.
type CreateApiKeyJSONRequestBody ¶
type CreateApiKeyJSONRequestBody = ApiKeyCreateRequest
CreateApiKeyJSONRequestBody defines body for CreateApiKey for application/json ContentType.
type CreateApiKeyResponse ¶
type CreateApiKeyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *ApiKeySecret
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ApiErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
// JSON422 the response for an HTTP 422 `application/json` response
JSON422 *FrameworkErrorResponse
}
func ParseCreateApiKeyResponse ¶
func ParseCreateApiKeyResponse(rsp *http.Response) (*CreateApiKeyResponse, error)
ParseCreateApiKeyResponse parses an HTTP response from a CreateApiKeyWithResponse call
func (CreateApiKeyResponse) ContentType ¶
func (r CreateApiKeyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateApiKeyResponse) GetBody ¶
func (r CreateApiKeyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateApiKeyResponse) GetJSON201 ¶
func (r CreateApiKeyResponse) GetJSON201() *ApiKeySecret
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateApiKeyResponse) GetJSON400 ¶
func (r CreateApiKeyResponse) GetJSON400() *ApiErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreateApiKeyResponse) GetJSON403 ¶
func (r CreateApiKeyResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreateApiKeyResponse) GetJSON404 ¶
func (r CreateApiKeyResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (CreateApiKeyResponse) GetJSON409 ¶
func (r CreateApiKeyResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (CreateApiKeyResponse) GetJSON422 ¶
func (r CreateApiKeyResponse) GetJSON422() *FrameworkErrorResponse
GetJSON422 returns the response for an HTTP 422 `application/json` response
func (CreateApiKeyResponse) Status ¶
func (r CreateApiKeyResponse) Status() string
Status returns HTTPResponse.Status
func (CreateApiKeyResponse) StatusCode ¶
func (r CreateApiKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAvatarCandidatesJSONRequestBody ¶
type CreateAvatarCandidatesJSONRequestBody = CandidateCreateRequest
CreateAvatarCandidatesJSONRequestBody defines body for CreateAvatarCandidates for application/json ContentType.
type CreateAvatarCandidatesResponse ¶
type CreateAvatarCandidatesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *CandidateListResponse
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *RateLimited
// Headers202 the parsed response headers for an HTTP 202 response
Headers202 *CreateAvatarCandidatesResponse202Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *CreateAvatarCandidatesResponse429Headers
}
func ParseCreateAvatarCandidatesResponse ¶
func ParseCreateAvatarCandidatesResponse(rsp *http.Response) (*CreateAvatarCandidatesResponse, error)
ParseCreateAvatarCandidatesResponse parses an HTTP response from a CreateAvatarCandidatesWithResponse call
func (CreateAvatarCandidatesResponse) ContentType ¶
func (r CreateAvatarCandidatesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateAvatarCandidatesResponse) GetBody ¶
func (r CreateAvatarCandidatesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateAvatarCandidatesResponse) GetJSON202 ¶
func (r CreateAvatarCandidatesResponse) GetJSON202() *CandidateListResponse
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (CreateAvatarCandidatesResponse) GetJSON429 ¶
func (r CreateAvatarCandidatesResponse) GetJSON429() *RateLimited
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (CreateAvatarCandidatesResponse) Status ¶
func (r CreateAvatarCandidatesResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAvatarCandidatesResponse) StatusCode ¶
func (r CreateAvatarCandidatesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAvatarCandidatesResponse202Headers ¶
type CreateAvatarCandidatesResponse202Headers struct {
XRateLimitLimit *int
XRateLimitRemaining *int
}
CreateAvatarCandidatesResponse202Headers the declared response headers of an HTTP 202 response for CreateAvatarCandidates
type CreateAvatarCandidatesResponse429Headers ¶
type CreateAvatarCandidatesResponse429Headers struct {
RetryAfter *int
XRateLimitLimit *int
XRateLimitRemaining *int
}
CreateAvatarCandidatesResponse429Headers the declared response headers of an HTTP 429 response for CreateAvatarCandidates
type CreateAvatarJSONRequestBody ¶
type CreateAvatarJSONRequestBody = AvatarCreateJsonRequest
CreateAvatarJSONRequestBody defines body for CreateAvatar for application/json ContentType.
type CreateAvatarMultipartBody ¶
type CreateAvatarMultipartBody struct {
// Description Optional description when `file` is an image.
Description *string `json:"description,omitempty"`
// File The bundle zip (≤ 80 MB), or a single portrait image (jpg, png or webp, ≤ 10 MB; front-facing, face at least about a third of the frame, lips slightly parted).
File openapi_types.File `json:"file"`
// Name The avatar name. Required when `file` is an image; ignored for a zip (the manifest names it).
Name *string `json:"name,omitempty"`
}
CreateAvatarMultipartBody defines parameters for CreateAvatar.
type CreateAvatarMultipartRequestBody ¶
type CreateAvatarMultipartRequestBody CreateAvatarMultipartBody
CreateAvatarMultipartRequestBody defines body for CreateAvatar for multipart/form-data ContentType.
type CreateAvatarResponse ¶
type CreateAvatarResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *AvatarCreateResponse
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *AvatarCreateResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ApiErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ApiErrorResponse
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *RateLimited
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
// Headers202 the parsed response headers for an HTTP 202 response
Headers202 *CreateAvatarResponse202Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *CreateAvatarResponse429Headers
}
func ParseCreateAvatarResponse ¶
func ParseCreateAvatarResponse(rsp *http.Response) (*CreateAvatarResponse, error)
ParseCreateAvatarResponse parses an HTTP response from a CreateAvatarWithResponse call
func (CreateAvatarResponse) ContentType ¶
func (r CreateAvatarResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateAvatarResponse) GetBody ¶
func (r CreateAvatarResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateAvatarResponse) GetJSON201 ¶
func (r CreateAvatarResponse) GetJSON201() *AvatarCreateResponse
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateAvatarResponse) GetJSON202 ¶
func (r CreateAvatarResponse) GetJSON202() *AvatarCreateResponse
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (CreateAvatarResponse) GetJSON400 ¶
func (r CreateAvatarResponse) GetJSON400() *ApiErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreateAvatarResponse) GetJSON403 ¶
func (r CreateAvatarResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreateAvatarResponse) GetJSON409 ¶
func (r CreateAvatarResponse) GetJSON409() *ApiErrorResponse
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (CreateAvatarResponse) GetJSON429 ¶
func (r CreateAvatarResponse) GetJSON429() *RateLimited
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (CreateAvatarResponse) GetJSON503 ¶
func (r CreateAvatarResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (CreateAvatarResponse) Status ¶
func (r CreateAvatarResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAvatarResponse) StatusCode ¶
func (r CreateAvatarResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAvatarResponse202Headers ¶
CreateAvatarResponse202Headers the declared response headers of an HTTP 202 response for CreateAvatar
type CreateAvatarResponse429Headers ¶
type CreateAvatarResponse429Headers struct {
RetryAfter *int
XRateLimitLimit *int
XRateLimitRemaining *int
}
CreateAvatarResponse429Headers the declared response headers of an HTTP 429 response for CreateAvatar
type CreateAvatarSessionJSONRequestBody
deprecated
type CreateAvatarSessionJSONRequestBody = AvatarSessionCreateRequest
CreateAvatarSessionJSONRequestBody defines body for CreateAvatarSession for application/json ContentType.
Deprecated: this type has been marked as deprecated upstream, but no `x-deprecated-reason` was set
type CreateAvatarSessionParams ¶
type CreateAvatarSessionParams struct {
// WaitFor `initializing` (default) returns once the worker acknowledged the
// start; `avatar_joined` returns once the avatar participant is in
// your room.
WaitFor *CreateAvatarSessionParamsWaitFor `form:"waitFor,omitempty" json:"waitFor,omitempty"`
}
CreateAvatarSessionParams defines parameters for CreateAvatarSession.
type CreateAvatarSessionParamsWaitFor ¶
type CreateAvatarSessionParamsWaitFor string
CreateAvatarSessionParamsWaitFor defines parameters for CreateAvatarSession.
const ( CreateAvatarSessionParamsWaitForAvatarJoined CreateAvatarSessionParamsWaitFor = "avatar_joined" CreateAvatarSessionParamsWaitForInitializing CreateAvatarSessionParamsWaitFor = "initializing" )
Defines values for CreateAvatarSessionParamsWaitFor.
func (CreateAvatarSessionParamsWaitFor) Valid ¶
func (e CreateAvatarSessionParamsWaitFor) Valid() bool
Valid indicates whether the value is a known member of the CreateAvatarSessionParamsWaitFor enum.
type CreateAvatarSessionResponse ¶
type CreateAvatarSessionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *AvatarSessionCreateResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ApiErrorResponse
// JSON402 the response for an HTTP 402 `application/json` response
JSON402 *PaymentRequiredResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ApiErrorResponse
// JSON422 the response for an HTTP 422 `application/json` response
JSON422 *FrameworkErrorResponse
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *ApiErrorResponse
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
// Headers503 the parsed response headers for an HTTP 503 response
Headers503 *CreateAvatarSessionResponse503Headers
}
func ParseCreateAvatarSessionResponse ¶
func ParseCreateAvatarSessionResponse(rsp *http.Response) (*CreateAvatarSessionResponse, error)
ParseCreateAvatarSessionResponse parses an HTTP response from a CreateAvatarSessionWithResponse call
func (CreateAvatarSessionResponse) ContentType ¶
func (r CreateAvatarSessionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateAvatarSessionResponse) GetBody ¶
func (r CreateAvatarSessionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateAvatarSessionResponse) GetJSON202 ¶
func (r CreateAvatarSessionResponse) GetJSON202() *AvatarSessionCreateResponse
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (CreateAvatarSessionResponse) GetJSON400 ¶
func (r CreateAvatarSessionResponse) GetJSON400() *ApiErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreateAvatarSessionResponse) GetJSON402 ¶
func (r CreateAvatarSessionResponse) GetJSON402() *PaymentRequiredResponse
GetJSON402 returns the response for an HTTP 402 `application/json` response
func (CreateAvatarSessionResponse) GetJSON403 ¶
func (r CreateAvatarSessionResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreateAvatarSessionResponse) GetJSON409 ¶
func (r CreateAvatarSessionResponse) GetJSON409() *ApiErrorResponse
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (CreateAvatarSessionResponse) GetJSON422 ¶
func (r CreateAvatarSessionResponse) GetJSON422() *FrameworkErrorResponse
GetJSON422 returns the response for an HTTP 422 `application/json` response
func (CreateAvatarSessionResponse) GetJSON502 ¶
func (r CreateAvatarSessionResponse) GetJSON502() *ApiErrorResponse
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (CreateAvatarSessionResponse) GetJSON503 ¶
func (r CreateAvatarSessionResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (CreateAvatarSessionResponse) Status ¶
func (r CreateAvatarSessionResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAvatarSessionResponse) StatusCode ¶
func (r CreateAvatarSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAvatarSessionResponse503Headers ¶
type CreateAvatarSessionResponse503Headers struct {
RetryAfter *int
}
CreateAvatarSessionResponse503Headers the declared response headers of an HTTP 503 response for CreateAvatarSession
type CreateSpeechSession422JSONResponseBody ¶
type CreateSpeechSession422JSONResponseBody struct {
// contains filtered or unexported fields
}
CreateSpeechSession422JSONResponseBody defines parameters for CreateSpeechSession.
func (CreateSpeechSession422JSONResponseBody) AsApiErrorResponse ¶
func (t CreateSpeechSession422JSONResponseBody) AsApiErrorResponse() (ApiErrorResponse, error)
AsApiErrorResponse returns the union data inside the CreateSpeechSession422JSONResponseBody as a ApiErrorResponse
func (CreateSpeechSession422JSONResponseBody) AsFrameworkErrorResponse ¶
func (t CreateSpeechSession422JSONResponseBody) AsFrameworkErrorResponse() (FrameworkErrorResponse, error)
AsFrameworkErrorResponse returns the union data inside the CreateSpeechSession422JSONResponseBody as a FrameworkErrorResponse
func (*CreateSpeechSession422JSONResponseBody) FromApiErrorResponse ¶
func (t *CreateSpeechSession422JSONResponseBody) FromApiErrorResponse(v ApiErrorResponse) error
FromApiErrorResponse overwrites any union data inside the CreateSpeechSession422JSONResponseBody as the provided ApiErrorResponse
func (*CreateSpeechSession422JSONResponseBody) FromFrameworkErrorResponse ¶
func (t *CreateSpeechSession422JSONResponseBody) FromFrameworkErrorResponse(v FrameworkErrorResponse) error
FromFrameworkErrorResponse overwrites any union data inside the CreateSpeechSession422JSONResponseBody as the provided FrameworkErrorResponse
func (CreateSpeechSession422JSONResponseBody) MarshalJSON ¶
func (t CreateSpeechSession422JSONResponseBody) MarshalJSON() ([]byte, error)
func (*CreateSpeechSession422JSONResponseBody) MergeApiErrorResponse ¶
func (t *CreateSpeechSession422JSONResponseBody) MergeApiErrorResponse(v ApiErrorResponse) error
MergeApiErrorResponse performs a merge with any union data inside the CreateSpeechSession422JSONResponseBody, using the provided ApiErrorResponse
func (*CreateSpeechSession422JSONResponseBody) MergeFrameworkErrorResponse ¶
func (t *CreateSpeechSession422JSONResponseBody) MergeFrameworkErrorResponse(v FrameworkErrorResponse) error
MergeFrameworkErrorResponse performs a merge with any union data inside the CreateSpeechSession422JSONResponseBody, using the provided FrameworkErrorResponse
func (*CreateSpeechSession422JSONResponseBody) UnmarshalJSON ¶
func (t *CreateSpeechSession422JSONResponseBody) UnmarshalJSON(b []byte) error
type CreateSpeechSessionJSONRequestBody ¶
type CreateSpeechSessionJSONRequestBody = SpeechSessionCreateRequest
CreateSpeechSessionJSONRequestBody defines body for CreateSpeechSession for application/json ContentType.
type CreateSpeechSessionResponse ¶
type CreateSpeechSessionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *SpeechSessionCreateResponse
// JSON402 the response for an HTTP 402 `application/json` response
JSON402 *PaymentRequiredResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
// JSON422 the response for an HTTP 422 `application/json` response
JSON422 *CreateSpeechSession422JSONResponseBody
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
}
func ParseCreateSpeechSessionResponse ¶
func ParseCreateSpeechSessionResponse(rsp *http.Response) (*CreateSpeechSessionResponse, error)
ParseCreateSpeechSessionResponse parses an HTTP response from a CreateSpeechSessionWithResponse call
func (CreateSpeechSessionResponse) ContentType ¶
func (r CreateSpeechSessionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateSpeechSessionResponse) GetBody ¶
func (r CreateSpeechSessionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateSpeechSessionResponse) GetJSON201 ¶
func (r CreateSpeechSessionResponse) GetJSON201() *SpeechSessionCreateResponse
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateSpeechSessionResponse) GetJSON402 ¶
func (r CreateSpeechSessionResponse) GetJSON402() *PaymentRequiredResponse
GetJSON402 returns the response for an HTTP 402 `application/json` response
func (CreateSpeechSessionResponse) GetJSON403 ¶
func (r CreateSpeechSessionResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreateSpeechSessionResponse) GetJSON409 ¶
func (r CreateSpeechSessionResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (CreateSpeechSessionResponse) GetJSON422 ¶
func (r CreateSpeechSessionResponse) GetJSON422() *CreateSpeechSession422JSONResponseBody
GetJSON422 returns the response for an HTTP 422 `application/json` response
func (CreateSpeechSessionResponse) GetJSON503 ¶
func (r CreateSpeechSessionResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (CreateSpeechSessionResponse) Status ¶
func (r CreateSpeechSessionResponse) Status() string
Status returns HTTPResponse.Status
func (CreateSpeechSessionResponse) StatusCode ¶
func (r CreateSpeechSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateUploadJSONRequestBody ¶
type CreateUploadJSONRequestBody = UploadCreateRequest
CreateUploadJSONRequestBody defines body for CreateUpload for application/json ContentType.
type CreateUploadResponse ¶
type CreateUploadResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *UploadCreateResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ApiErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *ApiErrorResponse
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
}
func ParseCreateUploadResponse ¶
func ParseCreateUploadResponse(rsp *http.Response) (*CreateUploadResponse, error)
ParseCreateUploadResponse parses an HTTP response from a CreateUploadWithResponse call
func (CreateUploadResponse) ContentType ¶
func (r CreateUploadResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateUploadResponse) GetBody ¶
func (r CreateUploadResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateUploadResponse) GetJSON201 ¶
func (r CreateUploadResponse) GetJSON201() *UploadCreateResponse
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateUploadResponse) GetJSON400 ¶
func (r CreateUploadResponse) GetJSON400() *ApiErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreateUploadResponse) GetJSON403 ¶
func (r CreateUploadResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreateUploadResponse) GetJSON409 ¶
func (r CreateUploadResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (CreateUploadResponse) GetJSON429 ¶
func (r CreateUploadResponse) GetJSON429() *ApiErrorResponse
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (CreateUploadResponse) GetJSON503 ¶
func (r CreateUploadResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (CreateUploadResponse) Status ¶
func (r CreateUploadResponse) Status() string
Status returns HTTPResponse.Status
func (CreateUploadResponse) StatusCode ¶
func (r CreateUploadResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreditExpiry ¶
type CreditExpiry struct {
AmountMicrocredits int64 `json:"amountMicrocredits"`
// Bucket PLAN, TOPUP or COUPON.
Bucket string `json:"bucket"`
ExpiresAt time.Time `json:"expiresAt"`
}
CreditExpiry defines model for CreditExpiry.
type CurrentCaller ¶
type CurrentCaller struct {
AccountId string `json:"accountId"`
Active *bool `json:"active,omitempty"`
// AvatarId The one avatar an avatar-scoped key may use; absent for an account-wide key.
AvatarId *string `json:"avatarId,omitempty"`
// BillingMode reserve or metered.
BillingMode *string `json:"billingMode,omitempty"`
// Id The key's id (kind api_key).
Id *string `json:"id,omitempty"`
Kind CurrentCallerKind `json:"kind"`
// MaxConcurrentSessions The key's own cap on sessions at once; absent = the plan's.
MaxConcurrentSessions *int `json:"maxConcurrentSessions,omitempty"`
// MaxSessionSeconds The key's own cap on a session's length; absent = the plan's.
MaxSessionSeconds *int `json:"maxSessionSeconds,omitempty"`
Name *string `json:"name,omitempty"`
Scopes *[]string `json:"scopes,omitempty"`
SpendCap *ApiKeySpendCap `json:"spendCap,omitempty"`
// UserId Only for kind user.
UserId *string `json:"userId,omitempty"`
}
CurrentCaller `kind: api_key` carries every field but `userId`; `kind: user` carries only `kind`, `userId` and `accountId`.
type CurrentCallerKind ¶
type CurrentCallerKind string
CurrentCallerKind defines model for CurrentCaller.Kind.
const ( CurrentCallerKindApiKey CurrentCallerKind = "api_key" CurrentCallerKindUser CurrentCallerKind = "user" )
Defines values for CurrentCallerKind.
func (CurrentCallerKind) Valid ¶
func (e CurrentCallerKind) Valid() bool
Valid indicates whether the value is a known member of the CurrentCallerKind enum.
type DeleteAvatarConductorResponse ¶
func ParseDeleteAvatarConductorResponse ¶
func ParseDeleteAvatarConductorResponse(rsp *http.Response) (*DeleteAvatarConductorResponse, error)
ParseDeleteAvatarConductorResponse parses an HTTP response from a DeleteAvatarConductorWithResponse call
func (DeleteAvatarConductorResponse) ContentType ¶
func (r DeleteAvatarConductorResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteAvatarConductorResponse) GetBody ¶
func (r DeleteAvatarConductorResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteAvatarConductorResponse) Status ¶
func (r DeleteAvatarConductorResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAvatarConductorResponse) StatusCode ¶
func (r DeleteAvatarConductorResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteAvatarResponse ¶
type DeleteAvatarResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseDeleteAvatarResponse ¶
func ParseDeleteAvatarResponse(rsp *http.Response) (*DeleteAvatarResponse, error)
ParseDeleteAvatarResponse parses an HTTP response from a DeleteAvatarWithResponse call
func (DeleteAvatarResponse) ContentType ¶
func (r DeleteAvatarResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteAvatarResponse) GetBody ¶
func (r DeleteAvatarResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteAvatarResponse) GetJSON409 ¶
func (r DeleteAvatarResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (DeleteAvatarResponse) Status ¶
func (r DeleteAvatarResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAvatarResponse) StatusCode ¶
func (r DeleteAvatarResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteAvatarThumbnailResponse ¶
type DeleteAvatarThumbnailResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarDetail
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ProfileRefusal
}
func ParseDeleteAvatarThumbnailResponse ¶
func ParseDeleteAvatarThumbnailResponse(rsp *http.Response) (*DeleteAvatarThumbnailResponse, error)
ParseDeleteAvatarThumbnailResponse parses an HTTP response from a DeleteAvatarThumbnailWithResponse call
func (DeleteAvatarThumbnailResponse) ContentType ¶
func (r DeleteAvatarThumbnailResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteAvatarThumbnailResponse) GetBody ¶
func (r DeleteAvatarThumbnailResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteAvatarThumbnailResponse) GetJSON200 ¶
func (r DeleteAvatarThumbnailResponse) GetJSON200() *AvatarDetail
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (DeleteAvatarThumbnailResponse) GetJSON409 ¶
func (r DeleteAvatarThumbnailResponse) GetJSON409() *ProfileRefusal
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (DeleteAvatarThumbnailResponse) Status ¶
func (r DeleteAvatarThumbnailResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAvatarThumbnailResponse) StatusCode ¶
func (r DeleteAvatarThumbnailResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteAvatarVersionResponse ¶
type DeleteAvatarVersionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *VersionDeleteResponse
}
func ParseDeleteAvatarVersionResponse ¶
func ParseDeleteAvatarVersionResponse(rsp *http.Response) (*DeleteAvatarVersionResponse, error)
ParseDeleteAvatarVersionResponse parses an HTTP response from a DeleteAvatarVersionWithResponse call
func (DeleteAvatarVersionResponse) ContentType ¶
func (r DeleteAvatarVersionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteAvatarVersionResponse) GetBody ¶
func (r DeleteAvatarVersionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteAvatarVersionResponse) GetJSON200 ¶
func (r DeleteAvatarVersionResponse) GetJSON200() *VersionDeleteResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (DeleteAvatarVersionResponse) Status ¶
func (r DeleteAvatarVersionResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAvatarVersionResponse) StatusCode ¶
func (r DeleteAvatarVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DesignVoiceJSONRequestBody ¶
type DesignVoiceJSONRequestBody = DesignVoiceRequest
DesignVoiceJSONRequestBody defines body for DesignVoice for application/json ContentType.
type DesignVoiceParams ¶
type DesignVoiceParams struct {
// IdempotencyKey A new UUID minted for this request. Reuse it only to retry the same
// request: a retry never charges twice and returns the first result. A
// malformed key, or a key already used with different inputs, gets 400
// invalid_input.
IdempotencyKey GenerationIdempotencyKey `json:"Idempotency-Key"`
}
DesignVoiceParams defines parameters for DesignVoice.
type DesignVoiceRequest ¶
type DesignVoiceRequest struct {
// AvatarName The avatar's name; the written sample says it.
AvatarName *string `json:"avatarName,omitempty"`
// Language The language the voice speaks. Default `en`.
Language *DesignVoiceRequestLanguage `json:"language,omitempty"`
// SampleText What every preview says, in `language`: 220 to 600 characters for
// Latin and Cyrillic scripts, 120 to 300 for Chinese, Japanese and
// Korean, 180 to 450 for Hindi. Absent, a greeting is written from the
// description.
SampleText *string `json:"sampleText,omitempty"`
// VoiceDescription How the voice should sound: age, tone, pace, accent, character.
VoiceDescription string `json:"voiceDescription"`
}
DesignVoiceRequest defines model for DesignVoiceRequest.
type DesignVoiceRequestLanguage ¶
type DesignVoiceRequestLanguage string
DesignVoiceRequestLanguage The language the voice speaks. Default `en`.
const ( DesignVoiceRequestLanguageDe DesignVoiceRequestLanguage = "de" DesignVoiceRequestLanguageEn DesignVoiceRequestLanguage = "en" DesignVoiceRequestLanguageEs DesignVoiceRequestLanguage = "es" DesignVoiceRequestLanguageFr DesignVoiceRequestLanguage = "fr" DesignVoiceRequestLanguageHi DesignVoiceRequestLanguage = "hi" DesignVoiceRequestLanguageJa DesignVoiceRequestLanguage = "ja" DesignVoiceRequestLanguageKo DesignVoiceRequestLanguage = "ko" DesignVoiceRequestLanguageRu DesignVoiceRequestLanguage = "ru" DesignVoiceRequestLanguageVi DesignVoiceRequestLanguage = "vi" DesignVoiceRequestLanguageZhCN DesignVoiceRequestLanguage = "zh-CN" DesignVoiceRequestLanguageZhTW DesignVoiceRequestLanguage = "zh-TW" )
Defines values for DesignVoiceRequestLanguage.
func (DesignVoiceRequestLanguage) Valid ¶
func (e DesignVoiceRequestLanguage) Valid() bool
Valid indicates whether the value is a known member of the DesignVoiceRequestLanguage enum.
type DesignVoiceResponse ¶
type DesignVoiceResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *DesignedVoicesResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *GenerationBadRequest
// JSON402 the response for an HTTP 402 `application/json` response
JSON402 *GenerationPaymentRequired
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *GenerationForbidden
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *GenerationConflict
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *GenerationRateLimited
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *GenerationProviderFailed
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *GenerationUnavailable
// Headers409 the parsed response headers for an HTTP 409 response
Headers409 *DesignVoiceResponse409Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *DesignVoiceResponse429Headers
}
func ParseDesignVoiceResponse ¶
func ParseDesignVoiceResponse(rsp *http.Response) (*DesignVoiceResponse, error)
ParseDesignVoiceResponse parses an HTTP response from a DesignVoiceWithResponse call
func (DesignVoiceResponse) ContentType ¶
func (r DesignVoiceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DesignVoiceResponse) GetBody ¶
func (r DesignVoiceResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DesignVoiceResponse) GetJSON200 ¶
func (r DesignVoiceResponse) GetJSON200() *DesignedVoicesResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (DesignVoiceResponse) GetJSON400 ¶
func (r DesignVoiceResponse) GetJSON400() *GenerationBadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (DesignVoiceResponse) GetJSON402 ¶
func (r DesignVoiceResponse) GetJSON402() *GenerationPaymentRequired
GetJSON402 returns the response for an HTTP 402 `application/json` response
func (DesignVoiceResponse) GetJSON403 ¶
func (r DesignVoiceResponse) GetJSON403() *GenerationForbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (DesignVoiceResponse) GetJSON409 ¶
func (r DesignVoiceResponse) GetJSON409() *GenerationConflict
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (DesignVoiceResponse) GetJSON429 ¶
func (r DesignVoiceResponse) GetJSON429() *GenerationRateLimited
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (DesignVoiceResponse) GetJSON502 ¶
func (r DesignVoiceResponse) GetJSON502() *GenerationProviderFailed
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (DesignVoiceResponse) GetJSON503 ¶
func (r DesignVoiceResponse) GetJSON503() *GenerationUnavailable
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (DesignVoiceResponse) Status ¶
func (r DesignVoiceResponse) Status() string
Status returns HTTPResponse.Status
func (DesignVoiceResponse) StatusCode ¶
func (r DesignVoiceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DesignVoiceResponse409Headers ¶
type DesignVoiceResponse409Headers struct {
RetryAfter *int
}
DesignVoiceResponse409Headers the declared response headers of an HTTP 409 response for DesignVoice
type DesignVoiceResponse429Headers ¶
type DesignVoiceResponse429Headers struct {
RetryAfter *int
}
DesignVoiceResponse429Headers the declared response headers of an HTTP 429 response for DesignVoice
type DesignedVoice ¶
type DesignedVoice struct {
// DurationSeconds The preview's length as the provider reported it; null when it did not.
DurationSeconds *float64 `json:"durationSeconds"`
// ExpiresAt When the upload stops working (24 hours after it was made).
ExpiresAt time.Time `json:"expiresAt"`
// Provider The voice provider that designed it.
Provider string `json:"provider"`
// SpokenText The text the preview actually speaks.
SpokenText string `json:"spokenText"`
Unavailable bool `json:"unavailable"`
// Upload `upload:<uploadId>`: pass it where an avatar takes its voice.
//
// Examples: upload:3f1c2a9e-8d4b-4f6a-9c2e-1b7d5a0e4c11
Upload string `json:"upload"`
// Url A short-lived link to play the preview; absent when the preview is unavailable or no link could be made.
Url *string `json:"url,omitempty"`
}
DesignedVoice defines model for DesignedVoice.
type DesignedVoicesResponse ¶
type DesignedVoicesResponse struct {
// FailedProviders The providers that returned nothing usable.
FailedProviders []string `json:"failedProviders"`
Language DesignedVoicesResponseLanguage `json:"language"`
// MicrocreditsCharged What this call charged (100 microcredits = 1 credit); 0 on a replay.
MicrocreditsCharged int `json:"microcreditsCharged"`
// Replayed True when an earlier call with the same Idempotency-Key was replayed.
Replayed bool `json:"replayed"`
Voices []DesignedVoice `json:"voices"`
}
DesignedVoicesResponse defines model for DesignedVoicesResponse.
type DesignedVoicesResponseLanguage ¶
type DesignedVoicesResponseLanguage string
DesignedVoicesResponseLanguage defines model for DesignedVoicesResponse.Language.
const ( DesignedVoicesResponseLanguageDe DesignedVoicesResponseLanguage = "de" DesignedVoicesResponseLanguageEn DesignedVoicesResponseLanguage = "en" DesignedVoicesResponseLanguageEs DesignedVoicesResponseLanguage = "es" DesignedVoicesResponseLanguageFr DesignedVoicesResponseLanguage = "fr" DesignedVoicesResponseLanguageHi DesignedVoicesResponseLanguage = "hi" DesignedVoicesResponseLanguageJa DesignedVoicesResponseLanguage = "ja" DesignedVoicesResponseLanguageKo DesignedVoicesResponseLanguage = "ko" DesignedVoicesResponseLanguageRu DesignedVoicesResponseLanguage = "ru" DesignedVoicesResponseLanguageVi DesignedVoicesResponseLanguage = "vi" DesignedVoicesResponseLanguageZhCN DesignedVoicesResponseLanguage = "zh-CN" DesignedVoicesResponseLanguageZhTW DesignedVoicesResponseLanguage = "zh-TW" )
Defines values for DesignedVoicesResponseLanguage.
func (DesignedVoicesResponseLanguage) Valid ¶
func (e DesignedVoicesResponseLanguage) Valid() bool
Valid indicates whether the value is a known member of the DesignedVoicesResponseLanguage enum.
type EmbedSessionStartRequest ¶
type EmbedSessionStartRequest struct {
// AppTools Functions the avatar may call in this session, and how to use them. Absent or null, the session has none.
AppTools *AppTools `json:"appTools,omitempty"`
// AvatarId ID of the avatar to launch. Must be on this key's allow-list.
//
// Examples: 123e4567-e89b-12d3-a456-426614174000
AvatarId string `json:"avatarId"`
// CheckInAfterS Seconds of silence before the avatar speaks up in character, from
// 0 to 3600; a second check-in waits twice as long, then it stays
// quiet until the visitor speaks. `0` turns the check-in off. Absent
// or null keeps the default, about 10 seconds. Needs a v2 avatar
// that launches on the default conversation runtime, as every avatar
// built through this API does; any other answers `400
// check_in_not_supported`, with nothing billed. Billing and session
// length are the same either way.
CheckInAfterS *float64 `json:"checkInAfterS,omitempty"`
// Language Per-session language override (BCP-47), e.g. `en`, `zh-TW`, `ja`.
// Omit to use the avatar's own language. Any well-formed tag is
// accepted and forwarded; the runtime routes speech recognition and
// responses for `en`, `zh-TW` and `ja` today and falls back to
// language auto-detection for other tags.
//
//
// Examples: zh-TW
Language *string `json:"language,omitempty"`
// Location Optional location metadata to attach to the session (stored as JSONB).
Location *map[string]interface{} `json:"location,omitempty"`
// MaxDurationSeconds Maximum duration of the session in seconds. If not provided, uses the key's/plan's/balance's maximum. Capped server-side.
//
// Examples: 300
MaxDurationSeconds *int `json:"maxDurationSeconds,omitempty"`
// Metadata Optional free-form metadata to attach to the session (stored as JSONB).
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// VisitorId Opaque identifier for this visitor. Only meaningful when the key
// has cross-visit memory enabled — otherwise ignored and every
// session starts fresh. Must be an unguessable value derived from
// your own server-side session and never taken from the page:
// whoever can name it reads that visitor's conversation history.
VisitorId *string `json:"visitorId,omitempty"`
// Welcome `false` starts the session without the avatar's welcome: no
// self-introduction and no welcome back, first visit or return. It
// waits for the visitor to speak and answers as usual; a long
// silence still gets its check-in, which `checkInAfterS` sets or
// turns off. Absent, null or `true`, the
// avatar speaks first, as it always has. Needs a v2 avatar that
// launches on the default conversation runtime, as every avatar
// built through this API does; any other answers `400
// welcome_not_supported`, with nothing billed. Billing and session
// length are the same either way.
Welcome *bool `json:"welcome,omitempty"`
}
EmbedSessionStartRequest Request body for `/v1/session`. No `framework` field — embeds are always LiveKit.
type EmbedSessionStartResponse ¶
type EmbedSessionStartResponse struct {
// ActualDurationSeconds The granted session length in seconds, counted from when both the
// visitor and the avatar are in the room. Absent when the session is
// uncapped (a `metered` key without a session cap): do not start a
// countdown then. A metered session ends when the balance or the key's
// spend cap runs out, after a short grace, or at the service's maximum
// length.
ActualDurationSeconds *int `json:"actualDurationSeconds,omitempty"`
// BillingMode How the session is billed. `reserve` locks the whole granted
// duration when the session starts and releases the unused part at
// the end. `metered` charges the elapsed time in one-minute ticks
// while the session runs; nothing is locked up front.
BillingMode EmbedSessionStartResponseBillingMode `json:"billingMode"`
// DurationCapped True when `actualDurationSeconds` is shorter than
// `requestedDurationSeconds`: the key's, the plan's or the
// balance's limit cut the session you asked for.
DurationCapped *bool `json:"durationCapped,omitempty"`
// FundedSeconds Anonymous sessions only, present when the avatar's sponsor budget
// runs out before `actualDurationSeconds`: how long it pays for at
// start, in seconds. The session ends there unless the budget grows.
FundedSeconds *int `json:"fundedSeconds,omitempty"`
// Links Absent when this deployment does not know the website's address.
Links *SessionLinks `json:"links,omitempty"`
// RequestedDurationSeconds The `maxDurationSeconds` you sent; omitted when you sent none.
RequestedDurationSeconds *int `json:"requestedDurationSeconds,omitempty"`
// RoomName LiveKit room name, informational only — the token already selects the room.
//
// Examples: rk-8f14e45f-ceea-467a-9f21-4c2f5b3a91cd
RoomName string `json:"roomName"`
// ServerUrl Bare LiveKit server URL — pass directly to Room.connect(). Never has a room path appended.
//
// Examples: wss://atmanity.livekit.cloud
ServerUrl string `json:"serverUrl"`
// SessionId ID of the created session
//
// Examples: 550e8400-e29b-41d4-a716-446655440000
SessionId openapi_types.UUID `json:"sessionId"`
// UserToken LiveKit access token for the visitor's browser to join with.
UserToken string `json:"userToken"`
}
EmbedSessionStartResponse A started conversation session: `serverUrl`, `roomName` and `userToken` are what `livekit-client`'s `Room.connect()` needs.
type EmbedSessionStartResponseBillingMode ¶
type EmbedSessionStartResponseBillingMode string
EmbedSessionStartResponseBillingMode How the session is billed. `reserve` locks the whole granted duration when the session starts and releases the unused part at the end. `metered` charges the elapsed time in one-minute ticks while the session runs; nothing is locked up front.
const ( EmbedSessionStartResponseBillingModeMetered EmbedSessionStartResponseBillingMode = "metered" EmbedSessionStartResponseBillingModeReserve EmbedSessionStartResponseBillingMode = "reserve" )
Defines values for EmbedSessionStartResponseBillingMode.
func (EmbedSessionStartResponseBillingMode) Valid ¶
func (e EmbedSessionStartResponseBillingMode) Valid() bool
Valid indicates whether the value is a known member of the EmbedSessionStartResponseBillingMode enum.
type EndAvatarSessionResponse ¶
type EndAvatarSessionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarSessionEndResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ApiErrorResponse
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
// Headers503 the parsed response headers for an HTTP 503 response
Headers503 *EndAvatarSessionResponse503Headers
}
func ParseEndAvatarSessionResponse ¶
func ParseEndAvatarSessionResponse(rsp *http.Response) (*EndAvatarSessionResponse, error)
ParseEndAvatarSessionResponse parses an HTTP response from a EndAvatarSessionWithResponse call
func (EndAvatarSessionResponse) ContentType ¶
func (r EndAvatarSessionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (EndAvatarSessionResponse) GetBody ¶
func (r EndAvatarSessionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (EndAvatarSessionResponse) GetJSON200 ¶
func (r EndAvatarSessionResponse) GetJSON200() *AvatarSessionEndResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (EndAvatarSessionResponse) GetJSON403 ¶
func (r EndAvatarSessionResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (EndAvatarSessionResponse) GetJSON404 ¶
func (r EndAvatarSessionResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (EndAvatarSessionResponse) GetJSON409 ¶
func (r EndAvatarSessionResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (EndAvatarSessionResponse) GetJSON500 ¶
func (r EndAvatarSessionResponse) GetJSON500() *ApiErrorResponse
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (EndAvatarSessionResponse) GetJSON503 ¶
func (r EndAvatarSessionResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (EndAvatarSessionResponse) Status ¶
func (r EndAvatarSessionResponse) Status() string
Status returns HTTPResponse.Status
func (EndAvatarSessionResponse) StatusCode ¶
func (r EndAvatarSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EndAvatarSessionResponse503Headers ¶
type EndAvatarSessionResponse503Headers struct {
RetryAfter *int
}
EndAvatarSessionResponse503Headers the declared response headers of an HTTP 503 response for EndAvatarSession
type EndSpeechSessionResponse ¶
type EndSpeechSessionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *SpeechSessionEndResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ApiErrorResponse
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
}
func ParseEndSpeechSessionResponse ¶
func ParseEndSpeechSessionResponse(rsp *http.Response) (*EndSpeechSessionResponse, error)
ParseEndSpeechSessionResponse parses an HTTP response from a EndSpeechSessionWithResponse call
func (EndSpeechSessionResponse) ContentType ¶
func (r EndSpeechSessionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (EndSpeechSessionResponse) GetBody ¶
func (r EndSpeechSessionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (EndSpeechSessionResponse) GetJSON200 ¶
func (r EndSpeechSessionResponse) GetJSON200() *SpeechSessionEndResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (EndSpeechSessionResponse) GetJSON403 ¶
func (r EndSpeechSessionResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (EndSpeechSessionResponse) GetJSON404 ¶
func (r EndSpeechSessionResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (EndSpeechSessionResponse) GetJSON409 ¶
func (r EndSpeechSessionResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (EndSpeechSessionResponse) GetJSON500 ¶
func (r EndSpeechSessionResponse) GetJSON500() *ApiErrorResponse
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (EndSpeechSessionResponse) GetJSON503 ¶
func (r EndSpeechSessionResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (EndSpeechSessionResponse) Status ¶
func (r EndSpeechSessionResponse) Status() string
Status returns HTTPResponse.Status
func (EndSpeechSessionResponse) StatusCode ¶
func (r EndSpeechSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EnhancePortraitJSONRequestBody ¶
type EnhancePortraitJSONRequestBody = EnhancePortraitRequest
EnhancePortraitJSONRequestBody defines body for EnhancePortrait for application/json ContentType.
type EnhancePortraitParams ¶
type EnhancePortraitParams struct {
// IdempotencyKey A new UUID minted for this request. Reuse it only to retry the same
// request: a retry never charges twice and returns the first result. A
// malformed key, or a key already used with different inputs, gets 400
// invalid_input.
IdempotencyKey GenerationIdempotencyKey `json:"Idempotency-Key"`
}
EnhancePortraitParams defines parameters for EnhancePortrait.
type EnhancePortraitRequest ¶
type EnhancePortraitRequest struct {
// AvatarId An existing avatar whose photo this replaces. Its own engine is
// used, so leave `engine` out (a different one is `invalid_input`). An
// avatar the account does not have is `404 avatar_not_found`, and one
// outside an avatar-scoped key is `403 avatar_not_allowed`; neither is
// charged.
AvatarId *openapi_types.UUID `json:"avatarId,omitempty"`
// Engine The avatar engine the photo is for. `v1` (the default) turns the face to the camera, shoulders up, and blurs the background; `v2` keeps the pose, gaze, hands, framing and background and only improves quality. Pass the engine the avatar will be created with.
Engine *EnhancePortraitRequestEngine `json:"engine,omitempty"`
// Image The photo to enhance, `upload:<uploadId>` or a public https link (jpg, png or webp, at most 10 MB).
Image string `json:"image"`
// Prompt How to restyle the photo ("as a 1920s detective, film noir lighting"). The person in the photo is kept unless the prompt asks otherwise. Absent or blank, the photo is only enhanced.
Prompt *string `json:"prompt,omitempty"`
}
EnhancePortraitRequest defines model for EnhancePortraitRequest.
type EnhancePortraitRequestEngine ¶
type EnhancePortraitRequestEngine string
EnhancePortraitRequestEngine The avatar engine the photo is for. `v1` (the default) turns the face to the camera, shoulders up, and blurs the background; `v2` keeps the pose, gaze, hands, framing and background and only improves quality. Pass the engine the avatar will be created with.
const ( EnhancePortraitRequestEngineV1 EnhancePortraitRequestEngine = "v1" EnhancePortraitRequestEngineV2 EnhancePortraitRequestEngine = "v2" )
Defines values for EnhancePortraitRequestEngine.
func (EnhancePortraitRequestEngine) Valid ¶
func (e EnhancePortraitRequestEngine) Valid() bool
Valid indicates whether the value is a known member of the EnhancePortraitRequestEngine enum.
type EnhancePortraitResponse ¶
type EnhancePortraitResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *GeneratedPortraitsResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *GenerationBadRequest
// JSON402 the response for an HTTP 402 `application/json` response
JSON402 *GenerationPaymentRequired
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *GenerationConflict
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *GenerationRateLimited
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *GenerationProviderFailed
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *GenerationUnavailable
// Headers409 the parsed response headers for an HTTP 409 response
Headers409 *EnhancePortraitResponse409Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *EnhancePortraitResponse429Headers
}
func ParseEnhancePortraitResponse ¶
func ParseEnhancePortraitResponse(rsp *http.Response) (*EnhancePortraitResponse, error)
ParseEnhancePortraitResponse parses an HTTP response from a EnhancePortraitWithResponse call
func (EnhancePortraitResponse) ContentType ¶
func (r EnhancePortraitResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (EnhancePortraitResponse) GetBody ¶
func (r EnhancePortraitResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (EnhancePortraitResponse) GetJSON200 ¶
func (r EnhancePortraitResponse) GetJSON200() *GeneratedPortraitsResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (EnhancePortraitResponse) GetJSON400 ¶
func (r EnhancePortraitResponse) GetJSON400() *GenerationBadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (EnhancePortraitResponse) GetJSON402 ¶
func (r EnhancePortraitResponse) GetJSON402() *GenerationPaymentRequired
GetJSON402 returns the response for an HTTP 402 `application/json` response
func (EnhancePortraitResponse) GetJSON403 ¶
func (r EnhancePortraitResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (EnhancePortraitResponse) GetJSON404 ¶
func (r EnhancePortraitResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (EnhancePortraitResponse) GetJSON409 ¶
func (r EnhancePortraitResponse) GetJSON409() *GenerationConflict
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (EnhancePortraitResponse) GetJSON429 ¶
func (r EnhancePortraitResponse) GetJSON429() *GenerationRateLimited
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (EnhancePortraitResponse) GetJSON502 ¶
func (r EnhancePortraitResponse) GetJSON502() *GenerationProviderFailed
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (EnhancePortraitResponse) GetJSON503 ¶
func (r EnhancePortraitResponse) GetJSON503() *GenerationUnavailable
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (EnhancePortraitResponse) Status ¶
func (r EnhancePortraitResponse) Status() string
Status returns HTTPResponse.Status
func (EnhancePortraitResponse) StatusCode ¶
func (r EnhancePortraitResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EnhancePortraitResponse409Headers ¶
type EnhancePortraitResponse409Headers struct {
RetryAfter *int
}
EnhancePortraitResponse409Headers the declared response headers of an HTTP 409 response for EnhancePortrait
type EnhancePortraitResponse429Headers ¶
type EnhancePortraitResponse429Headers struct {
RetryAfter *int
}
EnhancePortraitResponse429Headers the declared response headers of an HTTP 429 response for EnhancePortrait
type FrameworkErrorResponse ¶
type FrameworkErrorResponse struct {
// Code HTTP status code, repeated in the body (422 for schema/constraint violations, 400 for unparseable JSON).
//
// Examples: 422
Code *int32 `json:"code,omitempty"`
// Message Human-readable description of the validation failure.
//
// Examples: avatarId in body is required
Message *string `json:"message,omitempty"`
}
FrameworkErrorResponse The error returned when a request fails schema validation before it is processed: malformed JSON, a missing required field, a value outside its constraints, or a path parameter in the wrong format. Application errors use `ErrorResponse`.
type GenerateClipJSONRequestBody ¶
type GenerateClipJSONRequestBody = GenerateClipRequest
GenerateClipJSONRequestBody defines body for GenerateClip for application/json ContentType.
type GenerateClipParams ¶
type GenerateClipParams struct {
// IdempotencyKey A new UUID minted for this request. Reuse it only to retry the same
// request: a retry never charges twice and returns the first result. A
// malformed key, or a key already used with different inputs, gets 400
// invalid_input.
IdempotencyKey GenerationIdempotencyKey `json:"Idempotency-Key"`
}
GenerateClipParams defines parameters for GenerateClip.
type GenerateClipRequest ¶
type GenerateClipRequest struct {
// AspectRatio A v2 avatar's shape, which picks its frame size: `square` 512 x 512
// (the default), `portrait` 384 x 640, `landscape` 640 x 384. The
// sizes follow the renderer and may change; the names do not. Send it
// or `resolution`, not both (`400`). On an avatar it is a build input,
// like `resolution`: a change on PATCH builds a new version.
AspectRatio *AspectRatio `json:"aspectRatio,omitempty"`
// Audio What the clip says or plays, `upload:<uploadId>` (a `voice` upload) or a public https link to an audio file. Absent, the clip is silent.
Audio *string `json:"audio,omitempty"`
// DurationSeconds The clip's length. Required with `audio` (set it to the audio's length; it is not read from the file); default 8 for a silent clip. At most 15 where clips render on the sessions' pool, else 30 and at most the size's budget (render width x height x seconds up to 1920 x 1088 x 10).
DurationSeconds *int `json:"durationSeconds,omitempty"`
// Image Who or what the clip shows, `upload:<uploadId>` (a `portrait` upload) or a public https link (jpg, png or webp, at most 10 MB).
Image string `json:"image"`
// Prompt The shot and the motion, e.g. "she walks along the beach at sunset, the camera following".
Prompt string `json:"prompt"`
// Resolution A clip's size in pixels: width and height are each even, from 256
// to 1920, e.g. 1920 x 1080, 1080 x 1920 or 1280 x 720. The renderer
// works at each side rounded up to a multiple of 32 (1920 x 1080 at
// 1920 x 1088) and crops the centre to the size asked for, so at most
// 31 pixels are lost on a side and nothing is resampled. The render
// size is at most 1920 x 1088 pixels in all. Where clips render on the
// sessions' pool (`GET /v1/account`
// `pricing.generation.clipAnySize` false), the render size must also
// be one of `clipResolutions`. Another size is `400 invalid_input`.
Resolution *ClipResolution `json:"resolution,omitempty"`
// Seed The render's seed; another seed gives other motion. Default 0.
Seed *int64 `json:"seed,omitempty"`
}
GenerateClipRequest defines model for GenerateClipRequest.
type GenerateClipResponse ¶
type GenerateClipResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *GeneratedClipResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *GenerationBadRequest
// JSON402 the response for an HTTP 402 `application/json` response
JSON402 *GenerationPaymentRequired
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *GenerationForbidden
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *GenerationConflict
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *GenerationRateLimited
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *GenerationProviderFailed
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *GenerationUnavailable
// Headers409 the parsed response headers for an HTTP 409 response
Headers409 *GenerateClipResponse409Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *GenerateClipResponse429Headers
}
func ParseGenerateClipResponse ¶
func ParseGenerateClipResponse(rsp *http.Response) (*GenerateClipResponse, error)
ParseGenerateClipResponse parses an HTTP response from a GenerateClipWithResponse call
func (GenerateClipResponse) ContentType ¶
func (r GenerateClipResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GenerateClipResponse) GetBody ¶
func (r GenerateClipResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GenerateClipResponse) GetJSON200 ¶
func (r GenerateClipResponse) GetJSON200() *GeneratedClipResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GenerateClipResponse) GetJSON400 ¶
func (r GenerateClipResponse) GetJSON400() *GenerationBadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GenerateClipResponse) GetJSON402 ¶
func (r GenerateClipResponse) GetJSON402() *GenerationPaymentRequired
GetJSON402 returns the response for an HTTP 402 `application/json` response
func (GenerateClipResponse) GetJSON403 ¶
func (r GenerateClipResponse) GetJSON403() *GenerationForbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GenerateClipResponse) GetJSON409 ¶
func (r GenerateClipResponse) GetJSON409() *GenerationConflict
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GenerateClipResponse) GetJSON429 ¶
func (r GenerateClipResponse) GetJSON429() *GenerationRateLimited
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (GenerateClipResponse) GetJSON502 ¶
func (r GenerateClipResponse) GetJSON502() *GenerationProviderFailed
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (GenerateClipResponse) GetJSON503 ¶
func (r GenerateClipResponse) GetJSON503() *GenerationUnavailable
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (GenerateClipResponse) Status ¶
func (r GenerateClipResponse) Status() string
Status returns HTTPResponse.Status
func (GenerateClipResponse) StatusCode ¶
func (r GenerateClipResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GenerateClipResponse409Headers ¶
type GenerateClipResponse409Headers struct {
RetryAfter *int
}
GenerateClipResponse409Headers the declared response headers of an HTTP 409 response for GenerateClip
type GenerateClipResponse429Headers ¶
type GenerateClipResponse429Headers struct {
RetryAfter *int
}
GenerateClipResponse429Headers the declared response headers of an HTTP 429 response for GenerateClip
type GeneratePortraitsJSONRequestBody ¶
type GeneratePortraitsJSONRequestBody = GeneratePortraitsRequest
GeneratePortraitsJSONRequestBody defines body for GeneratePortraits for application/json ContentType.
type GeneratePortraitsParams ¶
type GeneratePortraitsParams struct {
// IdempotencyKey A new UUID minted for this request. Reuse it only to retry the same
// request: a retry never charges twice and returns the first result. A
// malformed key, or a key already used with different inputs, gets 400
// invalid_input.
IdempotencyKey GenerationIdempotencyKey `json:"Idempotency-Key"`
}
GeneratePortraitsParams defines parameters for GeneratePortraits.
type GeneratePortraitsRequest ¶
type GeneratePortraitsRequest struct {
// Description What the portrait shows (an invented character).
Description string `json:"description"`
// Engine The avatar engine the portrait is for. `v1` (the default) frames it from the shoulders up, facing the camera; `v2` frames it half-body (waist up, hands visible) unless the description sets another framing, and keeps the pose and setting it asks for. Pass the engine the avatar will be created with.
Engine *GeneratePortraitsRequestEngine `json:"engine,omitempty"`
}
GeneratePortraitsRequest defines model for GeneratePortraitsRequest.
type GeneratePortraitsRequestEngine ¶
type GeneratePortraitsRequestEngine string
GeneratePortraitsRequestEngine The avatar engine the portrait is for. `v1` (the default) frames it from the shoulders up, facing the camera; `v2` frames it half-body (waist up, hands visible) unless the description sets another framing, and keeps the pose and setting it asks for. Pass the engine the avatar will be created with.
const ( GeneratePortraitsRequestEngineV1 GeneratePortraitsRequestEngine = "v1" GeneratePortraitsRequestEngineV2 GeneratePortraitsRequestEngine = "v2" )
Defines values for GeneratePortraitsRequestEngine.
func (GeneratePortraitsRequestEngine) Valid ¶
func (e GeneratePortraitsRequestEngine) Valid() bool
Valid indicates whether the value is a known member of the GeneratePortraitsRequestEngine enum.
type GeneratePortraitsResponse ¶
type GeneratePortraitsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *GeneratedPortraitsResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *GenerationBadRequest
// JSON402 the response for an HTTP 402 `application/json` response
JSON402 *GenerationPaymentRequired
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *GenerationForbidden
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *GenerationConflict
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *GenerationRateLimited
// JSON502 the response for an HTTP 502 `application/json` response
JSON502 *GenerationProviderFailed
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *GenerationUnavailable
// Headers409 the parsed response headers for an HTTP 409 response
Headers409 *GeneratePortraitsResponse409Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *GeneratePortraitsResponse429Headers
}
func ParseGeneratePortraitsResponse ¶
func ParseGeneratePortraitsResponse(rsp *http.Response) (*GeneratePortraitsResponse, error)
ParseGeneratePortraitsResponse parses an HTTP response from a GeneratePortraitsWithResponse call
func (GeneratePortraitsResponse) ContentType ¶
func (r GeneratePortraitsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GeneratePortraitsResponse) GetBody ¶
func (r GeneratePortraitsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GeneratePortraitsResponse) GetJSON200 ¶
func (r GeneratePortraitsResponse) GetJSON200() *GeneratedPortraitsResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GeneratePortraitsResponse) GetJSON400 ¶
func (r GeneratePortraitsResponse) GetJSON400() *GenerationBadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GeneratePortraitsResponse) GetJSON402 ¶
func (r GeneratePortraitsResponse) GetJSON402() *GenerationPaymentRequired
GetJSON402 returns the response for an HTTP 402 `application/json` response
func (GeneratePortraitsResponse) GetJSON403 ¶
func (r GeneratePortraitsResponse) GetJSON403() *GenerationForbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GeneratePortraitsResponse) GetJSON409 ¶
func (r GeneratePortraitsResponse) GetJSON409() *GenerationConflict
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GeneratePortraitsResponse) GetJSON429 ¶
func (r GeneratePortraitsResponse) GetJSON429() *GenerationRateLimited
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (GeneratePortraitsResponse) GetJSON502 ¶
func (r GeneratePortraitsResponse) GetJSON502() *GenerationProviderFailed
GetJSON502 returns the response for an HTTP 502 `application/json` response
func (GeneratePortraitsResponse) GetJSON503 ¶
func (r GeneratePortraitsResponse) GetJSON503() *GenerationUnavailable
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (GeneratePortraitsResponse) Status ¶
func (r GeneratePortraitsResponse) Status() string
Status returns HTTPResponse.Status
func (GeneratePortraitsResponse) StatusCode ¶
func (r GeneratePortraitsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GeneratePortraitsResponse409Headers ¶
type GeneratePortraitsResponse409Headers struct {
RetryAfter *int
}
GeneratePortraitsResponse409Headers the declared response headers of an HTTP 409 response for GeneratePortraits
type GeneratePortraitsResponse429Headers ¶
type GeneratePortraitsResponse429Headers struct {
RetryAfter *int
}
GeneratePortraitsResponse429Headers the declared response headers of an HTTP 429 response for GeneratePortraits
type GeneratedClip ¶
type GeneratedClip struct {
// DurationSeconds The clip's length.
DurationSeconds int `json:"durationSeconds"`
// ExpiresAt When the upload stops working (24 hours after it was made).
ExpiresAt time.Time `json:"expiresAt"`
Height int `json:"height"`
Unavailable bool `json:"unavailable"`
// Upload `upload:<uploadId>`: the clip, an mp4.
//
// Examples: upload:3f1c2a9e-8d4b-4f6a-9c2e-1b7d5a0e4c11
Upload string `json:"upload"`
// Url A short-lived link to download the mp4; absent when the clip is unavailable or no link could be made.
Url *string `json:"url,omitempty"`
Width int `json:"width"`
}
GeneratedClip defines model for GeneratedClip.
type GeneratedClipResponse ¶
type GeneratedClipResponse struct {
Clip GeneratedClip `json:"clip"`
// MicrocreditsCharged What this call charged (100 microcredits = 1 credit), the price per 15 seconds times `durationSeconds` / 15, rounded up; 0 on a replay.
MicrocreditsCharged int `json:"microcreditsCharged"`
// Replayed True when an earlier call with the same Idempotency-Key was replayed.
Replayed bool `json:"replayed"`
}
GeneratedClipResponse defines model for GeneratedClipResponse.
type GeneratedPortrait ¶
type GeneratedPortrait struct {
// ExpiresAt When the upload stops working (24 hours after it was made).
ExpiresAt time.Time `json:"expiresAt"`
// Preview A small JPEG of the portrait, base64-encoded, to show without fetching `url`.
Preview []byte `json:"preview"`
// Provider The image provider that made it.
Provider string `json:"provider"`
Unavailable bool `json:"unavailable"`
// Upload `upload:<uploadId>`: pass it where an avatar takes its portrait.
//
// Examples: upload:3f1c2a9e-8d4b-4f6a-9c2e-1b7d5a0e4c11
Upload string `json:"upload"`
// Url A short-lived link to view the full-size portrait; absent when the portrait is unavailable or no link could be made.
Url *string `json:"url,omitempty"`
}
GeneratedPortrait defines model for GeneratedPortrait.
type GeneratedPortraitsResponse ¶
type GeneratedPortraitsResponse struct {
// FailedProviders The providers that returned nothing usable.
FailedProviders []string `json:"failedProviders"`
// MicrocreditsCharged What this call charged (100 microcredits = 1 credit); 0 on a replay.
MicrocreditsCharged int `json:"microcreditsCharged"`
Portraits []GeneratedPortrait `json:"portraits"`
// Replayed True when an earlier call with the same Idempotency-Key was replayed.
Replayed bool `json:"replayed"`
}
GeneratedPortraitsResponse defines model for GeneratedPortraitsResponse.
type GenerationBadRequest ¶
type GenerationBadRequest = ApiErrorResponse
GenerationBadRequest defines model for GenerationBadRequest.
type GenerationConflict ¶
type GenerationConflict = ApiErrorResponse
GenerationConflict defines model for GenerationConflict.
type GenerationForbidden ¶
type GenerationForbidden = ApiErrorResponse
GenerationForbidden defines model for GenerationForbidden.
type GenerationIdempotencyKey ¶
type GenerationIdempotencyKey = string
GenerationIdempotencyKey defines model for GenerationIdempotencyKey.
type GenerationPaymentRequired ¶
type GenerationPaymentRequired = ApiErrorResponse
GenerationPaymentRequired defines model for GenerationPaymentRequired.
type GenerationPricing ¶
type GenerationPricing struct {
// ClipAnySize True where clips render on a pool kept for them, at any `ClipResolution` and up to 30 seconds within the size's budget; false where they render on the sessions' pool, at a size in `clipResolutions` for up to 15 seconds. Absent where clips are not offered.
ClipAnySize *bool `json:"clipAnySize,omitempty"`
// ClipPer15SecondsMicrocredits Fifteen seconds of a `POST /v1/generation/clips` clip. A clip costs
// this times its `durationSeconds` / 15, rounded up. Absent where
// clips are not offered.
ClipPer15SecondsMicrocredits *int `json:"clipPer15SecondsMicrocredits,omitempty"`
// ClipPerSecondMicrocredits Use `clipPer15SecondsMicrocredits`. One second of a clip, rounded up, so this times `durationSeconds` is never below a clip's price. Absent where clips are not offered.
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
ClipPerSecondMicrocredits *int `json:"clipPerSecondMicrocredits,omitempty"`
// ClipResolutions The frame sizes offered for v2 avatars, 512 x 512 first, and the sizes a clip may render at when `clipAnySize` is false; another is `400 invalid_input`. Absent where clips are not offered, or where every size the rule allows is offered.
ClipResolutions *[]RenderResolution `json:"clipResolutions,omitempty"`
// EnhancementsMicrocredits One `POST /v1/generation/enhancements` call.
EnhancementsMicrocredits int `json:"enhancementsMicrocredits"`
// PortraitsMicrocredits One `POST /v1/generation/portraits` call.
PortraitsMicrocredits int `json:"portraitsMicrocredits"`
// VoicesMicrocredits One `POST /v1/generation/voices` call.
VoicesMicrocredits int `json:"voicesMicrocredits"`
}
GenerationPricing The price of one call of each generation operation, charged only when at least one output comes back. Absent when this instance does not offer generation.
type GenerationProviderFailed ¶
type GenerationProviderFailed = ApiErrorResponse
GenerationProviderFailed defines model for GenerationProviderFailed.
type GenerationRateLimited ¶
type GenerationRateLimited = ApiErrorResponse
GenerationRateLimited defines model for GenerationRateLimited.
type GenerationUnavailable ¶
type GenerationUnavailable = ApiErrorResponse
GenerationUnavailable defines model for GenerationUnavailable.
type GetAccountBalanceResponse ¶
type GetAccountBalanceResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AccountBalance
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAccountBalanceResponse ¶
func ParseGetAccountBalanceResponse(rsp *http.Response) (*GetAccountBalanceResponse, error)
ParseGetAccountBalanceResponse parses an HTTP response from a GetAccountBalanceWithResponse call
func (GetAccountBalanceResponse) ContentType ¶
func (r GetAccountBalanceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAccountBalanceResponse) GetBody ¶
func (r GetAccountBalanceResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAccountBalanceResponse) GetJSON200 ¶
func (r GetAccountBalanceResponse) GetJSON200() *AccountBalance
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAccountBalanceResponse) GetJSON403 ¶
func (r GetAccountBalanceResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetAccountBalanceResponse) GetJSON409 ¶
func (r GetAccountBalanceResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAccountBalanceResponse) Status ¶
func (r GetAccountBalanceResponse) Status() string
Status returns HTTPResponse.Status
func (GetAccountBalanceResponse) StatusCode ¶
func (r GetAccountBalanceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAccountEarningsResponse ¶
type GetAccountEarningsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AccountEarnings
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAccountEarningsResponse ¶
func ParseGetAccountEarningsResponse(rsp *http.Response) (*GetAccountEarningsResponse, error)
ParseGetAccountEarningsResponse parses an HTTP response from a GetAccountEarningsWithResponse call
func (GetAccountEarningsResponse) ContentType ¶
func (r GetAccountEarningsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAccountEarningsResponse) GetBody ¶
func (r GetAccountEarningsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAccountEarningsResponse) GetJSON200 ¶
func (r GetAccountEarningsResponse) GetJSON200() *AccountEarnings
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAccountEarningsResponse) GetJSON403 ¶
func (r GetAccountEarningsResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetAccountEarningsResponse) GetJSON409 ¶
func (r GetAccountEarningsResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAccountEarningsResponse) Status ¶
func (r GetAccountEarningsResponse) Status() string
Status returns HTTPResponse.Status
func (GetAccountEarningsResponse) StatusCode ¶
func (r GetAccountEarningsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAccountResponse ¶
type GetAccountResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Account
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAccountResponse ¶
func ParseGetAccountResponse(rsp *http.Response) (*GetAccountResponse, error)
ParseGetAccountResponse parses an HTTP response from a GetAccountWithResponse call
func (GetAccountResponse) ContentType ¶
func (r GetAccountResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAccountResponse) GetBody ¶
func (r GetAccountResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAccountResponse) GetJSON200 ¶
func (r GetAccountResponse) GetJSON200() *Account
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAccountResponse) GetJSON403 ¶
func (r GetAccountResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetAccountResponse) GetJSON409 ¶
func (r GetAccountResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAccountResponse) Status ¶
func (r GetAccountResponse) Status() string
Status returns HTTPResponse.Status
func (GetAccountResponse) StatusCode ¶
func (r GetAccountResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvatarAppearanceResponse ¶
type GetAvatarAppearanceResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarSourceFile
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAvatarAppearanceResponse ¶
func ParseGetAvatarAppearanceResponse(rsp *http.Response) (*GetAvatarAppearanceResponse, error)
ParseGetAvatarAppearanceResponse parses an HTTP response from a GetAvatarAppearanceWithResponse call
func (GetAvatarAppearanceResponse) ContentType ¶
func (r GetAvatarAppearanceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAvatarAppearanceResponse) GetBody ¶
func (r GetAvatarAppearanceResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAvatarAppearanceResponse) GetJSON200 ¶
func (r GetAvatarAppearanceResponse) GetJSON200() *AvatarSourceFile
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAvatarAppearanceResponse) GetJSON409 ¶
func (r GetAvatarAppearanceResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAvatarAppearanceResponse) Status ¶
func (r GetAvatarAppearanceResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvatarAppearanceResponse) StatusCode ¶
func (r GetAvatarAppearanceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvatarConductorResponse ¶
type GetAvatarConductorResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Conductor
}
func ParseGetAvatarConductorResponse ¶
func ParseGetAvatarConductorResponse(rsp *http.Response) (*GetAvatarConductorResponse, error)
ParseGetAvatarConductorResponse parses an HTTP response from a GetAvatarConductorWithResponse call
func (GetAvatarConductorResponse) ContentType ¶
func (r GetAvatarConductorResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAvatarConductorResponse) GetBody ¶
func (r GetAvatarConductorResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAvatarConductorResponse) GetJSON200 ¶
func (r GetAvatarConductorResponse) GetJSON200() *Conductor
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAvatarConductorResponse) Status ¶
func (r GetAvatarConductorResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvatarConductorResponse) StatusCode ¶
func (r GetAvatarConductorResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvatarKnowledgeResponse ¶
type GetAvatarKnowledgeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarKnowledge
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAvatarKnowledgeResponse ¶
func ParseGetAvatarKnowledgeResponse(rsp *http.Response) (*GetAvatarKnowledgeResponse, error)
ParseGetAvatarKnowledgeResponse parses an HTTP response from a GetAvatarKnowledgeWithResponse call
func (GetAvatarKnowledgeResponse) ContentType ¶
func (r GetAvatarKnowledgeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAvatarKnowledgeResponse) GetBody ¶
func (r GetAvatarKnowledgeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAvatarKnowledgeResponse) GetJSON200 ¶
func (r GetAvatarKnowledgeResponse) GetJSON200() *AvatarKnowledge
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAvatarKnowledgeResponse) GetJSON409 ¶
func (r GetAvatarKnowledgeResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAvatarKnowledgeResponse) Status ¶
func (r GetAvatarKnowledgeResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvatarKnowledgeResponse) StatusCode ¶
func (r GetAvatarKnowledgeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvatarMonetizationResponse ¶
type GetAvatarMonetizationResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarMonetization
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAvatarMonetizationResponse ¶
func ParseGetAvatarMonetizationResponse(rsp *http.Response) (*GetAvatarMonetizationResponse, error)
ParseGetAvatarMonetizationResponse parses an HTTP response from a GetAvatarMonetizationWithResponse call
func (GetAvatarMonetizationResponse) ContentType ¶
func (r GetAvatarMonetizationResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAvatarMonetizationResponse) GetBody ¶
func (r GetAvatarMonetizationResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAvatarMonetizationResponse) GetJSON200 ¶
func (r GetAvatarMonetizationResponse) GetJSON200() *AvatarMonetization
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAvatarMonetizationResponse) GetJSON409 ¶
func (r GetAvatarMonetizationResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAvatarMonetizationResponse) Status ¶
func (r GetAvatarMonetizationResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvatarMonetizationResponse) StatusCode ¶
func (r GetAvatarMonetizationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvatarResponse ¶
type GetAvatarResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarDetail
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAvatarResponse ¶
func ParseGetAvatarResponse(rsp *http.Response) (*GetAvatarResponse, error)
ParseGetAvatarResponse parses an HTTP response from a GetAvatarWithResponse call
func (GetAvatarResponse) ContentType ¶
func (r GetAvatarResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAvatarResponse) GetBody ¶
func (r GetAvatarResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAvatarResponse) GetJSON200 ¶
func (r GetAvatarResponse) GetJSON200() *AvatarDetail
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAvatarResponse) GetJSON409 ¶
func (r GetAvatarResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAvatarResponse) Status ¶
func (r GetAvatarResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvatarResponse) StatusCode ¶
func (r GetAvatarResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvatarSessionResponse ¶
type GetAvatarSessionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarSessionStatusResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAvatarSessionResponse ¶
func ParseGetAvatarSessionResponse(rsp *http.Response) (*GetAvatarSessionResponse, error)
ParseGetAvatarSessionResponse parses an HTTP response from a GetAvatarSessionWithResponse call
func (GetAvatarSessionResponse) ContentType ¶
func (r GetAvatarSessionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAvatarSessionResponse) GetBody ¶
func (r GetAvatarSessionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAvatarSessionResponse) GetJSON200 ¶
func (r GetAvatarSessionResponse) GetJSON200() *AvatarSessionStatusResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAvatarSessionResponse) GetJSON403 ¶
func (r GetAvatarSessionResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetAvatarSessionResponse) GetJSON404 ¶
func (r GetAvatarSessionResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetAvatarSessionResponse) GetJSON409 ¶
func (r GetAvatarSessionResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAvatarSessionResponse) Status ¶
func (r GetAvatarSessionResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvatarSessionResponse) StatusCode ¶
func (r GetAvatarSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvatarSponsorResponse ¶
type GetAvatarSponsorResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarSponsor
}
func ParseGetAvatarSponsorResponse ¶
func ParseGetAvatarSponsorResponse(rsp *http.Response) (*GetAvatarSponsorResponse, error)
ParseGetAvatarSponsorResponse parses an HTTP response from a GetAvatarSponsorWithResponse call
func (GetAvatarSponsorResponse) ContentType ¶
func (r GetAvatarSponsorResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAvatarSponsorResponse) GetBody ¶
func (r GetAvatarSponsorResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAvatarSponsorResponse) GetJSON200 ¶
func (r GetAvatarSponsorResponse) GetJSON200() *AvatarSponsor
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAvatarSponsorResponse) Status ¶
func (r GetAvatarSponsorResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvatarSponsorResponse) StatusCode ¶
func (r GetAvatarSponsorResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvatarVoiceResponse ¶
type GetAvatarVoiceResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarVoice
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetAvatarVoiceResponse ¶
func ParseGetAvatarVoiceResponse(rsp *http.Response) (*GetAvatarVoiceResponse, error)
ParseGetAvatarVoiceResponse parses an HTTP response from a GetAvatarVoiceWithResponse call
func (GetAvatarVoiceResponse) ContentType ¶
func (r GetAvatarVoiceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAvatarVoiceResponse) GetBody ¶
func (r GetAvatarVoiceResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAvatarVoiceResponse) GetJSON200 ¶
func (r GetAvatarVoiceResponse) GetJSON200() *AvatarVoice
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAvatarVoiceResponse) GetJSON409 ¶
func (r GetAvatarVoiceResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAvatarVoiceResponse) Status ¶
func (r GetAvatarVoiceResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvatarVoiceResponse) StatusCode ¶
func (r GetAvatarVoiceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCurrentApiKeyResponse ¶
type GetCurrentApiKeyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *CurrentCaller
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseGetCurrentApiKeyResponse ¶
func ParseGetCurrentApiKeyResponse(rsp *http.Response) (*GetCurrentApiKeyResponse, error)
ParseGetCurrentApiKeyResponse parses an HTTP response from a GetCurrentApiKeyWithResponse call
func (GetCurrentApiKeyResponse) ContentType ¶
func (r GetCurrentApiKeyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetCurrentApiKeyResponse) GetBody ¶
func (r GetCurrentApiKeyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetCurrentApiKeyResponse) GetJSON200 ¶
func (r GetCurrentApiKeyResponse) GetJSON200() *CurrentCaller
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetCurrentApiKeyResponse) GetJSON403 ¶
func (r GetCurrentApiKeyResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetCurrentApiKeyResponse) GetJSON409 ¶
func (r GetCurrentApiKeyResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetCurrentApiKeyResponse) Status ¶
func (r GetCurrentApiKeyResponse) Status() string
Status returns HTTPResponse.Status
func (GetCurrentApiKeyResponse) StatusCode ¶
func (r GetCurrentApiKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSpeechSessionResponse ¶
type GetSpeechSessionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *SpeechSessionStatusResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
}
func ParseGetSpeechSessionResponse ¶
func ParseGetSpeechSessionResponse(rsp *http.Response) (*GetSpeechSessionResponse, error)
ParseGetSpeechSessionResponse parses an HTTP response from a GetSpeechSessionWithResponse call
func (GetSpeechSessionResponse) ContentType ¶
func (r GetSpeechSessionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetSpeechSessionResponse) GetBody ¶
func (r GetSpeechSessionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetSpeechSessionResponse) GetJSON200 ¶
func (r GetSpeechSessionResponse) GetJSON200() *SpeechSessionStatusResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetSpeechSessionResponse) GetJSON403 ¶
func (r GetSpeechSessionResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetSpeechSessionResponse) GetJSON404 ¶
func (r GetSpeechSessionResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetSpeechSessionResponse) GetJSON409 ¶
func (r GetSpeechSessionResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetSpeechSessionResponse) GetJSON503 ¶
func (r GetSpeechSessionResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (GetSpeechSessionResponse) Status ¶
func (r GetSpeechSessionResponse) Status() string
Status returns HTTPResponse.Status
func (GetSpeechSessionResponse) StatusCode ¶
func (r GetSpeechSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetUploadResponse ¶
type GetUploadResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Upload
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
}
func ParseGetUploadResponse ¶
func ParseGetUploadResponse(rsp *http.Response) (*GetUploadResponse, error)
ParseGetUploadResponse parses an HTTP response from a GetUploadWithResponse call
func (GetUploadResponse) ContentType ¶
func (r GetUploadResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetUploadResponse) GetBody ¶
func (r GetUploadResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetUploadResponse) GetJSON200 ¶
func (r GetUploadResponse) GetJSON200() *Upload
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetUploadResponse) GetJSON403 ¶
func (r GetUploadResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetUploadResponse) GetJSON404 ¶
func (r GetUploadResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetUploadResponse) GetJSON409 ¶
func (r GetUploadResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetUploadResponse) GetJSON503 ¶
func (r GetUploadResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (GetUploadResponse) Status ¶
func (r GetUploadResponse) Status() string
Status returns HTTPResponse.Status
func (GetUploadResponse) StatusCode ¶
func (r GetUploadResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GrantAvatarSponsorJSONRequestBody ¶
type GrantAvatarSponsorJSONRequestBody = SponsorGrantRequest
GrantAvatarSponsorJSONRequestBody defines body for GrantAvatarSponsor for application/json ContentType.
type GrantAvatarSponsorParams ¶
type GrantAvatarSponsorParams struct {
IdempotencyKey *string `json:"Idempotency-Key,omitempty"`
}
GrantAvatarSponsorParams defines parameters for GrantAvatarSponsor.
type GrantAvatarSponsorResponse ¶
type GrantAvatarSponsorResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *SponsorGrantResponse
// JSON402 the response for an HTTP 402 `application/json` response
JSON402 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ApiErrorResponse
}
func ParseGrantAvatarSponsorResponse ¶
func ParseGrantAvatarSponsorResponse(rsp *http.Response) (*GrantAvatarSponsorResponse, error)
ParseGrantAvatarSponsorResponse parses an HTTP response from a GrantAvatarSponsorWithResponse call
func (GrantAvatarSponsorResponse) ContentType ¶
func (r GrantAvatarSponsorResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GrantAvatarSponsorResponse) GetBody ¶
func (r GrantAvatarSponsorResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GrantAvatarSponsorResponse) GetJSON200 ¶
func (r GrantAvatarSponsorResponse) GetJSON200() *SponsorGrantResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GrantAvatarSponsorResponse) GetJSON402 ¶
func (r GrantAvatarSponsorResponse) GetJSON402() *ApiErrorResponse
GetJSON402 returns the response for an HTTP 402 `application/json` response
func (GrantAvatarSponsorResponse) GetJSON409 ¶
func (r GrantAvatarSponsorResponse) GetJSON409() *ApiErrorResponse
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GrantAvatarSponsorResponse) Status ¶
func (r GrantAvatarSponsorResponse) Status() string
Status returns HTTPResponse.Status
func (GrantAvatarSponsorResponse) StatusCode ¶
func (r GrantAvatarSponsorResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type KnowledgeAssetRef ¶
type KnowledgeAssetRef struct {
// Description Short description of the file, as `knowledge.descriptions` would carry for a zip entry.
Description *string `json:"description,omitempty"`
Url string `json:"url"`
}
KnowledgeAssetRef defines model for KnowledgeAssetRef.
type ListApiKeysResponse ¶
type ListApiKeysResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ApiKeyList
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseListApiKeysResponse ¶
func ParseListApiKeysResponse(rsp *http.Response) (*ListApiKeysResponse, error)
ParseListApiKeysResponse parses an HTTP response from a ListApiKeysWithResponse call
func (ListApiKeysResponse) ContentType ¶
func (r ListApiKeysResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListApiKeysResponse) GetBody ¶
func (r ListApiKeysResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListApiKeysResponse) GetJSON200 ¶
func (r ListApiKeysResponse) GetJSON200() *ApiKeyList
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListApiKeysResponse) GetJSON403 ¶
func (r ListApiKeysResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListApiKeysResponse) GetJSON409 ¶
func (r ListApiKeysResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (ListApiKeysResponse) Status ¶
func (r ListApiKeysResponse) Status() string
Status returns HTTPResponse.Status
func (ListApiKeysResponse) StatusCode ¶
func (r ListApiKeysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAvatarCandidatesParams ¶
type ListAvatarCandidatesParams struct {
// Versions Which takes `items` lists. `current` (the default) is the current version's takes and the serving one; `all` adds every older version's.
Versions *ListAvatarCandidatesParamsVersions `form:"versions,omitempty" json:"versions,omitempty"`
}
ListAvatarCandidatesParams defines parameters for ListAvatarCandidates.
type ListAvatarCandidatesParamsVersions ¶
type ListAvatarCandidatesParamsVersions string
ListAvatarCandidatesParamsVersions defines parameters for ListAvatarCandidates.
const ( CandidateVersionsAll ListAvatarCandidatesParamsVersions = "all" CandidateVersionsCurrent ListAvatarCandidatesParamsVersions = "current" )
Defines values for ListAvatarCandidatesParamsVersions.
func (ListAvatarCandidatesParamsVersions) Valid ¶
func (e ListAvatarCandidatesParamsVersions) Valid() bool
Valid indicates whether the value is a known member of the ListAvatarCandidatesParamsVersions enum.
type ListAvatarCandidatesResponse ¶
type ListAvatarCandidatesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *CandidateListResponse
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *ListAvatarCandidatesResponse200Headers
}
func ParseListAvatarCandidatesResponse ¶
func ParseListAvatarCandidatesResponse(rsp *http.Response) (*ListAvatarCandidatesResponse, error)
ParseListAvatarCandidatesResponse parses an HTTP response from a ListAvatarCandidatesWithResponse call
func (ListAvatarCandidatesResponse) ContentType ¶
func (r ListAvatarCandidatesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAvatarCandidatesResponse) GetBody ¶
func (r ListAvatarCandidatesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListAvatarCandidatesResponse) GetJSON200 ¶
func (r ListAvatarCandidatesResponse) GetJSON200() *CandidateListResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListAvatarCandidatesResponse) Status ¶
func (r ListAvatarCandidatesResponse) Status() string
Status returns HTTPResponse.Status
func (ListAvatarCandidatesResponse) StatusCode ¶
func (r ListAvatarCandidatesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAvatarCandidatesResponse200Headers ¶
type ListAvatarCandidatesResponse200Headers struct {
XRateLimitLimit *int
XRateLimitRemaining *int
}
ListAvatarCandidatesResponse200Headers the declared response headers of an HTTP 200 response for ListAvatarCandidates
type ListAvatarsParams ¶
type ListAvatarsParams struct {
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Before Cursor; returns avatars created before this time.
Before *time.Time `form:"before,omitempty" json:"before,omitempty"`
}
ListAvatarsParams defines parameters for ListAvatars.
type ListAvatarsResponse ¶
type ListAvatarsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarListResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseListAvatarsResponse ¶
func ParseListAvatarsResponse(rsp *http.Response) (*ListAvatarsResponse, error)
ParseListAvatarsResponse parses an HTTP response from a ListAvatarsWithResponse call
func (ListAvatarsResponse) ContentType ¶
func (r ListAvatarsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAvatarsResponse) GetBody ¶
func (r ListAvatarsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListAvatarsResponse) GetJSON200 ¶
func (r ListAvatarsResponse) GetJSON200() *AvatarListResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListAvatarsResponse) GetJSON403 ¶
func (r ListAvatarsResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListAvatarsResponse) GetJSON409 ¶
func (r ListAvatarsResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (ListAvatarsResponse) Status ¶
func (r ListAvatarsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAvatarsResponse) StatusCode ¶
func (r ListAvatarsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PaymentRequiredResponse ¶
type PaymentRequiredResponse struct {
// Error Error code identifying the type of payment issue
//
// Examples: paid_credits_required_for_monetized_avatar
Error *PaymentRequiredResponseError `json:"error,omitempty"`
// Message Human-readable error message
//
// Examples: Purchase credits or subscribe to chat with monetized avatars.
Message *string `json:"message,omitempty"`
// ResetsAt When the daily chat limit resets (set only for error=daily_chat_limit; midnight America/Los_Angeles, expressed as a UTC timestamp).
//
// Examples: 2026-05-27T07:00:00Z
ResetsAt *time.Time `json:"resetsAt,omitempty"`
}
PaymentRequiredResponse Returned with `402` when the caller lacks the credits or entitlements to start a session.
type PaymentRequiredResponseError ¶
type PaymentRequiredResponseError string
PaymentRequiredResponseError Error code identifying the type of payment issue
Examples: paid_credits_required_for_monetized_avatar
const ( ApiKeySpendCapReached PaymentRequiredResponseError = "api_key_spend_cap_reached" ConcurrentSessionLimit PaymentRequiredResponseError = "concurrent_session_limit" DailyChatLimit PaymentRequiredResponseError = "daily_chat_limit" InsufficientCredits PaymentRequiredResponseError = "insufficient_credits" PaidCreditsRequiredForMonetizedAvatar PaymentRequiredResponseError = "paid_credits_required_for_monetized_avatar" SponsorBudgetExhausted PaymentRequiredResponseError = "sponsor_budget_exhausted" VisitorDailyLimitReached PaymentRequiredResponseError = "visitor_daily_limit_reached" )
Defines values for PaymentRequiredResponseError.
func (PaymentRequiredResponseError) Valid ¶
func (e PaymentRequiredResponseError) Valid() bool
Valid indicates whether the value is a known member of the PaymentRequiredResponseError enum.
type PlanRef ¶
PlanRef The plan the account moves to at the end of the cycle; absent when none is scheduled.
type ProfileRefusal ¶
type ProfileRefusal struct {
// Cap monetization_limit_reached -- the plan's cap on monetized avatars.
Cap *int `json:"cap,omitempty"`
Error string `json:"error"`
Message string `json:"message"`
// Missing public_requirements_missing -- of title, tags, subtitle, description and thumbnail, what making the avatar public still needs, or, on an avatar already public, what the request would clear.
Missing *[]string `json:"missing,omitempty"`
// ModerationState moderation_blocked -- the avatar's moderation state.
ModerationState *string `json:"moderationState,omitempty"`
// MonetizingAvatars monetization_limit_reached -- the account's monetized avatars.
MonetizingAvatars *int `json:"monetizingAvatars,omitempty"`
// PayoutsStatus payouts_not_ready -- the payout account's status, as `payouts.status` on `GET /v1/account`.
PayoutsStatus *string `json:"payoutsStatus,omitempty"`
// SponsorPoolMicrocredits sponsor_pool_not_empty -- what the pool holds.
SponsorPoolMicrocredits *int64 `json:"sponsorPoolMicrocredits,omitempty"`
}
ProfileRefusal A refused share, statement or monetization change; some refusals add what they found.
type RateLimited ¶
type RateLimited = RateLimitedResponse
RateLimited defines model for RateLimited.
type RateLimitedResponse ¶
type RateLimitedResponse struct {
Error RateLimitedResponseError `json:"error"`
Message string `json:"message"`
// Reason `pending_cap`: 10 captures are already queued or running.
Reason RateLimitedResponseReason `json:"reason"`
}
RateLimitedResponse defines model for RateLimitedResponse.
type RateLimitedResponseError ¶
type RateLimitedResponseError string
RateLimitedResponseError defines model for RateLimitedResponse.Error.
const (
RateLimitedResponseErrorRateLimited RateLimitedResponseError = "rate_limited"
)
Defines values for RateLimitedResponseError.
func (RateLimitedResponseError) Valid ¶
func (e RateLimitedResponseError) Valid() bool
Valid indicates whether the value is a known member of the RateLimitedResponseError enum.
type RateLimitedResponseReason ¶
type RateLimitedResponseReason string
RateLimitedResponseReason `pending_cap`: 10 captures are already queued or running.
const (
PendingCap RateLimitedResponseReason = "pending_cap"
)
Defines values for RateLimitedResponseReason.
func (RateLimitedResponseReason) Valid ¶
func (e RateLimitedResponseReason) Valid() bool
Valid indicates whether the value is a known member of the RateLimitedResponseReason enum.
type RedeemAccountCodeJSONRequestBody ¶
type RedeemAccountCodeJSONRequestBody = RedeemCodeRequest
RedeemAccountCodeJSONRequestBody defines body for RedeemAccountCode for application/json ContentType.
type RedeemAccountCodeResponse ¶
type RedeemAccountCodeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *CodeRedemption
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ApiErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ApiErrorResponse
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
}
func ParseRedeemAccountCodeResponse ¶
func ParseRedeemAccountCodeResponse(rsp *http.Response) (*RedeemAccountCodeResponse, error)
ParseRedeemAccountCodeResponse parses an HTTP response from a RedeemAccountCodeWithResponse call
func (RedeemAccountCodeResponse) ContentType ¶
func (r RedeemAccountCodeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RedeemAccountCodeResponse) GetBody ¶
func (r RedeemAccountCodeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RedeemAccountCodeResponse) GetJSON200 ¶
func (r RedeemAccountCodeResponse) GetJSON200() *CodeRedemption
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RedeemAccountCodeResponse) GetJSON400 ¶
func (r RedeemAccountCodeResponse) GetJSON400() *ApiErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (RedeemAccountCodeResponse) GetJSON403 ¶
func (r RedeemAccountCodeResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (RedeemAccountCodeResponse) GetJSON404 ¶
func (r RedeemAccountCodeResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (RedeemAccountCodeResponse) GetJSON409 ¶
func (r RedeemAccountCodeResponse) GetJSON409() *ApiErrorResponse
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (RedeemAccountCodeResponse) GetJSON503 ¶
func (r RedeemAccountCodeResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (RedeemAccountCodeResponse) Status ¶
func (r RedeemAccountCodeResponse) Status() string
Status returns HTTPResponse.Status
func (RedeemAccountCodeResponse) StatusCode ¶
func (r RedeemAccountCodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RedeemCodeRequest ¶
type RedeemCodeRequest struct {
// Code The code, as given (case and surrounding spaces do not matter).
Code string `json:"code"`
}
RedeemCodeRequest defines model for RedeemCodeRequest.
type RenderResolution ¶
RenderResolution A frame size in pixels for the v2 renderer, or send `aspectRatio` to pick one by shape: width and height are each a multiple of 32 from 256 to 1024, and width x height is at most 262,144 (512 x 512); a larger frame is `400 invalid_manifest`. Default 512 x 512 (square). The aspect ratios' sizes: square 512 x 512, portrait 384 x 640, landscape 640 x 384. A deployment offers only some sizes (512 x 512 always; `GET /v1/account` `pricing.generation.clipResolutions` lists them where clips are offered): another is `400 invalid_input` ("resolution WxH is not offered; offered: ..."). On an avatar it is a build input of v2 avatars only (`400 invalid_input` for a v1 avatar): the portrait is preprocessed at that size, so a change on PATCH builds a new version with new candidates, like a new portrait; sending the current size again builds nothing. Absent or null keeps the current size (on create: the default).
type ReplaceAvatarAppearanceJSONRequestBody ¶
type ReplaceAvatarAppearanceJSONRequestBody = AvatarAppearanceJsonRequest
ReplaceAvatarAppearanceJSONRequestBody defines body for ReplaceAvatarAppearance for application/json ContentType.
type ReplaceAvatarAppearanceMultipartBody ¶
type ReplaceAvatarAppearanceMultipartBody struct {
File openapi_types.File `json:"file"`
}
ReplaceAvatarAppearanceMultipartBody defines parameters for ReplaceAvatarAppearance.
type ReplaceAvatarAppearanceMultipartRequestBody ¶
type ReplaceAvatarAppearanceMultipartRequestBody ReplaceAvatarAppearanceMultipartBody
ReplaceAvatarAppearanceMultipartRequestBody defines body for ReplaceAvatarAppearance for multipart/form-data ContentType.
type ReplaceAvatarAppearanceResponse ¶
type ReplaceAvatarAppearanceResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarPartResponse
}
func ParseReplaceAvatarAppearanceResponse ¶
func ParseReplaceAvatarAppearanceResponse(rsp *http.Response) (*ReplaceAvatarAppearanceResponse, error)
ParseReplaceAvatarAppearanceResponse parses an HTTP response from a ReplaceAvatarAppearanceWithResponse call
func (ReplaceAvatarAppearanceResponse) ContentType ¶
func (r ReplaceAvatarAppearanceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ReplaceAvatarAppearanceResponse) GetBody ¶
func (r ReplaceAvatarAppearanceResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ReplaceAvatarAppearanceResponse) GetJSON200 ¶
func (r ReplaceAvatarAppearanceResponse) GetJSON200() *AvatarPartResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ReplaceAvatarAppearanceResponse) Status ¶
func (r ReplaceAvatarAppearanceResponse) Status() string
Status returns HTTPResponse.Status
func (ReplaceAvatarAppearanceResponse) StatusCode ¶
func (r ReplaceAvatarAppearanceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReplaceAvatarKnowledgeJSONRequestBody ¶
type ReplaceAvatarKnowledgeJSONRequestBody = AvatarKnowledgeJsonRequest
ReplaceAvatarKnowledgeJSONRequestBody defines body for ReplaceAvatarKnowledge for application/json ContentType.
type ReplaceAvatarKnowledgeMultipartBody ¶
type ReplaceAvatarKnowledgeMultipartBody struct {
// Descriptions JSON object, filename -> description (<= 500 chars each).
Descriptions *string `json:"descriptions,omitempty"`
Files []openapi_types.File `json:"files"`
}
ReplaceAvatarKnowledgeMultipartBody defines parameters for ReplaceAvatarKnowledge.
type ReplaceAvatarKnowledgeMultipartRequestBody ¶
type ReplaceAvatarKnowledgeMultipartRequestBody ReplaceAvatarKnowledgeMultipartBody
ReplaceAvatarKnowledgeMultipartRequestBody defines body for ReplaceAvatarKnowledge for multipart/form-data ContentType.
type ReplaceAvatarKnowledgeResponse ¶
type ReplaceAvatarKnowledgeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarPartResponse
}
func ParseReplaceAvatarKnowledgeResponse ¶
func ParseReplaceAvatarKnowledgeResponse(rsp *http.Response) (*ReplaceAvatarKnowledgeResponse, error)
ParseReplaceAvatarKnowledgeResponse parses an HTTP response from a ReplaceAvatarKnowledgeWithResponse call
func (ReplaceAvatarKnowledgeResponse) ContentType ¶
func (r ReplaceAvatarKnowledgeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ReplaceAvatarKnowledgeResponse) GetBody ¶
func (r ReplaceAvatarKnowledgeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ReplaceAvatarKnowledgeResponse) GetJSON200 ¶
func (r ReplaceAvatarKnowledgeResponse) GetJSON200() *AvatarPartResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ReplaceAvatarKnowledgeResponse) Status ¶
func (r ReplaceAvatarKnowledgeResponse) Status() string
Status returns HTTPResponse.Status
func (ReplaceAvatarKnowledgeResponse) StatusCode ¶
func (r ReplaceAvatarKnowledgeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReplaceAvatarThumbnailJSONRequestBody ¶
type ReplaceAvatarThumbnailJSONRequestBody = AvatarThumbnailJsonRequest
ReplaceAvatarThumbnailJSONRequestBody defines body for ReplaceAvatarThumbnail for application/json ContentType.
type ReplaceAvatarThumbnailMultipartBody ¶
type ReplaceAvatarThumbnailMultipartBody struct {
File openapi_types.File `json:"file"`
}
ReplaceAvatarThumbnailMultipartBody defines parameters for ReplaceAvatarThumbnail.
type ReplaceAvatarThumbnailMultipartRequestBody ¶
type ReplaceAvatarThumbnailMultipartRequestBody ReplaceAvatarThumbnailMultipartBody
ReplaceAvatarThumbnailMultipartRequestBody defines body for ReplaceAvatarThumbnail for multipart/form-data ContentType.
type ReplaceAvatarThumbnailResponse ¶
type ReplaceAvatarThumbnailResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarDetail
}
func ParseReplaceAvatarThumbnailResponse ¶
func ParseReplaceAvatarThumbnailResponse(rsp *http.Response) (*ReplaceAvatarThumbnailResponse, error)
ParseReplaceAvatarThumbnailResponse parses an HTTP response from a ReplaceAvatarThumbnailWithResponse call
func (ReplaceAvatarThumbnailResponse) ContentType ¶
func (r ReplaceAvatarThumbnailResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ReplaceAvatarThumbnailResponse) GetBody ¶
func (r ReplaceAvatarThumbnailResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ReplaceAvatarThumbnailResponse) GetJSON200 ¶
func (r ReplaceAvatarThumbnailResponse) GetJSON200() *AvatarDetail
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ReplaceAvatarThumbnailResponse) Status ¶
func (r ReplaceAvatarThumbnailResponse) Status() string
Status returns HTTPResponse.Status
func (ReplaceAvatarThumbnailResponse) StatusCode ¶
func (r ReplaceAvatarThumbnailResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReplaceAvatarVoiceJSONRequestBody ¶
type ReplaceAvatarVoiceJSONRequestBody = AvatarVoiceJsonRequest
ReplaceAvatarVoiceJSONRequestBody defines body for ReplaceAvatarVoice for application/json ContentType.
type ReplaceAvatarVoiceMultipartBody ¶
type ReplaceAvatarVoiceMultipartBody struct {
File openapi_types.File `json:"file"`
}
ReplaceAvatarVoiceMultipartBody defines parameters for ReplaceAvatarVoice.
type ReplaceAvatarVoiceMultipartRequestBody ¶
type ReplaceAvatarVoiceMultipartRequestBody ReplaceAvatarVoiceMultipartBody
ReplaceAvatarVoiceMultipartRequestBody defines body for ReplaceAvatarVoice for multipart/form-data ContentType.
type ReplaceAvatarVoiceResponse ¶
type ReplaceAvatarVoiceResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarPartResponse
}
func ParseReplaceAvatarVoiceResponse ¶
func ParseReplaceAvatarVoiceResponse(rsp *http.Response) (*ReplaceAvatarVoiceResponse, error)
ParseReplaceAvatarVoiceResponse parses an HTTP response from a ReplaceAvatarVoiceWithResponse call
func (ReplaceAvatarVoiceResponse) ContentType ¶
func (r ReplaceAvatarVoiceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ReplaceAvatarVoiceResponse) GetBody ¶
func (r ReplaceAvatarVoiceResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ReplaceAvatarVoiceResponse) GetJSON200 ¶
func (r ReplaceAvatarVoiceResponse) GetJSON200() *AvatarPartResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ReplaceAvatarVoiceResponse) Status ¶
func (r ReplaceAvatarVoiceResponse) Status() string
Status returns HTTPResponse.Status
func (ReplaceAvatarVoiceResponse) StatusCode ¶
func (r ReplaceAvatarVoiceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RevokeApiKeyResponse ¶
type RevokeApiKeyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ApiKey
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AccountAmbiguous
}
func ParseRevokeApiKeyResponse ¶
func ParseRevokeApiKeyResponse(rsp *http.Response) (*RevokeApiKeyResponse, error)
ParseRevokeApiKeyResponse parses an HTTP response from a RevokeApiKeyWithResponse call
func (RevokeApiKeyResponse) ContentType ¶
func (r RevokeApiKeyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RevokeApiKeyResponse) GetBody ¶
func (r RevokeApiKeyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RevokeApiKeyResponse) GetJSON200 ¶
func (r RevokeApiKeyResponse) GetJSON200() *ApiKey
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RevokeApiKeyResponse) GetJSON403 ¶
func (r RevokeApiKeyResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (RevokeApiKeyResponse) GetJSON404 ¶
func (r RevokeApiKeyResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (RevokeApiKeyResponse) GetJSON409 ¶
func (r RevokeApiKeyResponse) GetJSON409() *AccountAmbiguous
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (RevokeApiKeyResponse) Status ¶
func (r RevokeApiKeyResponse) Status() string
Status returns HTTPResponse.Status
func (RevokeApiKeyResponse) StatusCode ¶
func (r RevokeApiKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RotateApiKeyResponse ¶
type RotateApiKeyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ApiKeySecret
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ApiErrorResponse
}
func ParseRotateApiKeyResponse ¶
func ParseRotateApiKeyResponse(rsp *http.Response) (*RotateApiKeyResponse, error)
ParseRotateApiKeyResponse parses an HTTP response from a RotateApiKeyWithResponse call
func (RotateApiKeyResponse) ContentType ¶
func (r RotateApiKeyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RotateApiKeyResponse) GetBody ¶
func (r RotateApiKeyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RotateApiKeyResponse) GetJSON200 ¶
func (r RotateApiKeyResponse) GetJSON200() *ApiKeySecret
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RotateApiKeyResponse) GetJSON403 ¶
func (r RotateApiKeyResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (RotateApiKeyResponse) GetJSON404 ¶
func (r RotateApiKeyResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (RotateApiKeyResponse) GetJSON409 ¶
func (r RotateApiKeyResponse) GetJSON409() *ApiErrorResponse
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (RotateApiKeyResponse) Status ¶
func (r RotateApiKeyResponse) Status() string
Status returns HTTPResponse.Status
func (RotateApiKeyResponse) StatusCode ¶
func (r RotateApiKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RuntimeSeed ¶
type RuntimeSeed = int
RuntimeSeed The v2 renderer's runtime seed: it seeds a session's noise and motion after the first chunk, so another seed gives the same avatar different movement; the serving candidate stays the same. Default 42 (the renderer default; send 42 to go back to it). Absent or null keeps the current value (on create: the default). Ignored for v1 avatars: nothing is stored and the rest of the request behaves as without it. It is no build input: nothing is captured or rebuilt, and a change applies from the next session.
type SelectAvatarCandidateJSONRequestBody ¶
type SelectAvatarCandidateJSONRequestBody = CandidateSelectRequest
SelectAvatarCandidateJSONRequestBody defines body for SelectAvatarCandidate for application/json ContentType.
type SelectAvatarCandidateResponse ¶
type SelectAvatarCandidateResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarDetail
}
func ParseSelectAvatarCandidateResponse ¶
func ParseSelectAvatarCandidateResponse(rsp *http.Response) (*SelectAvatarCandidateResponse, error)
ParseSelectAvatarCandidateResponse parses an HTTP response from a SelectAvatarCandidateWithResponse call
func (SelectAvatarCandidateResponse) ContentType ¶
func (r SelectAvatarCandidateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SelectAvatarCandidateResponse) GetBody ¶
func (r SelectAvatarCandidateResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SelectAvatarCandidateResponse) GetJSON200 ¶
func (r SelectAvatarCandidateResponse) GetJSON200() *AvatarDetail
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (SelectAvatarCandidateResponse) Status ¶
func (r SelectAvatarCandidateResponse) Status() string
Status returns HTTPResponse.Status
func (SelectAvatarCandidateResponse) StatusCode ¶
func (r SelectAvatarCandidateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SessionLinks ¶
type SessionLinks struct {
// Chat The avatar's chat page on the Atmee website (in the session's
// `language` when one was asked for). The session's own room is
// for the client that started it; this is the link for a person
// who only wants to talk to the avatar, and needs no session.
Chat string `json:"chat"`
}
SessionLinks Absent when this deployment does not know the website's address.
type SetAvatarConductorJSONRequestBody ¶
type SetAvatarConductorJSONRequestBody = ConductorRequest
SetAvatarConductorJSONRequestBody defines body for SetAvatarConductor for application/json ContentType.
type SetAvatarConductorResponse ¶
type SetAvatarConductorResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Conductor
}
func ParseSetAvatarConductorResponse ¶
func ParseSetAvatarConductorResponse(rsp *http.Response) (*SetAvatarConductorResponse, error)
ParseSetAvatarConductorResponse parses an HTTP response from a SetAvatarConductorWithResponse call
func (SetAvatarConductorResponse) ContentType ¶
func (r SetAvatarConductorResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SetAvatarConductorResponse) GetBody ¶
func (r SetAvatarConductorResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SetAvatarConductorResponse) GetJSON200 ¶
func (r SetAvatarConductorResponse) GetJSON200() *Conductor
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (SetAvatarConductorResponse) Status ¶
func (r SetAvatarConductorResponse) Status() string
Status returns HTTPResponse.Status
func (SetAvatarConductorResponse) StatusCode ¶
func (r SetAvatarConductorResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SpeechSessionCreateRequest ¶
type SpeechSessionCreateRequest struct {
// AvatarId An avatar of this account, with a voice, whose persona and voice the session uses (an avatar-scoped key's own avatar).
AvatarId openapi_types.UUID `json:"avatarId"`
// Language BCP 47 language of the conversation (e.g. `en`, `fr-FR`); passed to the speech server as given.
Language *string `json:"language,omitempty"`
// MaxDurationSeconds The session's length in seconds (default 600), counted from the reservation (this call), whenever the connection opens. Shortened when the balance or the plan allows less; the answer says what was granted (`actualDurationSeconds`).
MaxDurationSeconds *int `json:"maxDurationSeconds,omitempty"`
// Settings `session.start` fields pinned by your backend: the client cannot set them (see the operation).
Settings *SpeechSessionPinnedSettings `json:"settings,omitempty"`
}
SpeechSessionCreateRequest defines model for SpeechSessionCreateRequest.
type SpeechSessionCreateResponse ¶
type SpeechSessionCreateResponse struct {
// ActualDurationSeconds The length granted by the key's, the plan's and the balance's limits, counted from the reservation (this call), whenever the connection opens; the session ends at the reservation plus this many seconds (`endsAt` on GET).
ActualDurationSeconds int `json:"actualDurationSeconds"`
BillingMode SpeechSessionCreateResponseBillingMode `json:"billingMode"`
// DurationCapped True when `actualDurationSeconds` is shorter than `requestedDurationSeconds`.
DurationCapped bool `json:"durationCapped"`
Links *SessionLinks `json:"links,omitempty"`
// RequestedDurationSeconds The `maxDurationSeconds` you sent; omitted when you sent none.
RequestedDurationSeconds *int `json:"requestedDurationSeconds,omitempty"`
SessionId openapi_types.UUID `json:"sessionId"`
// Token Admits one connection to this session; valid for 60 seconds. Not a credential for anything else.
Token string `json:"token"`
TokenExpiresAt time.Time `json:"tokenExpiresAt"`
// Url The WebSocket URL to connect to (`wss://...`).
Url string `json:"url"`
}
SpeechSessionCreateResponse defines model for SpeechSessionCreateResponse.
type SpeechSessionCreateResponseBillingMode ¶
type SpeechSessionCreateResponseBillingMode string
SpeechSessionCreateResponseBillingMode defines model for SpeechSessionCreateResponse.BillingMode.
const ( SpeechSessionCreateResponseBillingModeMetered SpeechSessionCreateResponseBillingMode = "metered" SpeechSessionCreateResponseBillingModeReserve SpeechSessionCreateResponseBillingMode = "reserve" )
Defines values for SpeechSessionCreateResponseBillingMode.
func (SpeechSessionCreateResponseBillingMode) Valid ¶
func (e SpeechSessionCreateResponseBillingMode) Valid() bool
Valid indicates whether the value is a known member of the SpeechSessionCreateResponseBillingMode enum.
type SpeechSessionEndResponse ¶
type SpeechSessionEndResponse struct {
// AlreadyEnded True when the session was settled before this call.
AlreadyEnded bool `json:"alreadyEnded"`
EndReason *string `json:"endReason,omitempty"`
// EndRequestedAt When the end was first requested, while a connection is open; null once settled at this call or before.
EndRequestedAt *time.Time `json:"endRequestedAt,omitempty"`
EndedAt *time.Time `json:"endedAt,omitempty"`
SessionId openapi_types.UUID `json:"sessionId"`
// Status `active` when a connection is open: the end is requested (`endRequestedAt`) and settles at its next usage report.
Status SpeechSessionEndResponseStatus `json:"status"`
}
SpeechSessionEndResponse defines model for SpeechSessionEndResponse.
type SpeechSessionEndResponseStatus ¶
type SpeechSessionEndResponseStatus string
SpeechSessionEndResponseStatus `active` when a connection is open: the end is requested (`endRequestedAt`) and settles at its next usage report.
const ( SpeechSessionEndResponseStatusActive SpeechSessionEndResponseStatus = "active" SpeechSessionEndResponseStatusCompleted SpeechSessionEndResponseStatus = "completed" SpeechSessionEndResponseStatusFailed SpeechSessionEndResponseStatus = "failed" )
Defines values for SpeechSessionEndResponseStatus.
func (SpeechSessionEndResponseStatus) Valid ¶
func (e SpeechSessionEndResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the SpeechSessionEndResponseStatus enum.
type SpeechSessionIdPath ¶
type SpeechSessionIdPath = openapi_types.UUID
SpeechSessionIdPath defines model for SpeechSessionIdPath.
type SpeechSessionPathId ¶
type SpeechSessionPathId = openapi_types.UUID
SpeechSessionPathId defines model for SpeechSessionPathId.
type SpeechSessionPinnedSettings ¶
type SpeechSessionPinnedSettings struct {
// Agenda At most 4,000 characters.
Agenda *string `json:"agenda,omitempty"`
// AvatarName At most 4,000 characters; overrides the avatar's.
AvatarName *string `json:"avatar_name,omitempty"`
// AvatarTimezone An IANA time zone name (e.g. `Europe/Paris`).
AvatarTimezone *string `json:"avatar_timezone,omitempty"`
// CheckinAfterS Seconds of silence before the avatar speaks up in character, from 0 to 3600; a second check-in waits twice as long, then it stays quiet until the user speaks. `0` turns the check-in off. Unpinned, it keeps the default, about 10 seconds.
CheckinAfterS *float64 `json:"checkin_after_s,omitempty"`
Delegation *struct {
Responses *struct {
// Instructions At most 4,000 characters.
Instructions *string `json:"instructions,omitempty"`
// ToolChoice `auto`, `none`, `required` (needs tools) or `{"type": "function", "name": ...}` naming one of the tools.
ToolChoice interface{} `json:"tool_choice,omitempty"`
// Tools At most 32 named functions (unique names), 24,576 bytes of JSON in all.
Tools *[]map[string]interface{} `json:"tools,omitempty"`
} `json:"responses,omitempty"`
Type *SpeechSessionPinnedSettingsDelegationType `json:"type,omitempty"`
} `json:"delegation,omitempty"`
// Directive At most 4,000 characters.
Directive *string `json:"directive,omitempty"`
// Facts At most 4,000 characters; overrides the avatar's.
Facts *string `json:"facts,omitempty"`
// Input The starting history, at most 50 items and 32,000 characters of text in all. Each item's `role` is `user`, `assistant` or `developer`, and each part of its `content` is `{"type": "input_text", "text": ...}` (`output_text` in an `assistant` item).
Input *[]struct {
Content *[]struct {
Text *string `json:"text,omitempty"`
} `json:"content,omitempty"`
Role *string `json:"role,omitempty"`
} `json:"input,omitempty"`
// Instructions At most 8,000 characters, together with the text of the `developer` items of `input`.
Instructions *string `json:"instructions,omitempty"`
// Persona At most 4,000 characters; overrides the avatar's.
Persona *string `json:"persona,omitempty"`
// Scenario At most 4,000 characters.
Scenario *string `json:"scenario,omitempty"`
// SelfIntroduction At most 4,000 characters; overrides the avatar's.
SelfIntroduction *string `json:"self_introduction,omitempty"`
// UserName At most 4,000 characters.
UserName *string `json:"user_name,omitempty"`
// UserTimezone An IANA time zone name.
UserTimezone *string `json:"user_timezone,omitempty"`
// Welcome `false` starts the session without the avatar's welcome: no self-introduction and no welcome back, first conversation or return. It waits for the user to speak and answers as usual; a long silence still gets its check-in, which `checkin_after_s` sets or turns off. Otherwise it speaks first, unless the session starts with a history.
Welcome *bool `json:"welcome,omitempty"`
}
SpeechSessionPinnedSettings The `session.start` fields a developer may pin, with the speech server's limits for them (a violation answers `422 invalid_settings`, naming the field). A null field pins nothing. Counted in characters (Unicode code points).
type SpeechSessionPinnedSettingsDelegationType ¶
type SpeechSessionPinnedSettingsDelegationType string
SpeechSessionPinnedSettingsDelegationType defines model for SpeechSessionPinnedSettings.Delegation.Type.
const (
Responses SpeechSessionPinnedSettingsDelegationType = "responses"
)
Defines values for SpeechSessionPinnedSettingsDelegationType.
func (SpeechSessionPinnedSettingsDelegationType) Valid ¶
func (e SpeechSessionPinnedSettingsDelegationType) Valid() bool
Valid indicates whether the value is a known member of the SpeechSessionPinnedSettingsDelegationType enum.
type SpeechSessionStatusResponse ¶
type SpeechSessionStatusResponse struct {
// ActualDurationSeconds The length granted.
ActualDurationSeconds int `json:"actualDurationSeconds"`
AvatarId *openapi_types.UUID `json:"avatarId,omitempty"`
BilledSeconds *int `json:"billedSeconds,omitempty"`
BillingMode SpeechSessionStatusResponseBillingMode `json:"billingMode"`
ChargedMicrocredits *int `json:"chargedMicrocredits,omitempty"`
// ConnectedAt When billing started (the speech server's first usage report); null until then.
ConnectedAt *time.Time `json:"connectedAt,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
// EndReason Why it ended (`user_left`, `max_duration`, `balance_exhausted`, `ended_by_api`, `error`, ...; see AvatarSessionStatusResponse.endReason); null while it is live.
EndReason *string `json:"endReason,omitempty"`
// EndRequestedAt When you ended the session while a connection was open; it settles at the connection's next usage report (within 30 s).
EndRequestedAt *time.Time `json:"endRequestedAt,omitempty"`
EndedAt *time.Time `json:"endedAt,omitempty"`
// EndsAt When the session's time runs out (the reservation plus `actualDurationSeconds`).
EndsAt time.Time `json:"endsAt"`
FailureCode *string `json:"failureCode,omitempty"`
Language *string `json:"language,omitempty"`
SessionId openapi_types.UUID `json:"sessionId"`
Status SpeechSessionStatusResponseStatus `json:"status"`
}
SpeechSessionStatusResponse defines model for SpeechSessionStatusResponse.
type SpeechSessionStatusResponseBillingMode ¶
type SpeechSessionStatusResponseBillingMode string
SpeechSessionStatusResponseBillingMode defines model for SpeechSessionStatusResponse.BillingMode.
const ( SpeechSessionStatusResponseBillingModeMetered SpeechSessionStatusResponseBillingMode = "metered" SpeechSessionStatusResponseBillingModeReserve SpeechSessionStatusResponseBillingMode = "reserve" )
Defines values for SpeechSessionStatusResponseBillingMode.
func (SpeechSessionStatusResponseBillingMode) Valid ¶
func (e SpeechSessionStatusResponseBillingMode) Valid() bool
Valid indicates whether the value is a known member of the SpeechSessionStatusResponseBillingMode enum.
type SpeechSessionStatusResponseStatus ¶
type SpeechSessionStatusResponseStatus string
SpeechSessionStatusResponseStatus defines model for SpeechSessionStatusResponse.Status.
const ( SpeechSessionStatusResponseStatusActive SpeechSessionStatusResponseStatus = "active" SpeechSessionStatusResponseStatusCompleted SpeechSessionStatusResponseStatus = "completed" SpeechSessionStatusResponseStatusFailed SpeechSessionStatusResponseStatus = "failed" SpeechSessionStatusResponseStatusPending SpeechSessionStatusResponseStatus = "pending" )
Defines values for SpeechSessionStatusResponseStatus.
func (SpeechSessionStatusResponseStatus) Valid ¶
func (e SpeechSessionStatusResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the SpeechSessionStatusResponseStatus enum.
type SponsorGrantRequest ¶
type SponsorGrantRequest struct {
Microcredits int `json:"microcredits"`
}
SponsorGrantRequest defines model for SponsorGrantRequest.
type SponsorGrantResponse ¶
type SponsorGrantResponse struct {
// Error Only on `POST /v1/avatars`: the avatar was created but the manifest's funding was
// refused (e.g. `Insufficient balance`, `free_plan_credits_cannot_sponsor`). Fund it
// later via `/sponsor/grants`. Absent when the grant succeeded.
Error *string `json:"error,omitempty"`
// Replayed True when an earlier request with the same Idempotency-Key was replayed.
Replayed bool `json:"replayed"`
TransferredMicrocredits int `json:"transferredMicrocredits"`
}
SponsorGrantResponse defines model for SponsorGrantResponse.
type SponsorWithdrawRequest ¶
type SponsorWithdrawRequest struct {
// Microcredits Omit to withdraw everything that is not reserved by a running session.
Microcredits *int `json:"microcredits,omitempty"`
}
SponsorWithdrawRequest defines model for SponsorWithdrawRequest.
type SponsorWithdrawResponse ¶
type SponsorWithdrawResponse struct {
WithdrawnMicrocredits int `json:"withdrawnMicrocredits"`
}
SponsorWithdrawResponse defines model for SponsorWithdrawResponse.
type StartEmbedSessionJSONRequestBody
deprecated
type StartEmbedSessionJSONRequestBody = EmbedSessionStartRequest
StartEmbedSessionJSONRequestBody defines body for StartEmbedSession for application/json ContentType.
Deprecated: this type has been marked as deprecated upstream, but no `x-deprecated-reason` was set
type StartEmbedSessionResponse ¶
type StartEmbedSessionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *EmbedSessionStartResponse
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ApiErrorResponse
// JSON402 the response for an HTTP 402 `application/json` response
JSON402 *PaymentRequiredResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ApiErrorResponse
// JSON422 the response for an HTTP 422 `application/json` response
JSON422 *FrameworkErrorResponse
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *ApiErrorResponse
// Headers503 the parsed response headers for an HTTP 503 response
Headers503 *StartEmbedSessionResponse503Headers
}
func ParseStartEmbedSessionResponse ¶
func ParseStartEmbedSessionResponse(rsp *http.Response) (*StartEmbedSessionResponse, error)
ParseStartEmbedSessionResponse parses an HTTP response from a StartEmbedSessionWithResponse call
func (StartEmbedSessionResponse) ContentType ¶
func (r StartEmbedSessionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (StartEmbedSessionResponse) GetBody ¶
func (r StartEmbedSessionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (StartEmbedSessionResponse) GetJSON201 ¶
func (r StartEmbedSessionResponse) GetJSON201() *EmbedSessionStartResponse
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (StartEmbedSessionResponse) GetJSON400 ¶
func (r StartEmbedSessionResponse) GetJSON400() *ApiErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (StartEmbedSessionResponse) GetJSON402 ¶
func (r StartEmbedSessionResponse) GetJSON402() *PaymentRequiredResponse
GetJSON402 returns the response for an HTTP 402 `application/json` response
func (StartEmbedSessionResponse) GetJSON409 ¶
func (r StartEmbedSessionResponse) GetJSON409() *ApiErrorResponse
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (StartEmbedSessionResponse) GetJSON422 ¶
func (r StartEmbedSessionResponse) GetJSON422() *FrameworkErrorResponse
GetJSON422 returns the response for an HTTP 422 `application/json` response
func (StartEmbedSessionResponse) GetJSON503 ¶
func (r StartEmbedSessionResponse) GetJSON503() *ApiErrorResponse
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (StartEmbedSessionResponse) Status ¶
func (r StartEmbedSessionResponse) Status() string
Status returns HTTPResponse.Status
func (StartEmbedSessionResponse) StatusCode ¶
func (r StartEmbedSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type StartEmbedSessionResponse503Headers ¶
type StartEmbedSessionResponse503Headers struct {
RetryAfter *int
}
StartEmbedSessionResponse503Headers the declared response headers of an HTTP 503 response for StartEmbedSession
type TtsProvider ¶
type TtsProvider string
TtsProvider The voice engine (`voice.ttsProvider` on a v1 create). Every v2 avatar speaks with `fish_audio`.
const ( ChatterboxV3 TtsProvider = "chatterbox_v3" Elevenlabs TtsProvider = "elevenlabs" Fish TtsProvider = "fish" FishAudio TtsProvider = "fish_audio" )
Defines values for TtsProvider.
func (TtsProvider) Valid ¶
func (e TtsProvider) Valid() bool
Valid indicates whether the value is a known member of the TtsProvider enum.
type UpdateApiKeyJSONRequestBody ¶
type UpdateApiKeyJSONRequestBody = ApiKeyUpdateRequest
UpdateApiKeyJSONRequestBody defines body for UpdateApiKey for application/json ContentType.
type UpdateApiKeyResponse ¶
type UpdateApiKeyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ApiKey
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *ApiErrorResponse
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *ApiErrorResponse
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *ApiErrorResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ApiErrorResponse
}
func ParseUpdateApiKeyResponse ¶
func ParseUpdateApiKeyResponse(rsp *http.Response) (*UpdateApiKeyResponse, error)
ParseUpdateApiKeyResponse parses an HTTP response from a UpdateApiKeyWithResponse call
func (UpdateApiKeyResponse) ContentType ¶
func (r UpdateApiKeyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateApiKeyResponse) GetBody ¶
func (r UpdateApiKeyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UpdateApiKeyResponse) GetJSON200 ¶
func (r UpdateApiKeyResponse) GetJSON200() *ApiKey
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UpdateApiKeyResponse) GetJSON400 ¶
func (r UpdateApiKeyResponse) GetJSON400() *ApiErrorResponse
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (UpdateApiKeyResponse) GetJSON403 ¶
func (r UpdateApiKeyResponse) GetJSON403() *ApiErrorResponse
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (UpdateApiKeyResponse) GetJSON404 ¶
func (r UpdateApiKeyResponse) GetJSON404() *ApiErrorResponse
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (UpdateApiKeyResponse) GetJSON409 ¶
func (r UpdateApiKeyResponse) GetJSON409() *ApiErrorResponse
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (UpdateApiKeyResponse) Status ¶
func (r UpdateApiKeyResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateApiKeyResponse) StatusCode ¶
func (r UpdateApiKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateAvatarJSONRequestBody ¶
type UpdateAvatarJSONRequestBody = AvatarUpdateRequest
UpdateAvatarJSONRequestBody defines body for UpdateAvatar for application/json ContentType.
type UpdateAvatarResponse ¶
type UpdateAvatarResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarDetail
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ProfileRefusal
}
func ParseUpdateAvatarResponse ¶
func ParseUpdateAvatarResponse(rsp *http.Response) (*UpdateAvatarResponse, error)
ParseUpdateAvatarResponse parses an HTTP response from a UpdateAvatarWithResponse call
func (UpdateAvatarResponse) ContentType ¶
func (r UpdateAvatarResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateAvatarResponse) GetBody ¶
func (r UpdateAvatarResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UpdateAvatarResponse) GetJSON200 ¶
func (r UpdateAvatarResponse) GetJSON200() *AvatarDetail
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UpdateAvatarResponse) GetJSON409 ¶
func (r UpdateAvatarResponse) GetJSON409() *ProfileRefusal
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (UpdateAvatarResponse) Status ¶
func (r UpdateAvatarResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateAvatarResponse) StatusCode ¶
func (r UpdateAvatarResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateAvatarSponsorJSONRequestBody ¶
type UpdateAvatarSponsorJSONRequestBody = AvatarSponsorPatch
UpdateAvatarSponsorJSONRequestBody defines body for UpdateAvatarSponsor for application/json ContentType.
type UpdateAvatarSponsorResponse ¶
type UpdateAvatarSponsorResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AvatarSponsor
}
func ParseUpdateAvatarSponsorResponse ¶
func ParseUpdateAvatarSponsorResponse(rsp *http.Response) (*UpdateAvatarSponsorResponse, error)
ParseUpdateAvatarSponsorResponse parses an HTTP response from a UpdateAvatarSponsorWithResponse call
func (UpdateAvatarSponsorResponse) ContentType ¶
func (r UpdateAvatarSponsorResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateAvatarSponsorResponse) GetBody ¶
func (r UpdateAvatarSponsorResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UpdateAvatarSponsorResponse) GetJSON200 ¶
func (r UpdateAvatarSponsorResponse) GetJSON200() *AvatarSponsor
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UpdateAvatarSponsorResponse) Status ¶
func (r UpdateAvatarSponsorResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateAvatarSponsorResponse) StatusCode ¶
func (r UpdateAvatarSponsorResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Upload ¶
type Upload struct {
// ContentType The declared type, then the type the file was sent with.
ContentType *string `json:"contentType,omitempty"`
ExpiresAt time.Time `json:"expiresAt"`
FileName *string `json:"fileName,omitempty"`
Kind UploadKind `json:"kind"`
// Size Bytes received, once uploaded.
Size *int64 `json:"size,omitempty"`
Status UploadStatus `json:"status"`
UploadId openapi_types.UUID `json:"uploadId"`
}
Upload defines model for Upload.
type UploadCreateRequest ¶
type UploadCreateRequest struct {
// ContentType The file's type, one this kind takes; the upload then accepts only it.
ContentType *string `json:"contentType,omitempty"`
// FileName The file's name; a knowledge file is stored and described under it.
FileName *string `json:"fileName,omitempty"`
Kind UploadKind `json:"kind"`
}
UploadCreateRequest defines model for UploadCreateRequest.
type UploadCreateResponse ¶
type UploadCreateResponse struct {
AllowedTypes []string `json:"allowedTypes"`
ExpiresAt time.Time `json:"expiresAt"`
Kind UploadKind `json:"kind"`
// MaxBytes The most bytes the PUT takes. A knowledge upload declared as audio or video gets the media cap (20 MB), one declared as a document or with no type the document cap (50 MB).
MaxBytes int64 `json:"maxBytes"`
Status UploadCreateResponseStatus `json:"status"`
// UploadHeaders Headers the PUT must send. Without a declared contentType, send a Content-Type from allowedTypes.
UploadHeaders map[string]string `json:"uploadHeaders"`
UploadId openapi_types.UUID `json:"uploadId"`
UploadPageExpiresAt *time.Time `json:"uploadPageExpiresAt,omitempty"`
// UploadPageUrl A page a person opens to upload the file (or record a voice). Absent where no page is served.
UploadPageUrl *string `json:"uploadPageUrl,omitempty"`
// UploadUrl The signed target to PUT the file's bytes to, before expiresAt.
UploadUrl string `json:"uploadUrl"`
}
UploadCreateResponse defines model for UploadCreateResponse.
type UploadCreateResponseStatus ¶
type UploadCreateResponseStatus string
UploadCreateResponseStatus defines model for UploadCreateResponse.Status.
const (
UploadCreateResponseStatusPending UploadCreateResponseStatus = "pending"
)
Defines values for UploadCreateResponseStatus.
func (UploadCreateResponseStatus) Valid ¶
func (e UploadCreateResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the UploadCreateResponseStatus enum.
type UploadIdPath ¶
type UploadIdPath = openapi_types.UUID
UploadIdPath defines model for UploadIdPath.
type UploadKind ¶
type UploadKind string
UploadKind defines model for UploadKind.
const ( UploadKindKnowledge UploadKind = "knowledge" UploadKindPortrait UploadKind = "portrait" UploadKindVoice UploadKind = "voice" )
Defines values for UploadKind.
func (UploadKind) Valid ¶
func (e UploadKind) Valid() bool
Valid indicates whether the value is a known member of the UploadKind enum.
type UploadStatus ¶
type UploadStatus string
UploadStatus defines model for Upload.Status.
const ( UploadStatusConsumed UploadStatus = "consumed" UploadStatusExpired UploadStatus = "expired" UploadStatusPending UploadStatus = "pending" UploadStatusUploaded UploadStatus = "uploaded" )
Defines values for UploadStatus.
func (UploadStatus) Valid ¶
func (e UploadStatus) Valid() bool
Valid indicates whether the value is a known member of the UploadStatus enum.
type UploadableAssetRef ¶
type UploadableAssetRef struct {
// Url Public https URL the service downloads (private, loopback and link-local hosts are refused, `invalid_url`), or `upload:<uploadId>`.
Url string `json:"url"`
}
UploadableAssetRef defines model for UploadableAssetRef.
type VersionDeleteResponse ¶
type VersionDeleteResponse struct {
// DeletedCandidateIds The takes this request deleted (empty on a retry of files only).
DeletedCandidateIds []openapi_types.UUID `json:"deletedCandidateIds"`
// DeletedFiles How many files were deleted from storage by this request.
DeletedFiles int `json:"deletedFiles"`
// PendingFiles How many files could not be deleted now; repeat the DELETE to retry them. 0 when everything is gone.
PendingFiles int `json:"pendingFiles"`
VersionId string `json:"versionId"`
}
VersionDeleteResponse The takes are deleted at once. Their files (the ones only this version used) are deleted from storage in the same request; when storage fails, `pendingFiles` says how many are left and repeating the same DELETE (also once the version is gone) retries them.
type WithdrawAvatarSponsorJSONRequestBody ¶
type WithdrawAvatarSponsorJSONRequestBody = SponsorWithdrawRequest
WithdrawAvatarSponsorJSONRequestBody defines body for WithdrawAvatarSponsor for application/json ContentType.
type WithdrawAvatarSponsorResponse ¶
type WithdrawAvatarSponsorResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *SponsorWithdrawResponse
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *ApiErrorResponse
}
func ParseWithdrawAvatarSponsorResponse ¶
func ParseWithdrawAvatarSponsorResponse(rsp *http.Response) (*WithdrawAvatarSponsorResponse, error)
ParseWithdrawAvatarSponsorResponse parses an HTTP response from a WithdrawAvatarSponsorWithResponse call
func (WithdrawAvatarSponsorResponse) ContentType ¶
func (r WithdrawAvatarSponsorResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (WithdrawAvatarSponsorResponse) GetBody ¶
func (r WithdrawAvatarSponsorResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (WithdrawAvatarSponsorResponse) GetJSON200 ¶
func (r WithdrawAvatarSponsorResponse) GetJSON200() *SponsorWithdrawResponse
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (WithdrawAvatarSponsorResponse) GetJSON409 ¶
func (r WithdrawAvatarSponsorResponse) GetJSON409() *ApiErrorResponse
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (WithdrawAvatarSponsorResponse) Status ¶
func (r WithdrawAvatarSponsorResponse) Status() string
Status returns HTTPResponse.Status
func (WithdrawAvatarSponsorResponse) StatusCode ¶
func (r WithdrawAvatarSponsorResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode