Documentation
¶
Index ¶
- Constants
- Variables
- type AcceptHeaderEnum
- type Arena
- type BulkAddWorkspaceMembersRequest
- type BulkAssignKeysToGuardrailRequest
- type BulkAssignMembersToGuardrailRequest
- type BulkRemoveWorkspaceMembersRequest
- type BulkUnassignKeysFromGuardrailRequest
- type BulkUnassignMembersFromGuardrailRequest
- type ClassifierDimensions
- type ClassifierFilters
- type ClassifierFiltersFilter
- type ClassifierFiltersValue
- type ClassifierFiltersValueType
- type Content
- func CreateContentImageURL(imageURL ContentImageURL) Content
- func CreateContentInputAudio(inputAudio components.ContentPartInputAudio) Content
- func CreateContentInputFile(inputFile components.ContentPartInputFile) Content
- func CreateContentInputVideo(inputVideo components.ContentPartInputVideo) Content
- func CreateContentText(text ContentText) Content
- type ContentImageURL
- type ContentText
- type ContentType
- type ContextBucket
- type CreateAudioTranscriptionsMultipartFile
- type CreateAudioTranscriptionsMultipartRequest
- func (c *CreateAudioTranscriptionsMultipartRequest) GetFile() CreateAudioTranscriptionsMultipartFile
- func (c *CreateAudioTranscriptionsMultipartRequest) GetLanguage() *string
- func (c *CreateAudioTranscriptionsMultipartRequest) GetModel() string
- func (c *CreateAudioTranscriptionsMultipartRequest) GetResponseFormat() *ResponseFormat
- func (c *CreateAudioTranscriptionsMultipartRequest) GetTemperature() *float64
- func (c *CreateAudioTranscriptionsMultipartRequest) GetTimestampGranularities() []TimestampGranularities
- func (c CreateAudioTranscriptionsMultipartRequest) MarshalJSON() ([]byte, error)
- func (c *CreateAudioTranscriptionsMultipartRequest) UnmarshalJSON(data []byte) error
- type CreateAuthKeysCodeCodeChallengeMethod
- type CreateAuthKeysCodeData
- type CreateAuthKeysCodeRequest
- func (c *CreateAuthKeysCodeRequest) GetCallbackURL() string
- func (c *CreateAuthKeysCodeRequest) GetCodeChallenge() *string
- func (c *CreateAuthKeysCodeRequest) GetCodeChallengeMethod() *CreateAuthKeysCodeCodeChallengeMethod
- func (c *CreateAuthKeysCodeRequest) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
- func (c *CreateAuthKeysCodeRequest) GetKeyLabel() *string
- func (c *CreateAuthKeysCodeRequest) GetLimit() *float64
- func (c *CreateAuthKeysCodeRequest) GetUsageLimitType() *UsageLimitType
- func (c *CreateAuthKeysCodeRequest) GetWorkspaceID() *string
- func (c CreateAuthKeysCodeRequest) MarshalJSON() ([]byte, error)
- func (c *CreateAuthKeysCodeRequest) UnmarshalJSON(data []byte) error
- type CreateAuthKeysCodeResponse
- type CreateEmbeddingsData
- type CreateEmbeddingsRequest
- func (c *CreateEmbeddingsRequest) GetDimensions() *int64
- func (c *CreateEmbeddingsRequest) GetEncodingFormat() *EncodingFormat
- func (c *CreateEmbeddingsRequest) GetInput() InputUnion
- func (c *CreateEmbeddingsRequest) GetInputType() *string
- func (c *CreateEmbeddingsRequest) GetModel() string
- func (c *CreateEmbeddingsRequest) GetProvider() optionalnullable.OptionalNullable[components.ProviderPreferences]
- func (c *CreateEmbeddingsRequest) GetUser() *string
- func (c CreateEmbeddingsRequest) MarshalJSON() ([]byte, error)
- func (c *CreateEmbeddingsRequest) UnmarshalJSON(data []byte) error
- type CreateEmbeddingsResponse
- type CreateEmbeddingsResponseBody
- func (c *CreateEmbeddingsResponseBody) GetData() []CreateEmbeddingsData
- func (c *CreateEmbeddingsResponseBody) GetID() *string
- func (c *CreateEmbeddingsResponseBody) GetModel() string
- func (c *CreateEmbeddingsResponseBody) GetObject() Object
- func (c *CreateEmbeddingsResponseBody) GetUsage() *CreateEmbeddingsUsage
- func (c CreateEmbeddingsResponseBody) MarshalJSON() ([]byte, error)
- func (c *CreateEmbeddingsResponseBody) UnmarshalJSON(data []byte) error
- type CreateEmbeddingsResponseType
- type CreateEmbeddingsUsage
- func (c *CreateEmbeddingsUsage) GetCost() *float64
- func (c *CreateEmbeddingsUsage) GetCostDetails() optionalnullable.OptionalNullable[components.CostDetails]
- func (c *CreateEmbeddingsUsage) GetIsByok() *bool
- func (c *CreateEmbeddingsUsage) GetPromptTokens() int64
- func (c *CreateEmbeddingsUsage) GetPromptTokensDetails() *PromptTokensDetails
- func (c *CreateEmbeddingsUsage) GetTotalTokens() int64
- func (c CreateEmbeddingsUsage) MarshalJSON() ([]byte, error)
- func (c *CreateEmbeddingsUsage) UnmarshalJSON(data []byte) error
- type CreateImagesResponse
- type CreateImagesResponseType
- type CreateKeysData
- func (c *CreateKeysData) GetByokUsage() float64
- func (c *CreateKeysData) GetByokUsageDaily() float64
- func (c *CreateKeysData) GetByokUsageMonthly() float64
- func (c *CreateKeysData) GetByokUsageWeekly() float64
- func (c *CreateKeysData) GetCreatedAt() string
- func (c *CreateKeysData) GetCreatorUserID() *string
- func (c *CreateKeysData) GetDisabled() bool
- func (c *CreateKeysData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
- func (c *CreateKeysData) GetHash() string
- func (c *CreateKeysData) GetIncludeByokInLimit() bool
- func (c *CreateKeysData) GetLabel() string
- func (c *CreateKeysData) GetLimit() *float64
- func (c *CreateKeysData) GetLimitRemaining() *float64
- func (c *CreateKeysData) GetLimitReset() *string
- func (c *CreateKeysData) GetName() string
- func (c *CreateKeysData) GetUpdatedAt() *string
- func (c *CreateKeysData) GetUsage() float64
- func (c *CreateKeysData) GetUsageDaily() float64
- func (c *CreateKeysData) GetUsageMonthly() float64
- func (c *CreateKeysData) GetUsageWeekly() float64
- func (c *CreateKeysData) GetWorkspaceID() string
- func (c CreateKeysData) MarshalJSON() ([]byte, error)
- func (c *CreateKeysData) UnmarshalJSON(data []byte) error
- type CreateKeysLimitReset
- type CreateKeysRequest
- func (c *CreateKeysRequest) GetCreatorUserID() optionalnullable.OptionalNullable[string]
- func (c *CreateKeysRequest) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
- func (c *CreateKeysRequest) GetIncludeByokInLimit() *bool
- func (c *CreateKeysRequest) GetLimit() optionalnullable.OptionalNullable[float64]
- func (c *CreateKeysRequest) GetLimitReset() optionalnullable.OptionalNullable[CreateKeysLimitReset]
- func (c *CreateKeysRequest) GetName() string
- func (c *CreateKeysRequest) GetWorkspaceID() *string
- func (c CreateKeysRequest) MarshalJSON() ([]byte, error)
- func (c *CreateKeysRequest) UnmarshalJSON(data []byte) error
- type CreateKeysResponse
- type CreatePresetsChatCompletionsRequest
- type CreatePresetsMessagesRequest
- type CreatePresetsResponsesRequest
- type CreateRerankRequest
- func (c *CreateRerankRequest) GetDocuments() []Document
- func (c *CreateRerankRequest) GetModel() string
- func (c *CreateRerankRequest) GetProvider() optionalnullable.OptionalNullable[components.ProviderPreferences]
- func (c *CreateRerankRequest) GetQuery() string
- func (c *CreateRerankRequest) GetTopN() *int64
- func (c CreateRerankRequest) MarshalJSON() ([]byte, error)
- func (c *CreateRerankRequest) UnmarshalJSON(data []byte) error
- type CreateRerankResponse
- type CreateRerankResponseBody
- func (c *CreateRerankResponseBody) GetID() *string
- func (c *CreateRerankResponseBody) GetModel() string
- func (c *CreateRerankResponseBody) GetProvider() *string
- func (c *CreateRerankResponseBody) GetResults() []Result
- func (c *CreateRerankResponseBody) GetUsage() *CreateRerankUsage
- func (c CreateRerankResponseBody) MarshalJSON() ([]byte, error)
- func (c *CreateRerankResponseBody) UnmarshalJSON(data []byte) error
- type CreateRerankResponseType
- type CreateRerankUsage
- type CreateResponsesRequest
- type CreateResponsesResponse
- type CreateResponsesResponseType
- type Datacenter
- type DeleteBYOKKeyRequest
- type DeleteFileRequest
- type DeleteGuardrailRequest
- type DeleteKeysRequest
- type DeleteKeysResponse
- type DeleteObservabilityDestinationRequest
- type DeleteWorkspaceBudgetRequest
- type DeleteWorkspaceRequest
- type Dimension
- type Direction
- type DisplayFormat
- type Distillable
- type Document
- type DocumentRequest
- type DocumentResponse
- type DocumentType
- type DownloadFileContentRequest
- type Embedding
- type EmbeddingType
- type EncodingFormat
- type ExchangeAuthCodeForAPIKeyCodeChallengeMethod
- type ExchangeAuthCodeForAPIKeyRequest
- type ExchangeAuthCodeForAPIKeyResponse
- type Filter
- type GetAnalyticsMetaData
- type GetAnalyticsMetaResponse
- type GetAppRankingsCategory
- type GetAppRankingsRequest
- func (g *GetAppRankingsRequest) GetCategory() *GetAppRankingsCategory
- func (g *GetAppRankingsRequest) GetEndDate() *string
- func (g *GetAppRankingsRequest) GetLimit() *int64
- func (g *GetAppRankingsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (g *GetAppRankingsRequest) GetSort() *GetAppRankingsSort
- func (g *GetAppRankingsRequest) GetStartDate() *string
- func (g *GetAppRankingsRequest) GetSubcategory() *Subcategory
- func (g GetAppRankingsRequest) MarshalJSON() ([]byte, error)
- func (g *GetAppRankingsRequest) UnmarshalJSON(data []byte) error
- type GetAppRankingsResponse
- type GetAppRankingsSort
- type GetBYOKKeyRequest
- type GetBenchmarksRequest
- type GetCreditsData
- type GetCreditsResponse
- type GetCurrentKeyData
- func (g *GetCurrentKeyData) GetByokUsage() float64
- func (g *GetCurrentKeyData) GetByokUsageDaily() float64
- func (g *GetCurrentKeyData) GetByokUsageMonthly() float64
- func (g *GetCurrentKeyData) GetByokUsageWeekly() float64
- func (g *GetCurrentKeyData) GetCreatorUserID() *string
- func (g *GetCurrentKeyData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
- func (g *GetCurrentKeyData) GetIncludeByokInLimit() bool
- func (g *GetCurrentKeyData) GetIsFreeTier() bool
- func (g *GetCurrentKeyData) GetIsManagementKey() bool
- func (g *GetCurrentKeyData) GetIsProvisioningKey() bool
- func (g *GetCurrentKeyData) GetLabel() string
- func (g *GetCurrentKeyData) GetLimit() *float64
- func (g *GetCurrentKeyData) GetLimitRemaining() *float64
- func (g *GetCurrentKeyData) GetLimitReset() *string
- func (g *GetCurrentKeyData) GetRateLimit() RateLimit
- func (g *GetCurrentKeyData) GetUsage() float64
- func (g *GetCurrentKeyData) GetUsageDaily() float64
- func (g *GetCurrentKeyData) GetUsageMonthly() float64
- func (g *GetCurrentKeyData) GetUsageWeekly() float64
- func (g GetCurrentKeyData) MarshalJSON() ([]byte, error)
- func (g *GetCurrentKeyData) UnmarshalJSON(data []byte) error
- type GetCurrentKeyResponse
- type GetFileMetadataRequest
- type GetGenerationRequest
- type GetGuardrailRequest
- type GetKeyData
- func (g *GetKeyData) GetByokUsage() float64
- func (g *GetKeyData) GetByokUsageDaily() float64
- func (g *GetKeyData) GetByokUsageMonthly() float64
- func (g *GetKeyData) GetByokUsageWeekly() float64
- func (g *GetKeyData) GetCreatedAt() string
- func (g *GetKeyData) GetCreatorUserID() *string
- func (g *GetKeyData) GetDisabled() bool
- func (g *GetKeyData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
- func (g *GetKeyData) GetHash() string
- func (g *GetKeyData) GetIncludeByokInLimit() bool
- func (g *GetKeyData) GetLabel() string
- func (g *GetKeyData) GetLimit() *float64
- func (g *GetKeyData) GetLimitRemaining() *float64
- func (g *GetKeyData) GetLimitReset() *string
- func (g *GetKeyData) GetName() string
- func (g *GetKeyData) GetUpdatedAt() *string
- func (g *GetKeyData) GetUsage() float64
- func (g *GetKeyData) GetUsageDaily() float64
- func (g *GetKeyData) GetUsageMonthly() float64
- func (g *GetKeyData) GetUsageWeekly() float64
- func (g *GetKeyData) GetWorkspaceID() string
- func (g GetKeyData) MarshalJSON() ([]byte, error)
- func (g *GetKeyData) UnmarshalJSON(data []byte) error
- type GetKeyRequest
- type GetKeyResponse
- type GetModelRequest
- type GetModelsCategory
- type GetModelsRequest
- func (g *GetModelsRequest) GetArch() *string
- func (g *GetModelsRequest) GetCategory() *GetModelsCategory
- func (g *GetModelsRequest) GetContext() *int64
- func (g *GetModelsRequest) GetDistillable() *Distillable
- func (g *GetModelsRequest) GetInputModalities() *string
- func (g *GetModelsRequest) GetLimit() *int64
- func (g *GetModelsRequest) GetMaxAgeDays() optionalnullable.OptionalNullable[int64]
- func (g *GetModelsRequest) GetMaxAgenticIndex() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMaxCodingIndex() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMaxIntelligenceIndex() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMaxOutputPrice() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMaxPrice() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMaxToolSuccessRate() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMinAgeDays() optionalnullable.OptionalNullable[int64]
- func (g *GetModelsRequest) GetMinAgenticIndex() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMinCodingIndex() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMinIntelligenceIndex() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMinOutputPrice() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMinPrice() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetMinToolSuccessRate() optionalnullable.OptionalNullable[float64]
- func (g *GetModelsRequest) GetModelAuthors() *string
- func (g *GetModelsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (g *GetModelsRequest) GetOutputModalities() *string
- func (g *GetModelsRequest) GetProviders() *string
- func (g *GetModelsRequest) GetQ() *string
- func (g *GetModelsRequest) GetRegion() *Region
- func (g *GetModelsRequest) GetSort() *GetModelsSort
- func (g *GetModelsRequest) GetSupportedParameters() *string
- func (g *GetModelsRequest) GetZdr() *Zdr
- func (g GetModelsRequest) MarshalJSON() ([]byte, error)
- func (g *GetModelsRequest) UnmarshalJSON(data []byte) error
- type GetModelsResponse
- type GetModelsSort
- type GetObservabilityDestinationRequest
- type GetPresetRequest
- type GetPresetVersionRequest
- type GetRankingsDailyCategory
- type GetRankingsDailyRequest
- func (g *GetRankingsDailyRequest) GetCategory() *GetRankingsDailyCategory
- func (g *GetRankingsDailyRequest) GetContextBucket() *ContextBucket
- func (g *GetRankingsDailyRequest) GetEndDate() *string
- func (g *GetRankingsDailyRequest) GetLanguageType() *LanguageType
- func (g *GetRankingsDailyRequest) GetModality() *Modality
- func (g *GetRankingsDailyRequest) GetPeriod() *Period
- func (g *GetRankingsDailyRequest) GetStartDate() *string
- type GetTaskClassificationsRequest
- type GetUserActivityRequest
- type GetVideosRequest
- type GetWorkspaceRequest
- type Granularity
- type GranularityName
- type Headquarters
- type ImageURL
- type Input
- type InputUnion
- func CreateInputUnionArrayOfArrayOfNumber(arrayOfArrayOfNumber [][]float64) InputUnion
- func CreateInputUnionArrayOfInput(arrayOfInput []Input) InputUnion
- func CreateInputUnionArrayOfNumber(arrayOfNumber []float64) InputUnion
- func CreateInputUnionArrayOfStr(arrayOfStr []string) InputUnion
- func CreateInputUnionStr(str string) InputUnion
- type InputUnionType
- type LanguageType
- type ListBYOKKeysRequest
- func (l *ListBYOKKeysRequest) GetLimit() *int64
- func (l *ListBYOKKeysRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (l *ListBYOKKeysRequest) GetProvider() *Provider
- func (l *ListBYOKKeysRequest) GetWorkspaceID() *string
- func (l ListBYOKKeysRequest) MarshalJSON() ([]byte, error)
- func (l *ListBYOKKeysRequest) UnmarshalJSON(data []byte) error
- type ListBYOKKeysResponse
- type ListData
- func (l *ListData) GetByokUsage() float64
- func (l *ListData) GetByokUsageDaily() float64
- func (l *ListData) GetByokUsageMonthly() float64
- func (l *ListData) GetByokUsageWeekly() float64
- func (l *ListData) GetCreatedAt() string
- func (l *ListData) GetCreatorUserID() *string
- func (l *ListData) GetDisabled() bool
- func (l *ListData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
- func (l *ListData) GetHash() string
- func (l *ListData) GetIncludeByokInLimit() bool
- func (l *ListData) GetLabel() string
- func (l *ListData) GetLimit() *float64
- func (l *ListData) GetLimitRemaining() *float64
- func (l *ListData) GetLimitReset() *string
- func (l *ListData) GetName() string
- func (l *ListData) GetUpdatedAt() *string
- func (l *ListData) GetUsage() float64
- func (l *ListData) GetUsageDaily() float64
- func (l *ListData) GetUsageMonthly() float64
- func (l *ListData) GetUsageWeekly() float64
- func (l *ListData) GetWorkspaceID() string
- func (l ListData) MarshalJSON() ([]byte, error)
- func (l *ListData) UnmarshalJSON(data []byte) error
- type ListEmbeddingsModelsRequest
- type ListEmbeddingsModelsResponse
- type ListEndpointsRequest
- type ListEndpointsResponse
- type ListEndpointsZdrResponse
- type ListFilesRequest
- func (l *ListFilesRequest) GetAfter() *string
- func (l *ListFilesRequest) GetAfterID() *string
- func (l *ListFilesRequest) GetBeforeID() *string
- func (l *ListFilesRequest) GetCursor() *string
- func (l *ListFilesRequest) GetLimit() *int64
- func (l *ListFilesRequest) GetOrder() *Order
- func (l *ListFilesRequest) GetProvider() *components.FileProvider
- func (l *ListFilesRequest) GetWorkspaceID() *string
- type ListFilesResponse
- func (l *ListFilesResponse) GetResult() components.FileListResponse
- func (l *ListFilesResponse) GetResultAnthropic() *components.AnthropicFileList
- func (l *ListFilesResponse) GetResultOpenai() *components.OpenAIFileList
- func (l *ListFilesResponse) GetResultOpenrouter() *components.OpenRouterFileList
- type ListGenerationContentRequest
- type ListGuardrailKeyAssignmentsRequest
- func (l *ListGuardrailKeyAssignmentsRequest) GetID() string
- func (l *ListGuardrailKeyAssignmentsRequest) GetLimit() *int64
- func (l *ListGuardrailKeyAssignmentsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (l ListGuardrailKeyAssignmentsRequest) MarshalJSON() ([]byte, error)
- func (l *ListGuardrailKeyAssignmentsRequest) UnmarshalJSON(data []byte) error
- type ListGuardrailKeyAssignmentsResponse
- type ListGuardrailMemberAssignmentsRequest
- func (l *ListGuardrailMemberAssignmentsRequest) GetID() string
- func (l *ListGuardrailMemberAssignmentsRequest) GetLimit() *int64
- func (l *ListGuardrailMemberAssignmentsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (l ListGuardrailMemberAssignmentsRequest) MarshalJSON() ([]byte, error)
- func (l *ListGuardrailMemberAssignmentsRequest) UnmarshalJSON(data []byte) error
- type ListGuardrailMemberAssignmentsResponse
- type ListGuardrailsRequest
- func (l *ListGuardrailsRequest) GetLimit() *int64
- func (l *ListGuardrailsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (l *ListGuardrailsRequest) GetWorkspaceID() *string
- func (l ListGuardrailsRequest) MarshalJSON() ([]byte, error)
- func (l *ListGuardrailsRequest) UnmarshalJSON(data []byte) error
- type ListGuardrailsResponse
- type ListImageModelEndpointsRequest
- type ListKeyAssignmentsRequest
- type ListKeyAssignmentsResponse
- type ListMemberAssignmentsRequest
- type ListMemberAssignmentsResponse
- type ListModelsCountRequest
- type ListModelsUserRequest
- type ListModelsUserResponse
- type ListModelsUserSecurity
- type ListObservabilityDestinationsRequest
- func (l *ListObservabilityDestinationsRequest) GetLimit() *int64
- func (l *ListObservabilityDestinationsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (l *ListObservabilityDestinationsRequest) GetWorkspaceID() *string
- func (l ListObservabilityDestinationsRequest) MarshalJSON() ([]byte, error)
- func (l *ListObservabilityDestinationsRequest) UnmarshalJSON(data []byte) error
- type ListObservabilityDestinationsResponse
- type ListOrganizationMembersData
- type ListOrganizationMembersRequest
- type ListOrganizationMembersResponse
- type ListOrganizationMembersResponseBody
- type ListPresetVersionsRequest
- func (l *ListPresetVersionsRequest) GetLimit() *int64
- func (l *ListPresetVersionsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (l *ListPresetVersionsRequest) GetSlug() string
- func (l ListPresetVersionsRequest) MarshalJSON() ([]byte, error)
- func (l *ListPresetVersionsRequest) UnmarshalJSON(data []byte) error
- type ListPresetVersionsResponse
- type ListPresetsRequest
- type ListPresetsResponse
- type ListProvidersData
- func (l *ListProvidersData) GetDatacenters() optionalnullable.OptionalNullable[[]Datacenter]
- func (l *ListProvidersData) GetHeadquarters() optionalnullable.OptionalNullable[Headquarters]
- func (l *ListProvidersData) GetName() string
- func (l *ListProvidersData) GetPrivacyPolicyURL() *string
- func (l *ListProvidersData) GetSlug() string
- func (l *ListProvidersData) GetStatusPageURL() optionalnullable.OptionalNullable[string]
- func (l *ListProvidersData) GetTermsOfServiceURL() optionalnullable.OptionalNullable[string]
- func (l ListProvidersData) MarshalJSON() ([]byte, error)
- func (l *ListProvidersData) UnmarshalJSON(data []byte) error
- type ListProvidersResponse
- type ListRequest
- type ListResponse
- type ListVideosContentRequest
- type ListWorkspaceBudgetsRequest
- type ListWorkspaceMembersRequest
- func (l *ListWorkspaceMembersRequest) GetID() string
- func (l *ListWorkspaceMembersRequest) GetLimit() *int64
- func (l *ListWorkspaceMembersRequest) GetOffset() optionalnullable.OptionalNullable[int64]
- func (l ListWorkspaceMembersRequest) MarshalJSON() ([]byte, error)
- func (l *ListWorkspaceMembersRequest) UnmarshalJSON(data []byte) error
- type ListWorkspaceMembersResponse
- type ListWorkspacesRequest
- type ListWorkspacesResponse
- type Metadata
- type Metric
- type Modality
- type Object
- type ObjectEmbedding
- type Operator
- type OperatorName
- type Option
- func WithAcceptHeaderOverride(acceptHeaderOverride AcceptHeaderEnum) Option
- func WithOperationTimeout(timeout time.Duration) Option
- func WithRetries(config retry.Config) Option
- func WithServerURL(serverURL string) Option
- func WithSetHeaders(hdrs map[string]string) Option
- func WithTemplatedServerURL(serverURL string, params map[string]string) Option
- func WithURLOverride(urlOverride string) Option
- type Options
- type Order
- type OrderBy
- type Period
- type PromptTokensDetails
- type Provider
- type QueryAnalyticsData1
- type QueryAnalyticsData2
- func (q *QueryAnalyticsData2) GetCachedAt() *float64
- func (q *QueryAnalyticsData2) GetData() []QueryAnalyticsData1
- func (q *QueryAnalyticsData2) GetMetadata() Metadata
- func (q *QueryAnalyticsData2) GetWarnings() []string
- func (q QueryAnalyticsData2) MarshalJSON() ([]byte, error)
- func (q *QueryAnalyticsData2) UnmarshalJSON(data []byte) error
- type QueryAnalyticsRequest
- func (q *QueryAnalyticsRequest) GetClassifierDimensions() *ClassifierDimensions
- func (q *QueryAnalyticsRequest) GetClassifierFilters() *ClassifierFilters
- func (q *QueryAnalyticsRequest) GetDimensions() []string
- func (q *QueryAnalyticsRequest) GetFilters() []Filter
- func (q *QueryAnalyticsRequest) GetGranularity() *string
- func (q *QueryAnalyticsRequest) GetGroupLimit() *int64
- func (q *QueryAnalyticsRequest) GetLimit() *int64
- func (q *QueryAnalyticsRequest) GetMetrics() []string
- func (q *QueryAnalyticsRequest) GetOrderBy() *OrderBy
- func (q *QueryAnalyticsRequest) GetTimeRange() *TimeRange
- func (q QueryAnalyticsRequest) MarshalJSON() ([]byte, error)
- func (q *QueryAnalyticsRequest) UnmarshalJSON(data []byte) error
- type QueryAnalyticsResponse
- type RateLimitdeprecated
- type Region
- type ResponseFormat
- type Result
- type Role
- type SendChatCompletionRequestRequest
- type SendChatCompletionRequestResponse
- type SendChatCompletionRequestResponseType
- type Source
- type Subcategory
- type TaskType
- type TimeRange
- type TimestampGranularities
- type TypeImageURL
- type TypeText
- type UpdateBYOKKeyRequest
- type UpdateGuardrailRequest
- type UpdateKeysData
- func (u *UpdateKeysData) GetByokUsage() float64
- func (u *UpdateKeysData) GetByokUsageDaily() float64
- func (u *UpdateKeysData) GetByokUsageMonthly() float64
- func (u *UpdateKeysData) GetByokUsageWeekly() float64
- func (u *UpdateKeysData) GetCreatedAt() string
- func (u *UpdateKeysData) GetCreatorUserID() *string
- func (u *UpdateKeysData) GetDisabled() bool
- func (u *UpdateKeysData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
- func (u *UpdateKeysData) GetHash() string
- func (u *UpdateKeysData) GetIncludeByokInLimit() bool
- func (u *UpdateKeysData) GetLabel() string
- func (u *UpdateKeysData) GetLimit() *float64
- func (u *UpdateKeysData) GetLimitRemaining() *float64
- func (u *UpdateKeysData) GetLimitReset() *string
- func (u *UpdateKeysData) GetName() string
- func (u *UpdateKeysData) GetUpdatedAt() *string
- func (u *UpdateKeysData) GetUsage() float64
- func (u *UpdateKeysData) GetUsageDaily() float64
- func (u *UpdateKeysData) GetUsageMonthly() float64
- func (u *UpdateKeysData) GetUsageWeekly() float64
- func (u *UpdateKeysData) GetWorkspaceID() string
- func (u UpdateKeysData) MarshalJSON() ([]byte, error)
- func (u *UpdateKeysData) UnmarshalJSON(data []byte) error
- type UpdateKeysLimitReset
- type UpdateKeysRequest
- type UpdateKeysRequestBody
- func (u *UpdateKeysRequestBody) GetDisabled() *bool
- func (u *UpdateKeysRequestBody) GetIncludeByokInLimit() *bool
- func (u *UpdateKeysRequestBody) GetLimit() optionalnullable.OptionalNullable[float64]
- func (u *UpdateKeysRequestBody) GetLimitReset() optionalnullable.OptionalNullable[UpdateKeysLimitReset]
- func (u *UpdateKeysRequestBody) GetName() *string
- type UpdateKeysResponse
- type UpdateObservabilityDestinationRequest
- type UpdateWorkspaceRequest
- type UploadFileFile
- type UploadFileRequest
- type UploadFileRequestBody
- type UpsertWorkspaceBudgetRequest
- type UsageLimitType
- type Value1
- type Value1Type
- type Value2
- type Value2Type
- type ValueClassifierFilters
- type ValueClassifierFiltersType
- type ValueType
- type Window
- type Zdr
Constants ¶
const ( SupportedOptionRetries = "retries" SupportedOptionTimeout = "timeout" SupportedOptionAcceptHeaderOverride = "acceptHeaderOverride" SupportedOptionURLOverride = "urlOverride" )
Variables ¶
var ErrUnsupportedOption = errors.New("unsupported option")
Functions ¶
This section is empty.
Types ¶
type AcceptHeaderEnum ¶
type AcceptHeaderEnum string
const ( AcceptHeaderEnumApplicationJson AcceptHeaderEnum = "application/json" AcceptHeaderEnumTextEventStream AcceptHeaderEnum = "text/event-stream" AcceptHeaderEnumAudioWildcard AcceptHeaderEnum = "audio/*" AcceptHeaderEnumApplicationOctetStream AcceptHeaderEnum = "application/octet-stream" AcceptHeaderEnumVideoMp4 AcceptHeaderEnum = "video/mp4" )
func (AcceptHeaderEnum) ToPointer ¶
func (e AcceptHeaderEnum) ToPointer() *AcceptHeaderEnum
type Arena ¶
type Arena string
Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.
type BulkAddWorkspaceMembersRequest ¶
type BulkAddWorkspaceMembersRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
BulkAddWorkspaceMembersRequest components.BulkAddWorkspaceMembersRequest `request:"mediaType=application/json"`
}
func (*BulkAddWorkspaceMembersRequest) GetBulkAddWorkspaceMembersRequest ¶
func (b *BulkAddWorkspaceMembersRequest) GetBulkAddWorkspaceMembersRequest() components.BulkAddWorkspaceMembersRequest
func (*BulkAddWorkspaceMembersRequest) GetID ¶
func (b *BulkAddWorkspaceMembersRequest) GetID() string
type BulkAssignKeysToGuardrailRequest ¶
type BulkAssignKeysToGuardrailRequest struct {
// The unique identifier of the guardrail
ID string `pathParam:"style=simple,explode=false,name=id"`
BulkAssignKeysRequest components.BulkAssignKeysRequest `request:"mediaType=application/json"`
}
func (*BulkAssignKeysToGuardrailRequest) GetBulkAssignKeysRequest ¶
func (b *BulkAssignKeysToGuardrailRequest) GetBulkAssignKeysRequest() components.BulkAssignKeysRequest
func (*BulkAssignKeysToGuardrailRequest) GetID ¶
func (b *BulkAssignKeysToGuardrailRequest) GetID() string
type BulkAssignMembersToGuardrailRequest ¶
type BulkAssignMembersToGuardrailRequest struct {
// The unique identifier of the guardrail
ID string `pathParam:"style=simple,explode=false,name=id"`
BulkAssignMembersRequest components.BulkAssignMembersRequest `request:"mediaType=application/json"`
}
func (*BulkAssignMembersToGuardrailRequest) GetBulkAssignMembersRequest ¶
func (b *BulkAssignMembersToGuardrailRequest) GetBulkAssignMembersRequest() components.BulkAssignMembersRequest
func (*BulkAssignMembersToGuardrailRequest) GetID ¶
func (b *BulkAssignMembersToGuardrailRequest) GetID() string
type BulkRemoveWorkspaceMembersRequest ¶
type BulkRemoveWorkspaceMembersRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
BulkRemoveWorkspaceMembersRequest components.BulkRemoveWorkspaceMembersRequest `request:"mediaType=application/json"`
}
func (*BulkRemoveWorkspaceMembersRequest) GetBulkRemoveWorkspaceMembersRequest ¶
func (b *BulkRemoveWorkspaceMembersRequest) GetBulkRemoveWorkspaceMembersRequest() components.BulkRemoveWorkspaceMembersRequest
func (*BulkRemoveWorkspaceMembersRequest) GetID ¶
func (b *BulkRemoveWorkspaceMembersRequest) GetID() string
type BulkUnassignKeysFromGuardrailRequest ¶
type BulkUnassignKeysFromGuardrailRequest struct {
// The unique identifier of the guardrail
ID string `pathParam:"style=simple,explode=false,name=id"`
BulkUnassignKeysRequest components.BulkUnassignKeysRequest `request:"mediaType=application/json"`
}
func (*BulkUnassignKeysFromGuardrailRequest) GetBulkUnassignKeysRequest ¶
func (b *BulkUnassignKeysFromGuardrailRequest) GetBulkUnassignKeysRequest() components.BulkUnassignKeysRequest
func (*BulkUnassignKeysFromGuardrailRequest) GetID ¶
func (b *BulkUnassignKeysFromGuardrailRequest) GetID() string
type BulkUnassignMembersFromGuardrailRequest ¶
type BulkUnassignMembersFromGuardrailRequest struct {
// The unique identifier of the guardrail
ID string `pathParam:"style=simple,explode=false,name=id"`
BulkUnassignMembersRequest components.BulkUnassignMembersRequest `request:"mediaType=application/json"`
}
func (*BulkUnassignMembersFromGuardrailRequest) GetBulkUnassignMembersRequest ¶
func (b *BulkUnassignMembersFromGuardrailRequest) GetBulkUnassignMembersRequest() components.BulkUnassignMembersRequest
func (*BulkUnassignMembersFromGuardrailRequest) GetID ¶
func (b *BulkUnassignMembersFromGuardrailRequest) GetID() string
type ClassifierDimensions ¶ added in v0.5.14
type ClassifierDimensions struct {
// UUID of the classifier whose tags to group by.
ClassifierID string `json:"classifier_id"`
DimensionNames []string `json:"dimension_names,omitzero"`
// When true, also include generations that have no tag from this classifier. Defaults to false, which returns only classified generations.
IncludeNulls *bool `json:"include_nulls,omitzero"`
}
ClassifierDimensions - Group results by custom classifier tags, breaking down metrics by the specified dimension values. Requires an active classifier on the workspace.
func (*ClassifierDimensions) GetClassifierID ¶ added in v0.5.14
func (c *ClassifierDimensions) GetClassifierID() string
func (*ClassifierDimensions) GetDimensionNames ¶ added in v0.5.14
func (c *ClassifierDimensions) GetDimensionNames() []string
func (*ClassifierDimensions) GetIncludeNulls ¶ added in v0.5.14
func (c *ClassifierDimensions) GetIncludeNulls() *bool
func (ClassifierDimensions) MarshalJSON ¶ added in v0.5.14
func (c ClassifierDimensions) MarshalJSON() ([]byte, error)
func (*ClassifierDimensions) UnmarshalJSON ¶ added in v0.5.14
func (c *ClassifierDimensions) UnmarshalJSON(data []byte) error
type ClassifierFilters ¶ added in v0.5.14
type ClassifierFilters struct {
// UUID of the classifier whose tags to filter by. Must match classifier_dimensions.classifier_id when both are specified.
ClassifierID string `json:"classifier_id"`
Filters []ClassifierFiltersFilter `json:"filters"`
}
ClassifierFilters - Filter results to generations with specific classifier tag values. Can be combined with classifier_dimensions (must use the same classifier_id) or used independently with standard dimensions.
func (*ClassifierFilters) GetClassifierID ¶ added in v0.5.14
func (c *ClassifierFilters) GetClassifierID() string
func (*ClassifierFilters) GetFilters ¶ added in v0.5.14
func (c *ClassifierFilters) GetFilters() []ClassifierFiltersFilter
type ClassifierFiltersFilter ¶ added in v0.5.14
type ClassifierFiltersFilter struct {
// Classifier dimension name to filter on (snake_case identifier, e.g. "department", "work_type").
Field string `json:"field"`
// Filter operator. Only equality/set operators are supported (eq, neq, in, not_in) — ordered comparisons are not available because classification values are strings.
Operator string `json:"operator"`
// Filter value. Use a scalar (string or number) for eq/neq, or an array for in/not_in.
Value ClassifierFiltersValue `json:"value"`
}
func (*ClassifierFiltersFilter) GetField ¶ added in v0.5.14
func (c *ClassifierFiltersFilter) GetField() string
func (*ClassifierFiltersFilter) GetOperator ¶ added in v0.5.14
func (c *ClassifierFiltersFilter) GetOperator() string
func (*ClassifierFiltersFilter) GetValue ¶ added in v0.5.14
func (c *ClassifierFiltersFilter) GetValue() ClassifierFiltersValue
type ClassifierFiltersValue ¶ added in v0.5.14
type ClassifierFiltersValue struct {
Str *string `queryParam:"inline" union:"member"`
Number *float64 `queryParam:"inline" union:"member"`
ArrayOfValueClassifierFilters []ValueClassifierFilters `queryParam:"inline" union:"member"`
Type ClassifierFiltersValueType
}
ClassifierFiltersValue - Filter value. Use a scalar (string or number) for eq/neq, or an array for in/not_in.
func CreateClassifierFiltersValueArrayOfValueClassifierFilters ¶ added in v0.5.14
func CreateClassifierFiltersValueArrayOfValueClassifierFilters(arrayOfValueClassifierFilters []ValueClassifierFilters) ClassifierFiltersValue
func CreateClassifierFiltersValueNumber ¶ added in v0.5.14
func CreateClassifierFiltersValueNumber(number float64) ClassifierFiltersValue
func CreateClassifierFiltersValueStr ¶ added in v0.5.14
func CreateClassifierFiltersValueStr(str string) ClassifierFiltersValue
func (ClassifierFiltersValue) MarshalJSON ¶ added in v0.5.14
func (u ClassifierFiltersValue) MarshalJSON() ([]byte, error)
func (*ClassifierFiltersValue) UnmarshalJSON ¶ added in v0.5.14
func (u *ClassifierFiltersValue) UnmarshalJSON(data []byte) error
type ClassifierFiltersValueType ¶ added in v0.5.14
type ClassifierFiltersValueType string
const ( ClassifierFiltersValueTypeStr ClassifierFiltersValueType = "str" ClassifierFiltersValueTypeNumber ClassifierFiltersValueType = "number" ClassifierFiltersValueTypeArrayOfValueClassifierFilters ClassifierFiltersValueType = "arrayOfValueClassifierFilters" )
type Content ¶
type Content struct {
ContentText *ContentText `queryParam:"inline" union:"member"`
ContentImageURL *ContentImageURL `queryParam:"inline" union:"member"`
ContentPartInputAudio *components.ContentPartInputAudio `queryParam:"inline" union:"member"`
ContentPartInputVideo *components.ContentPartInputVideo `queryParam:"inline" union:"member"`
ContentPartInputFile *components.ContentPartInputFile `queryParam:"inline" union:"member"`
Type ContentType
}
func CreateContentImageURL ¶
func CreateContentImageURL(imageURL ContentImageURL) Content
func CreateContentInputAudio ¶
func CreateContentInputAudio(inputAudio components.ContentPartInputAudio) Content
func CreateContentInputFile ¶
func CreateContentInputFile(inputFile components.ContentPartInputFile) Content
func CreateContentInputVideo ¶
func CreateContentInputVideo(inputVideo components.ContentPartInputVideo) Content
func CreateContentText ¶
func CreateContentText(text ContentText) Content
func (Content) MarshalJSON ¶
func (*Content) UnmarshalJSON ¶
type ContentImageURL ¶
type ContentImageURL struct {
ImageURL ImageURL `json:"image_url"`
Type TypeImageURL `json:"type"`
}
func (*ContentImageURL) GetImageURL ¶
func (c *ContentImageURL) GetImageURL() ImageURL
func (*ContentImageURL) GetType ¶
func (c *ContentImageURL) GetType() TypeImageURL
func (ContentImageURL) MarshalJSON ¶
func (c ContentImageURL) MarshalJSON() ([]byte, error)
func (*ContentImageURL) UnmarshalJSON ¶
func (c *ContentImageURL) UnmarshalJSON(data []byte) error
type ContentText ¶
func (*ContentText) GetText ¶
func (c *ContentText) GetText() string
func (*ContentText) GetType ¶
func (c *ContentText) GetType() TypeText
func (ContentText) MarshalJSON ¶
func (c ContentText) MarshalJSON() ([]byte, error)
func (*ContentText) UnmarshalJSON ¶
func (c *ContentText) UnmarshalJSON(data []byte) error
type ContentType ¶
type ContentType string
const ( ContentTypeText ContentType = "text" ContentTypeImageURL ContentType = "image_url" ContentTypeInputAudio ContentType = "input_audio" ContentTypeInputVideo ContentType = "input_video" ContentTypeInputFile ContentType = "input_file" )
type ContextBucket ¶ added in v0.5.13
type ContextBucket string
ContextBucket - Restrict to requests whose context length falls in this bucket (`1K`, `10K`, `100K`, `1M`, or `10M`). Exact dataset — cannot be combined with `category` or `language_type`.
const ( ContextBucketOneK ContextBucket = "1K" ContextBucketTenK ContextBucket = "10K" ContextBucketOneHundredK ContextBucket = "100K" ContextBucketOneM ContextBucket = "1M" ContextBucketTenM ContextBucket = "10M" )
func (*ContextBucket) IsExact ¶ added in v0.5.13
func (e *ContextBucket) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (ContextBucket) ToPointer ¶ added in v0.5.13
func (e ContextBucket) ToPointer() *ContextBucket
type CreateAudioTranscriptionsMultipartFile ¶ added in v0.5.13
type CreateAudioTranscriptionsMultipartFile struct {
FileName string `multipartForm:"name=fileName"`
// This field accepts []byte data or io.Reader implementations, such as *os.File.
Content any `multipartForm:"content"`
}
func (*CreateAudioTranscriptionsMultipartFile) GetContent ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartFile) GetContent() any
func (*CreateAudioTranscriptionsMultipartFile) GetFileName ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartFile) GetFileName() string
type CreateAudioTranscriptionsMultipartRequest ¶ added in v0.5.13
type CreateAudioTranscriptionsMultipartRequest struct {
// The audio file to transcribe. The format is derived from the filename extension or the file part content type. Max 25 MB; send larger files as base64 JSON via input_audio.
File CreateAudioTranscriptionsMultipartFile `multipartForm:"file,name=file"`
// The language of the input audio (ISO-639-1).
Language *string `multipartForm:"name=language"`
// The model to use for transcription.
Model string `multipartForm:"name=model"`
// The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).
ResponseFormat *ResponseFormat `multipartForm:"name=response_format"`
// The sampling temperature.
Temperature *float64 `multipartForm:"name=temperature"`
// Timestamp detail levels to include when response_format is "verbose_json". "word" additionally returns word-level timestamps in the words array.
TimestampGranularities []TimestampGranularities `multipartForm:"name=timestamp_granularities[]"`
}
func (*CreateAudioTranscriptionsMultipartRequest) GetFile ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartRequest) GetFile() CreateAudioTranscriptionsMultipartFile
func (*CreateAudioTranscriptionsMultipartRequest) GetLanguage ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartRequest) GetLanguage() *string
func (*CreateAudioTranscriptionsMultipartRequest) GetModel ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartRequest) GetModel() string
func (*CreateAudioTranscriptionsMultipartRequest) GetResponseFormat ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartRequest) GetResponseFormat() *ResponseFormat
func (*CreateAudioTranscriptionsMultipartRequest) GetTemperature ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartRequest) GetTemperature() *float64
func (*CreateAudioTranscriptionsMultipartRequest) GetTimestampGranularities ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartRequest) GetTimestampGranularities() []TimestampGranularities
func (CreateAudioTranscriptionsMultipartRequest) MarshalJSON ¶ added in v0.5.13
func (c CreateAudioTranscriptionsMultipartRequest) MarshalJSON() ([]byte, error)
func (*CreateAudioTranscriptionsMultipartRequest) UnmarshalJSON ¶ added in v0.5.13
func (c *CreateAudioTranscriptionsMultipartRequest) UnmarshalJSON(data []byte) error
type CreateAuthKeysCodeCodeChallengeMethod ¶
type CreateAuthKeysCodeCodeChallengeMethod string
CreateAuthKeysCodeCodeChallengeMethod - The method used to generate the code challenge
const ( CreateAuthKeysCodeCodeChallengeMethodS256 CreateAuthKeysCodeCodeChallengeMethod = "S256" CreateAuthKeysCodeCodeChallengeMethodPlain CreateAuthKeysCodeCodeChallengeMethod = "plain" )
func (*CreateAuthKeysCodeCodeChallengeMethod) IsExact ¶
func (e *CreateAuthKeysCodeCodeChallengeMethod) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (CreateAuthKeysCodeCodeChallengeMethod) ToPointer ¶
func (e CreateAuthKeysCodeCodeChallengeMethod) ToPointer() *CreateAuthKeysCodeCodeChallengeMethod
type CreateAuthKeysCodeData ¶
type CreateAuthKeysCodeData struct {
// The application ID associated with this auth code
AppID int64 `json:"app_id"`
// ISO 8601 timestamp of when the auth code was created
CreatedAt string `json:"created_at"`
// The authorization code ID to use in the exchange request
ID string `json:"id"`
}
CreateAuthKeysCodeData - Auth code data
func (*CreateAuthKeysCodeData) GetAppID ¶
func (c *CreateAuthKeysCodeData) GetAppID() int64
func (*CreateAuthKeysCodeData) GetCreatedAt ¶
func (c *CreateAuthKeysCodeData) GetCreatedAt() string
func (*CreateAuthKeysCodeData) GetID ¶
func (c *CreateAuthKeysCodeData) GetID() string
type CreateAuthKeysCodeRequest ¶
type CreateAuthKeysCodeRequest struct {
// The callback URL to redirect to after authorization. Supports https URLs and localhost/127.0.0.1 URLs on any port for local CLI tools.
CallbackURL string `json:"callback_url"`
// PKCE code challenge for enhanced security
CodeChallenge *string `json:"code_challenge,omitzero"`
// The method used to generate the code challenge
CodeChallengeMethod *CreateAuthKeysCodeCodeChallengeMethod `json:"code_challenge_method,omitzero"`
// Optional expiration time for the API key to be created
ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
// Optional custom label for the API key. Defaults to the app name if not provided.
KeyLabel *string `json:"key_label,omitzero"`
// Credit limit for the API key to be created
Limit *float64 `json:"limit,omitzero"`
// Optional credit limit reset interval. When set, the credit limit resets on this interval.
UsageLimitType *UsageLimitType `json:"usage_limit_type,omitzero"`
// Optional workspace ID to associate the API key with
WorkspaceID *string `json:"workspace_id,omitzero"`
}
func (*CreateAuthKeysCodeRequest) GetCallbackURL ¶
func (c *CreateAuthKeysCodeRequest) GetCallbackURL() string
func (*CreateAuthKeysCodeRequest) GetCodeChallenge ¶
func (c *CreateAuthKeysCodeRequest) GetCodeChallenge() *string
func (*CreateAuthKeysCodeRequest) GetCodeChallengeMethod ¶
func (c *CreateAuthKeysCodeRequest) GetCodeChallengeMethod() *CreateAuthKeysCodeCodeChallengeMethod
func (*CreateAuthKeysCodeRequest) GetExpiresAt ¶
func (c *CreateAuthKeysCodeRequest) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
func (*CreateAuthKeysCodeRequest) GetKeyLabel ¶
func (c *CreateAuthKeysCodeRequest) GetKeyLabel() *string
func (*CreateAuthKeysCodeRequest) GetLimit ¶
func (c *CreateAuthKeysCodeRequest) GetLimit() *float64
func (*CreateAuthKeysCodeRequest) GetUsageLimitType ¶
func (c *CreateAuthKeysCodeRequest) GetUsageLimitType() *UsageLimitType
func (*CreateAuthKeysCodeRequest) GetWorkspaceID ¶
func (c *CreateAuthKeysCodeRequest) GetWorkspaceID() *string
func (CreateAuthKeysCodeRequest) MarshalJSON ¶
func (c CreateAuthKeysCodeRequest) MarshalJSON() ([]byte, error)
func (*CreateAuthKeysCodeRequest) UnmarshalJSON ¶
func (c *CreateAuthKeysCodeRequest) UnmarshalJSON(data []byte) error
type CreateAuthKeysCodeResponse ¶
type CreateAuthKeysCodeResponse struct {
// Auth code data
Data CreateAuthKeysCodeData `json:"data"`
}
CreateAuthKeysCodeResponse - Successfully created authorization code
func (*CreateAuthKeysCodeResponse) GetData ¶
func (c *CreateAuthKeysCodeResponse) GetData() CreateAuthKeysCodeData
type CreateEmbeddingsData ¶
type CreateEmbeddingsData struct {
// Embedding vector as an array of floats or a base64 string
Embedding Embedding `json:"embedding"`
// Index of the embedding in the input list
Index *int64 `json:"index,omitzero"`
Object ObjectEmbedding `json:"object"`
}
CreateEmbeddingsData - A single embedding object
func (*CreateEmbeddingsData) GetEmbedding ¶
func (c *CreateEmbeddingsData) GetEmbedding() Embedding
func (*CreateEmbeddingsData) GetIndex ¶
func (c *CreateEmbeddingsData) GetIndex() *int64
func (*CreateEmbeddingsData) GetObject ¶
func (c *CreateEmbeddingsData) GetObject() ObjectEmbedding
type CreateEmbeddingsRequest ¶
type CreateEmbeddingsRequest struct {
// The number of dimensions for the output embeddings
Dimensions *int64 `json:"dimensions,omitzero"`
// The format of the output embeddings
EncodingFormat *EncodingFormat `json:"encoding_format,omitzero"`
// Text, token, or multimodal input(s) to embed
Input InputUnion `json:"input"`
// The type of input (e.g. search_query, search_document)
InputType *string `json:"input_type,omitzero"`
// The model to use for embeddings
Model string `json:"model"`
Provider optionalnullable.OptionalNullable[components.ProviderPreferences] `json:"provider,omitzero"`
// A unique identifier for the end-user
User *string `json:"user,omitzero"`
}
CreateEmbeddingsRequest - Embeddings request input
func (*CreateEmbeddingsRequest) GetDimensions ¶
func (c *CreateEmbeddingsRequest) GetDimensions() *int64
func (*CreateEmbeddingsRequest) GetEncodingFormat ¶
func (c *CreateEmbeddingsRequest) GetEncodingFormat() *EncodingFormat
func (*CreateEmbeddingsRequest) GetInput ¶
func (c *CreateEmbeddingsRequest) GetInput() InputUnion
func (*CreateEmbeddingsRequest) GetInputType ¶
func (c *CreateEmbeddingsRequest) GetInputType() *string
func (*CreateEmbeddingsRequest) GetModel ¶
func (c *CreateEmbeddingsRequest) GetModel() string
func (*CreateEmbeddingsRequest) GetProvider ¶
func (c *CreateEmbeddingsRequest) GetProvider() optionalnullable.OptionalNullable[components.ProviderPreferences]
func (*CreateEmbeddingsRequest) GetUser ¶
func (c *CreateEmbeddingsRequest) GetUser() *string
func (CreateEmbeddingsRequest) MarshalJSON ¶
func (c CreateEmbeddingsRequest) MarshalJSON() ([]byte, error)
func (*CreateEmbeddingsRequest) UnmarshalJSON ¶
func (c *CreateEmbeddingsRequest) UnmarshalJSON(data []byte) error
type CreateEmbeddingsResponse ¶
type CreateEmbeddingsResponse struct {
CreateEmbeddingsResponseBody *CreateEmbeddingsResponseBody `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreateEmbeddingsResponseType
}
func CreateCreateEmbeddingsResponseCreateEmbeddingsResponseBody ¶
func CreateCreateEmbeddingsResponseCreateEmbeddingsResponseBody(createEmbeddingsResponseBody CreateEmbeddingsResponseBody) CreateEmbeddingsResponse
func CreateCreateEmbeddingsResponseStr ¶
func CreateCreateEmbeddingsResponseStr(str string) CreateEmbeddingsResponse
func (CreateEmbeddingsResponse) MarshalJSON ¶
func (u CreateEmbeddingsResponse) MarshalJSON() ([]byte, error)
func (*CreateEmbeddingsResponse) UnmarshalJSON ¶
func (u *CreateEmbeddingsResponse) UnmarshalJSON(data []byte) error
type CreateEmbeddingsResponseBody ¶
type CreateEmbeddingsResponseBody struct {
// List of embedding objects
Data []CreateEmbeddingsData `json:"data"`
// Unique identifier for the embeddings response
ID *string `json:"id,omitzero"`
// The model used for embeddings
Model string `json:"model"`
Object Object `json:"object"`
// Token usage statistics
Usage *CreateEmbeddingsUsage `json:"usage,omitzero"`
}
CreateEmbeddingsResponseBody - Embeddings response containing embedding vectors
func (*CreateEmbeddingsResponseBody) GetData ¶
func (c *CreateEmbeddingsResponseBody) GetData() []CreateEmbeddingsData
func (*CreateEmbeddingsResponseBody) GetID ¶
func (c *CreateEmbeddingsResponseBody) GetID() *string
func (*CreateEmbeddingsResponseBody) GetModel ¶
func (c *CreateEmbeddingsResponseBody) GetModel() string
func (*CreateEmbeddingsResponseBody) GetObject ¶
func (c *CreateEmbeddingsResponseBody) GetObject() Object
func (*CreateEmbeddingsResponseBody) GetUsage ¶
func (c *CreateEmbeddingsResponseBody) GetUsage() *CreateEmbeddingsUsage
func (CreateEmbeddingsResponseBody) MarshalJSON ¶
func (c CreateEmbeddingsResponseBody) MarshalJSON() ([]byte, error)
func (*CreateEmbeddingsResponseBody) UnmarshalJSON ¶
func (c *CreateEmbeddingsResponseBody) UnmarshalJSON(data []byte) error
type CreateEmbeddingsResponseType ¶
type CreateEmbeddingsResponseType string
const ( CreateEmbeddingsResponseTypeCreateEmbeddingsResponseBody CreateEmbeddingsResponseType = "createEmbeddings_ResponseBody" CreateEmbeddingsResponseTypeStr CreateEmbeddingsResponseType = "str" )
type CreateEmbeddingsUsage ¶
type CreateEmbeddingsUsage struct {
// Cost of the request in credits
Cost *float64 `json:"cost,omitzero"`
// Breakdown of upstream inference costs
CostDetails optionalnullable.OptionalNullable[components.CostDetails] `json:"cost_details,omitzero"`
// Whether a request was made using a Bring Your Own Key configuration
IsByok *bool `json:"is_byok,omitzero"`
// Number of tokens in the input
PromptTokens int64 `json:"prompt_tokens"`
// Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.
PromptTokensDetails *PromptTokensDetails `json:"prompt_tokens_details,omitzero"`
// Total number of tokens used
TotalTokens int64 `json:"total_tokens"`
}
CreateEmbeddingsUsage - Token usage statistics
func (*CreateEmbeddingsUsage) GetCost ¶
func (c *CreateEmbeddingsUsage) GetCost() *float64
func (*CreateEmbeddingsUsage) GetCostDetails ¶
func (c *CreateEmbeddingsUsage) GetCostDetails() optionalnullable.OptionalNullable[components.CostDetails]
func (*CreateEmbeddingsUsage) GetIsByok ¶
func (c *CreateEmbeddingsUsage) GetIsByok() *bool
func (*CreateEmbeddingsUsage) GetPromptTokens ¶
func (c *CreateEmbeddingsUsage) GetPromptTokens() int64
func (*CreateEmbeddingsUsage) GetPromptTokensDetails ¶
func (c *CreateEmbeddingsUsage) GetPromptTokensDetails() *PromptTokensDetails
func (*CreateEmbeddingsUsage) GetTotalTokens ¶
func (c *CreateEmbeddingsUsage) GetTotalTokens() int64
func (CreateEmbeddingsUsage) MarshalJSON ¶
func (c CreateEmbeddingsUsage) MarshalJSON() ([]byte, error)
func (*CreateEmbeddingsUsage) UnmarshalJSON ¶
func (c *CreateEmbeddingsUsage) UnmarshalJSON(data []byte) error
type CreateImagesResponse ¶
type CreateImagesResponse struct {
ImageGenerationResponse *components.ImageGenerationResponse `queryParam:"inline" union:"member"`
EventStream *stream.EventStream[components.ImageStreamingResponse] `queryParam:"inline" union:"member"`
Type CreateImagesResponseType
}
func CreateCreateImagesResponseEventStream ¶
func CreateCreateImagesResponseEventStream(eventStream *stream.EventStream[components.ImageStreamingResponse]) CreateImagesResponse
func CreateCreateImagesResponseImageGenerationResponse ¶
func CreateCreateImagesResponseImageGenerationResponse(imageGenerationResponse components.ImageGenerationResponse) CreateImagesResponse
func (CreateImagesResponse) MarshalJSON ¶
func (u CreateImagesResponse) MarshalJSON() ([]byte, error)
func (*CreateImagesResponse) UnmarshalJSON ¶
func (u *CreateImagesResponse) UnmarshalJSON(data []byte) error
type CreateImagesResponseType ¶
type CreateImagesResponseType string
const ( CreateImagesResponseTypeImageGenerationResponse CreateImagesResponseType = "ImageGenerationResponse" CreateImagesResponseTypeEventStream CreateImagesResponseType = "event-stream" )
type CreateKeysData ¶
type CreateKeysData struct {
// Total external BYOK usage (in USD) for the API key
ByokUsage float64 `json:"byok_usage"`
// External BYOK usage (in USD) for the current UTC day
ByokUsageDaily float64 `json:"byok_usage_daily"`
// External BYOK usage (in USD) for current UTC month
ByokUsageMonthly float64 `json:"byok_usage_monthly"`
// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
ByokUsageWeekly float64 `json:"byok_usage_weekly"`
// ISO 8601 timestamp of when the API key was created
CreatedAt string `json:"created_at"`
// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
CreatorUserID *string `json:"creator_user_id"`
// Whether the API key is disabled
Disabled bool `json:"disabled"`
// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
// Unique hash identifier for the API key
Hash string `json:"hash"`
// Whether to include external BYOK usage in the credit limit
IncludeByokInLimit bool `json:"include_byok_in_limit"`
// Human-readable label for the API key
Label string `json:"label"`
// Spending limit for the API key in USD
Limit *float64 `json:"limit"`
// Remaining spending limit in USD
LimitRemaining *float64 `json:"limit_remaining"`
// Type of limit reset for the API key
LimitReset *string `json:"limit_reset"`
// Name of the API key
Name string `json:"name"`
// ISO 8601 timestamp of when the API key was last updated
UpdatedAt *string `json:"updated_at"`
// Total OpenRouter credit usage (in USD) for the API key
Usage float64 `json:"usage"`
// OpenRouter credit usage (in USD) for the current UTC day
UsageDaily float64 `json:"usage_daily"`
// OpenRouter credit usage (in USD) for the current UTC month
UsageMonthly float64 `json:"usage_monthly"`
// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
UsageWeekly float64 `json:"usage_weekly"`
// The workspace ID this API key belongs to.
WorkspaceID string `json:"workspace_id"`
}
CreateKeysData - The created API key information
func (*CreateKeysData) GetByokUsage ¶
func (c *CreateKeysData) GetByokUsage() float64
func (*CreateKeysData) GetByokUsageDaily ¶
func (c *CreateKeysData) GetByokUsageDaily() float64
func (*CreateKeysData) GetByokUsageMonthly ¶
func (c *CreateKeysData) GetByokUsageMonthly() float64
func (*CreateKeysData) GetByokUsageWeekly ¶
func (c *CreateKeysData) GetByokUsageWeekly() float64
func (*CreateKeysData) GetCreatedAt ¶
func (c *CreateKeysData) GetCreatedAt() string
func (*CreateKeysData) GetCreatorUserID ¶
func (c *CreateKeysData) GetCreatorUserID() *string
func (*CreateKeysData) GetDisabled ¶
func (c *CreateKeysData) GetDisabled() bool
func (*CreateKeysData) GetExpiresAt ¶
func (c *CreateKeysData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
func (*CreateKeysData) GetHash ¶
func (c *CreateKeysData) GetHash() string
func (*CreateKeysData) GetIncludeByokInLimit ¶
func (c *CreateKeysData) GetIncludeByokInLimit() bool
func (*CreateKeysData) GetLabel ¶
func (c *CreateKeysData) GetLabel() string
func (*CreateKeysData) GetLimit ¶
func (c *CreateKeysData) GetLimit() *float64
func (*CreateKeysData) GetLimitRemaining ¶
func (c *CreateKeysData) GetLimitRemaining() *float64
func (*CreateKeysData) GetLimitReset ¶
func (c *CreateKeysData) GetLimitReset() *string
func (*CreateKeysData) GetName ¶
func (c *CreateKeysData) GetName() string
func (*CreateKeysData) GetUpdatedAt ¶
func (c *CreateKeysData) GetUpdatedAt() *string
func (*CreateKeysData) GetUsage ¶
func (c *CreateKeysData) GetUsage() float64
func (*CreateKeysData) GetUsageDaily ¶
func (c *CreateKeysData) GetUsageDaily() float64
func (*CreateKeysData) GetUsageMonthly ¶
func (c *CreateKeysData) GetUsageMonthly() float64
func (*CreateKeysData) GetUsageWeekly ¶
func (c *CreateKeysData) GetUsageWeekly() float64
func (*CreateKeysData) GetWorkspaceID ¶
func (c *CreateKeysData) GetWorkspaceID() string
func (CreateKeysData) MarshalJSON ¶
func (c CreateKeysData) MarshalJSON() ([]byte, error)
func (*CreateKeysData) UnmarshalJSON ¶
func (c *CreateKeysData) UnmarshalJSON(data []byte) error
type CreateKeysLimitReset ¶
type CreateKeysLimitReset string
CreateKeysLimitReset - Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
const ( CreateKeysLimitResetDaily CreateKeysLimitReset = "daily" CreateKeysLimitResetWeekly CreateKeysLimitReset = "weekly" CreateKeysLimitResetMonthly CreateKeysLimitReset = "monthly" )
func (*CreateKeysLimitReset) IsExact ¶
func (e *CreateKeysLimitReset) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (CreateKeysLimitReset) ToPointer ¶
func (e CreateKeysLimitReset) ToPointer() *CreateKeysLimitReset
type CreateKeysRequest ¶
type CreateKeysRequest struct {
// Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key.
CreatorUserID optionalnullable.OptionalNullable[string] `json:"creator_user_id,omitzero"`
// Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
// Whether to include BYOK usage in the limit
IncludeByokInLimit *bool `json:"include_byok_in_limit,omitzero"`
// Optional spending limit for the API key in USD
Limit optionalnullable.OptionalNullable[float64] `json:"limit,omitzero"`
// Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
LimitReset optionalnullable.OptionalNullable[CreateKeysLimitReset] `json:"limit_reset,omitzero"`
// Name for the new API key
Name string `json:"name"`
// The workspace to create the API key in. Defaults to the default workspace if not provided.
WorkspaceID *string `json:"workspace_id,omitzero"`
}
func (*CreateKeysRequest) GetCreatorUserID ¶
func (c *CreateKeysRequest) GetCreatorUserID() optionalnullable.OptionalNullable[string]
func (*CreateKeysRequest) GetExpiresAt ¶
func (c *CreateKeysRequest) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
func (*CreateKeysRequest) GetIncludeByokInLimit ¶
func (c *CreateKeysRequest) GetIncludeByokInLimit() *bool
func (*CreateKeysRequest) GetLimit ¶
func (c *CreateKeysRequest) GetLimit() optionalnullable.OptionalNullable[float64]
func (*CreateKeysRequest) GetLimitReset ¶
func (c *CreateKeysRequest) GetLimitReset() optionalnullable.OptionalNullable[CreateKeysLimitReset]
func (*CreateKeysRequest) GetName ¶
func (c *CreateKeysRequest) GetName() string
func (*CreateKeysRequest) GetWorkspaceID ¶
func (c *CreateKeysRequest) GetWorkspaceID() *string
func (CreateKeysRequest) MarshalJSON ¶
func (c CreateKeysRequest) MarshalJSON() ([]byte, error)
func (*CreateKeysRequest) UnmarshalJSON ¶
func (c *CreateKeysRequest) UnmarshalJSON(data []byte) error
type CreateKeysResponse ¶
type CreateKeysResponse struct {
// The created API key information
Data CreateKeysData `json:"data"`
// The actual API key string (only shown once)
Key string `json:"key"`
}
CreateKeysResponse - API key created successfully
func (*CreateKeysResponse) GetData ¶
func (c *CreateKeysResponse) GetData() CreateKeysData
func (*CreateKeysResponse) GetKey ¶
func (c *CreateKeysResponse) GetKey() string
type CreatePresetsChatCompletionsRequest ¶
type CreatePresetsChatCompletionsRequest struct {
// URL-safe slug identifying the preset. Created if it does not exist.
Slug string `pathParam:"style=simple,explode=false,name=slug"`
ChatRequest components.ChatRequest `request:"mediaType=application/json"`
}
func (*CreatePresetsChatCompletionsRequest) GetChatRequest ¶
func (c *CreatePresetsChatCompletionsRequest) GetChatRequest() components.ChatRequest
func (*CreatePresetsChatCompletionsRequest) GetSlug ¶
func (c *CreatePresetsChatCompletionsRequest) GetSlug() string
type CreatePresetsMessagesRequest ¶
type CreatePresetsMessagesRequest struct {
// URL-safe slug identifying the preset. Created if it does not exist.
Slug string `pathParam:"style=simple,explode=false,name=slug"`
MessagesRequest components.MessagesRequest `request:"mediaType=application/json"`
}
func (*CreatePresetsMessagesRequest) GetMessagesRequest ¶
func (c *CreatePresetsMessagesRequest) GetMessagesRequest() components.MessagesRequest
func (*CreatePresetsMessagesRequest) GetSlug ¶
func (c *CreatePresetsMessagesRequest) GetSlug() string
type CreatePresetsResponsesRequest ¶
type CreatePresetsResponsesRequest struct {
// URL-safe slug identifying the preset. Created if it does not exist.
Slug string `pathParam:"style=simple,explode=false,name=slug"`
ResponsesRequest components.ResponsesRequest `request:"mediaType=application/json"`
}
func (*CreatePresetsResponsesRequest) GetResponsesRequest ¶
func (c *CreatePresetsResponsesRequest) GetResponsesRequest() components.ResponsesRequest
func (*CreatePresetsResponsesRequest) GetSlug ¶
func (c *CreatePresetsResponsesRequest) GetSlug() string
type CreateRerankRequest ¶
type CreateRerankRequest struct {
// The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models.
Documents []Document `json:"documents"`
// The rerank model to use
Model string `json:"model"`
Provider optionalnullable.OptionalNullable[components.ProviderPreferences] `json:"provider,omitzero"`
// The search query to rerank documents against
Query string `json:"query"`
// Number of most relevant documents to return
TopN *int64 `json:"top_n,omitzero"`
}
CreateRerankRequest - Rerank request input
func (*CreateRerankRequest) GetDocuments ¶
func (c *CreateRerankRequest) GetDocuments() []Document
func (*CreateRerankRequest) GetModel ¶
func (c *CreateRerankRequest) GetModel() string
func (*CreateRerankRequest) GetProvider ¶
func (c *CreateRerankRequest) GetProvider() optionalnullable.OptionalNullable[components.ProviderPreferences]
func (*CreateRerankRequest) GetQuery ¶
func (c *CreateRerankRequest) GetQuery() string
func (*CreateRerankRequest) GetTopN ¶
func (c *CreateRerankRequest) GetTopN() *int64
func (CreateRerankRequest) MarshalJSON ¶
func (c CreateRerankRequest) MarshalJSON() ([]byte, error)
func (*CreateRerankRequest) UnmarshalJSON ¶
func (c *CreateRerankRequest) UnmarshalJSON(data []byte) error
type CreateRerankResponse ¶
type CreateRerankResponse struct {
CreateRerankResponseBody *CreateRerankResponseBody `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type CreateRerankResponseType
}
func CreateCreateRerankResponseCreateRerankResponseBody ¶
func CreateCreateRerankResponseCreateRerankResponseBody(createRerankResponseBody CreateRerankResponseBody) CreateRerankResponse
func CreateCreateRerankResponseStr ¶
func CreateCreateRerankResponseStr(str string) CreateRerankResponse
func (CreateRerankResponse) MarshalJSON ¶
func (u CreateRerankResponse) MarshalJSON() ([]byte, error)
func (*CreateRerankResponse) UnmarshalJSON ¶
func (u *CreateRerankResponse) UnmarshalJSON(data []byte) error
type CreateRerankResponseBody ¶
type CreateRerankResponseBody struct {
// Unique identifier for the rerank response (ORID format)
ID *string `json:"id,omitzero"`
// The model used for reranking
Model string `json:"model"`
// The provider that served the rerank request
Provider *string `json:"provider,omitzero"`
// List of rerank results sorted by relevance
Results []Result `json:"results"`
// Usage statistics
Usage *CreateRerankUsage `json:"usage,omitzero"`
}
CreateRerankResponseBody - Rerank response containing ranked results
func (*CreateRerankResponseBody) GetID ¶
func (c *CreateRerankResponseBody) GetID() *string
func (*CreateRerankResponseBody) GetModel ¶
func (c *CreateRerankResponseBody) GetModel() string
func (*CreateRerankResponseBody) GetProvider ¶
func (c *CreateRerankResponseBody) GetProvider() *string
func (*CreateRerankResponseBody) GetResults ¶
func (c *CreateRerankResponseBody) GetResults() []Result
func (*CreateRerankResponseBody) GetUsage ¶
func (c *CreateRerankResponseBody) GetUsage() *CreateRerankUsage
func (CreateRerankResponseBody) MarshalJSON ¶
func (c CreateRerankResponseBody) MarshalJSON() ([]byte, error)
func (*CreateRerankResponseBody) UnmarshalJSON ¶
func (c *CreateRerankResponseBody) UnmarshalJSON(data []byte) error
type CreateRerankResponseType ¶
type CreateRerankResponseType string
const ( CreateRerankResponseTypeCreateRerankResponseBody CreateRerankResponseType = "createRerank_ResponseBody" CreateRerankResponseTypeStr CreateRerankResponseType = "str" )
type CreateRerankUsage ¶
type CreateRerankUsage struct {
// Cost of the request in credits
Cost *float64 `json:"cost,omitzero"`
// Number of search units consumed (Cohere billing)
SearchUnits *int64 `json:"search_units,omitzero"`
// Total number of tokens used
TotalTokens *int64 `json:"total_tokens,omitzero"`
}
CreateRerankUsage - Usage statistics
func (*CreateRerankUsage) GetCost ¶
func (c *CreateRerankUsage) GetCost() *float64
func (*CreateRerankUsage) GetSearchUnits ¶
func (c *CreateRerankUsage) GetSearchUnits() *int64
func (*CreateRerankUsage) GetTotalTokens ¶
func (c *CreateRerankUsage) GetTotalTokens() *int64
type CreateResponsesRequest ¶
type CreateResponsesRequest struct {
// Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
XOpenRouterMetadata *components.MetadataLevel `header:"style=simple,explode=false,name=X-OpenRouter-Metadata"`
ResponsesRequest components.ResponsesRequest `request:"mediaType=application/json"`
}
func (*CreateResponsesRequest) GetResponsesRequest ¶
func (c *CreateResponsesRequest) GetResponsesRequest() components.ResponsesRequest
func (*CreateResponsesRequest) GetXOpenRouterMetadata ¶
func (c *CreateResponsesRequest) GetXOpenRouterMetadata() *components.MetadataLevel
type CreateResponsesResponse ¶
type CreateResponsesResponse struct {
OpenResponsesResult *components.OpenResponsesResult `queryParam:"inline" union:"member"`
EventStream *stream.EventStream[components.ResponsesStreamingResponse] `queryParam:"inline" union:"member"`
Type CreateResponsesResponseType
}
func CreateCreateResponsesResponseEventStream ¶
func CreateCreateResponsesResponseEventStream(eventStream *stream.EventStream[components.ResponsesStreamingResponse]) CreateResponsesResponse
func CreateCreateResponsesResponseOpenResponsesResult ¶
func CreateCreateResponsesResponseOpenResponsesResult(openResponsesResult components.OpenResponsesResult) CreateResponsesResponse
func (CreateResponsesResponse) MarshalJSON ¶
func (u CreateResponsesResponse) MarshalJSON() ([]byte, error)
func (*CreateResponsesResponse) UnmarshalJSON ¶
func (u *CreateResponsesResponse) UnmarshalJSON(data []byte) error
type CreateResponsesResponseType ¶
type CreateResponsesResponseType string
const ( CreateResponsesResponseTypeOpenResponsesResult CreateResponsesResponseType = "OpenResponsesResult" CreateResponsesResponseTypeEventStream CreateResponsesResponseType = "event-stream" )
type Datacenter ¶
type Datacenter string
const ( DatacenterAd Datacenter = "AD" DatacenterAe Datacenter = "AE" DatacenterAf Datacenter = "AF" DatacenterAg Datacenter = "AG" DatacenterAi Datacenter = "AI" DatacenterAl Datacenter = "AL" DatacenterAm Datacenter = "AM" DatacenterAo Datacenter = "AO" DatacenterAq Datacenter = "AQ" DatacenterAr Datacenter = "AR" DatacenterAs Datacenter = "AS" DatacenterAt Datacenter = "AT" DatacenterAu Datacenter = "AU" DatacenterAw Datacenter = "AW" DatacenterAx Datacenter = "AX" DatacenterAz Datacenter = "AZ" DatacenterBa Datacenter = "BA" DatacenterBb Datacenter = "BB" DatacenterBd Datacenter = "BD" DatacenterBe Datacenter = "BE" DatacenterBf Datacenter = "BF" DatacenterBg Datacenter = "BG" DatacenterBh Datacenter = "BH" DatacenterBi Datacenter = "BI" DatacenterBj Datacenter = "BJ" DatacenterBl Datacenter = "BL" DatacenterBm Datacenter = "BM" DatacenterBn Datacenter = "BN" DatacenterBo Datacenter = "BO" DatacenterBq Datacenter = "BQ" DatacenterBr Datacenter = "BR" DatacenterBs Datacenter = "BS" DatacenterBt Datacenter = "BT" DatacenterBv Datacenter = "BV" DatacenterBw Datacenter = "BW" DatacenterBy Datacenter = "BY" DatacenterBz Datacenter = "BZ" DatacenterCa Datacenter = "CA" DatacenterCc Datacenter = "CC" DatacenterCd Datacenter = "CD" DatacenterCf Datacenter = "CF" DatacenterCg Datacenter = "CG" DatacenterCh Datacenter = "CH" DatacenterCi Datacenter = "CI" DatacenterCk Datacenter = "CK" DatacenterCl Datacenter = "CL" DatacenterCm Datacenter = "CM" DatacenterCn Datacenter = "CN" DatacenterCo Datacenter = "CO" DatacenterCr Datacenter = "CR" DatacenterCu Datacenter = "CU" DatacenterCv Datacenter = "CV" DatacenterCw Datacenter = "CW" DatacenterCx Datacenter = "CX" DatacenterCy Datacenter = "CY" DatacenterCz Datacenter = "CZ" DatacenterDe Datacenter = "DE" DatacenterDj Datacenter = "DJ" DatacenterDk Datacenter = "DK" DatacenterDm Datacenter = "DM" DatacenterDo Datacenter = "DO" DatacenterDz Datacenter = "DZ" DatacenterEc Datacenter = "EC" DatacenterEe Datacenter = "EE" DatacenterEg Datacenter = "EG" DatacenterEh Datacenter = "EH" DatacenterEr Datacenter = "ER" DatacenterEs Datacenter = "ES" DatacenterEt Datacenter = "ET" DatacenterFi Datacenter = "FI" DatacenterFj Datacenter = "FJ" DatacenterFk Datacenter = "FK" DatacenterFm Datacenter = "FM" DatacenterFo Datacenter = "FO" DatacenterFr Datacenter = "FR" DatacenterGa Datacenter = "GA" DatacenterGb Datacenter = "GB" DatacenterGd Datacenter = "GD" DatacenterGe Datacenter = "GE" DatacenterGf Datacenter = "GF" DatacenterGg Datacenter = "GG" DatacenterGh Datacenter = "GH" DatacenterGi Datacenter = "GI" DatacenterGl Datacenter = "GL" DatacenterGm Datacenter = "GM" DatacenterGn Datacenter = "GN" DatacenterGp Datacenter = "GP" DatacenterGq Datacenter = "GQ" DatacenterGr Datacenter = "GR" DatacenterGs Datacenter = "GS" DatacenterGt Datacenter = "GT" DatacenterGu Datacenter = "GU" DatacenterGw Datacenter = "GW" DatacenterGy Datacenter = "GY" DatacenterHk Datacenter = "HK" DatacenterHm Datacenter = "HM" DatacenterHn Datacenter = "HN" DatacenterHr Datacenter = "HR" DatacenterHt Datacenter = "HT" DatacenterHu Datacenter = "HU" DatacenterID Datacenter = "ID" DatacenterIe Datacenter = "IE" DatacenterIl Datacenter = "IL" DatacenterIm Datacenter = "IM" DatacenterIn Datacenter = "IN" DatacenterIo Datacenter = "IO" DatacenterIq Datacenter = "IQ" DatacenterIr Datacenter = "IR" DatacenterIs Datacenter = "IS" DatacenterIt Datacenter = "IT" DatacenterJe Datacenter = "JE" DatacenterJm Datacenter = "JM" DatacenterJo Datacenter = "JO" DatacenterJp Datacenter = "JP" DatacenterKe Datacenter = "KE" DatacenterKg Datacenter = "KG" DatacenterKh Datacenter = "KH" DatacenterKi Datacenter = "KI" DatacenterKm Datacenter = "KM" DatacenterKn Datacenter = "KN" DatacenterKp Datacenter = "KP" DatacenterKr Datacenter = "KR" DatacenterKw Datacenter = "KW" DatacenterKy Datacenter = "KY" DatacenterKz Datacenter = "KZ" DatacenterLa Datacenter = "LA" DatacenterLb Datacenter = "LB" DatacenterLc Datacenter = "LC" DatacenterLi Datacenter = "LI" DatacenterLk Datacenter = "LK" DatacenterLr Datacenter = "LR" DatacenterLs Datacenter = "LS" DatacenterLt Datacenter = "LT" DatacenterLu Datacenter = "LU" DatacenterLv Datacenter = "LV" DatacenterLy Datacenter = "LY" DatacenterMa Datacenter = "MA" DatacenterMc Datacenter = "MC" DatacenterMd Datacenter = "MD" DatacenterMe Datacenter = "ME" DatacenterMf Datacenter = "MF" DatacenterMg Datacenter = "MG" DatacenterMh Datacenter = "MH" DatacenterMk Datacenter = "MK" DatacenterMl Datacenter = "ML" DatacenterMm Datacenter = "MM" DatacenterMn Datacenter = "MN" DatacenterMo Datacenter = "MO" DatacenterMp Datacenter = "MP" DatacenterMq Datacenter = "MQ" DatacenterMr Datacenter = "MR" DatacenterMs Datacenter = "MS" DatacenterMt Datacenter = "MT" DatacenterMu Datacenter = "MU" DatacenterMv Datacenter = "MV" DatacenterMw Datacenter = "MW" DatacenterMx Datacenter = "MX" DatacenterMy Datacenter = "MY" DatacenterMz Datacenter = "MZ" DatacenterNa Datacenter = "NA" DatacenterNc Datacenter = "NC" DatacenterNe Datacenter = "NE" DatacenterNf Datacenter = "NF" DatacenterNg Datacenter = "NG" DatacenterNi Datacenter = "NI" DatacenterNl Datacenter = "NL" DatacenterNo Datacenter = "NO" DatacenterNp Datacenter = "NP" DatacenterNr Datacenter = "NR" DatacenterNu Datacenter = "NU" DatacenterNz Datacenter = "NZ" DatacenterOm Datacenter = "OM" DatacenterPa Datacenter = "PA" DatacenterPe Datacenter = "PE" DatacenterPf Datacenter = "PF" DatacenterPg Datacenter = "PG" DatacenterPh Datacenter = "PH" DatacenterPk Datacenter = "PK" DatacenterPl Datacenter = "PL" DatacenterPm Datacenter = "PM" DatacenterPn Datacenter = "PN" DatacenterPr Datacenter = "PR" DatacenterPs Datacenter = "PS" DatacenterPt Datacenter = "PT" DatacenterPw Datacenter = "PW" DatacenterPy Datacenter = "PY" DatacenterQa Datacenter = "QA" DatacenterRe Datacenter = "RE" DatacenterRo Datacenter = "RO" DatacenterRs Datacenter = "RS" DatacenterRu Datacenter = "RU" DatacenterRw Datacenter = "RW" DatacenterSa Datacenter = "SA" DatacenterSb Datacenter = "SB" DatacenterSc Datacenter = "SC" DatacenterSd Datacenter = "SD" DatacenterSe Datacenter = "SE" DatacenterSg Datacenter = "SG" DatacenterSh Datacenter = "SH" DatacenterSi Datacenter = "SI" DatacenterSj Datacenter = "SJ" DatacenterSk Datacenter = "SK" DatacenterSl Datacenter = "SL" DatacenterSm Datacenter = "SM" DatacenterSn Datacenter = "SN" DatacenterSo Datacenter = "SO" DatacenterSr Datacenter = "SR" DatacenterSs Datacenter = "SS" DatacenterSt Datacenter = "ST" DatacenterSv Datacenter = "SV" DatacenterSx Datacenter = "SX" DatacenterSy Datacenter = "SY" DatacenterSz Datacenter = "SZ" DatacenterTc Datacenter = "TC" DatacenterTd Datacenter = "TD" DatacenterTf Datacenter = "TF" DatacenterTg Datacenter = "TG" DatacenterTh Datacenter = "TH" DatacenterTj Datacenter = "TJ" DatacenterTk Datacenter = "TK" DatacenterTl Datacenter = "TL" DatacenterTm Datacenter = "TM" DatacenterTn Datacenter = "TN" DatacenterTo Datacenter = "TO" DatacenterTr Datacenter = "TR" DatacenterTt Datacenter = "TT" DatacenterTv Datacenter = "TV" DatacenterTw Datacenter = "TW" DatacenterTz Datacenter = "TZ" DatacenterUa Datacenter = "UA" DatacenterUg Datacenter = "UG" DatacenterUm Datacenter = "UM" DatacenterUs Datacenter = "US" DatacenterUy Datacenter = "UY" DatacenterUz Datacenter = "UZ" DatacenterVa Datacenter = "VA" DatacenterVc Datacenter = "VC" DatacenterVe Datacenter = "VE" DatacenterVg Datacenter = "VG" DatacenterVi Datacenter = "VI" DatacenterVn Datacenter = "VN" DatacenterVu Datacenter = "VU" DatacenterWf Datacenter = "WF" DatacenterWs Datacenter = "WS" DatacenterYe Datacenter = "YE" DatacenterYt Datacenter = "YT" DatacenterZa Datacenter = "ZA" DatacenterZm Datacenter = "ZM" DatacenterZw Datacenter = "ZW" )
func (*Datacenter) IsExact ¶
func (e *Datacenter) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (Datacenter) ToPointer ¶
func (e Datacenter) ToPointer() *Datacenter
type DeleteBYOKKeyRequest ¶
type DeleteBYOKKeyRequest struct {
// The BYOK credential ID (UUID).
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*DeleteBYOKKeyRequest) GetID ¶
func (d *DeleteBYOKKeyRequest) GetID() string
type DeleteFileRequest ¶
type DeleteFileRequest struct {
FileID string `pathParam:"style=simple,explode=false,name=file_id"`
// Workspace to scope the request to. Defaults to the caller’s default workspace.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
}
func (*DeleteFileRequest) GetFileID ¶
func (d *DeleteFileRequest) GetFileID() string
func (*DeleteFileRequest) GetProvider ¶ added in v0.7.7
func (d *DeleteFileRequest) GetProvider() *components.FileProvider
func (*DeleteFileRequest) GetWorkspaceID ¶
func (d *DeleteFileRequest) GetWorkspaceID() *string
type DeleteGuardrailRequest ¶
type DeleteGuardrailRequest struct {
// The unique identifier of the guardrail to delete
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*DeleteGuardrailRequest) GetID ¶
func (d *DeleteGuardrailRequest) GetID() string
type DeleteKeysRequest ¶
type DeleteKeysRequest struct {
// The hash identifier of the API key to delete
Hash string `pathParam:"style=simple,explode=false,name=hash"`
}
func (*DeleteKeysRequest) GetHash ¶
func (d *DeleteKeysRequest) GetHash() string
type DeleteKeysResponse ¶
type DeleteKeysResponse struct {
// contains filtered or unexported fields
}
DeleteKeysResponse - API key deleted successfully
func (*DeleteKeysResponse) GetDeleted ¶
func (d *DeleteKeysResponse) GetDeleted() bool
func (DeleteKeysResponse) MarshalJSON ¶
func (d DeleteKeysResponse) MarshalJSON() ([]byte, error)
func (*DeleteKeysResponse) UnmarshalJSON ¶
func (d *DeleteKeysResponse) UnmarshalJSON(data []byte) error
type DeleteObservabilityDestinationRequest ¶
type DeleteObservabilityDestinationRequest struct {
// The destination ID (UUID).
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*DeleteObservabilityDestinationRequest) GetID ¶
func (d *DeleteObservabilityDestinationRequest) GetID() string
type DeleteWorkspaceBudgetRequest ¶
type DeleteWorkspaceBudgetRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
// Budget reset interval. Use "lifetime" for a one-time budget that never resets.
Interval components.WorkspaceBudgetInterval `pathParam:"style=simple,explode=false,name=interval"`
}
func (*DeleteWorkspaceBudgetRequest) GetID ¶
func (d *DeleteWorkspaceBudgetRequest) GetID() string
func (*DeleteWorkspaceBudgetRequest) GetInterval ¶
func (d *DeleteWorkspaceBudgetRequest) GetInterval() components.WorkspaceBudgetInterval
type DeleteWorkspaceRequest ¶
type DeleteWorkspaceRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*DeleteWorkspaceRequest) GetID ¶
func (d *DeleteWorkspaceRequest) GetID() string
type Dimension ¶
type Dimension struct {
// Human-readable label
DisplayLabel string `json:"display_label"`
// Dimension identifier used in query requests
Name string `json:"name"`
}
func (*Dimension) GetDisplayLabel ¶
type Direction ¶
type Direction string
type DisplayFormat ¶
type DisplayFormat string
DisplayFormat - How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)
const ( DisplayFormatNumber DisplayFormat = "number" DisplayFormatCurrency DisplayFormat = "currency" DisplayFormatPercent DisplayFormat = "percent" DisplayFormatLatency DisplayFormat = "latency" DisplayFormatThroughput DisplayFormat = "throughput" )
func (*DisplayFormat) IsExact ¶
func (e *DisplayFormat) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (DisplayFormat) ToPointer ¶
func (e DisplayFormat) ToPointer() *DisplayFormat
type Distillable ¶
type Distillable string
Distillable - Filter by distillation capability. "true" returns only distillable models, "false" excludes them.
const ( DistillableTrue Distillable = "true" DistillableFalse Distillable = "false" )
func (*Distillable) IsExact ¶
func (e *Distillable) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (Distillable) ToPointer ¶
func (e Distillable) ToPointer() *Distillable
type Document ¶
type Document struct {
Str *string `queryParam:"inline" union:"member"`
DocumentRequest *DocumentRequest `queryParam:"inline" union:"member"`
Type DocumentType
}
Document - A document to rerank. Either a plain string, or a structured object with optional `text` and/or `image`.
func CreateDocumentDocumentRequest ¶
func CreateDocumentDocumentRequest(documentRequest DocumentRequest) Document
func CreateDocumentStr ¶
func (Document) MarshalJSON ¶
func (*Document) UnmarshalJSON ¶
type DocumentRequest ¶
type DocumentRequest struct {
// An image associated with the document, as a remote URL (http/https) or a base64-encoded data URI (data:image/...).
Image *string `json:"image,omitzero"`
// The document text
Text *string `json:"text,omitzero"`
}
DocumentRequest - A structured document with optional text and/or image content. At least one of `text` or `image` must be provided.
func (*DocumentRequest) GetImage ¶
func (d *DocumentRequest) GetImage() *string
func (*DocumentRequest) GetText ¶
func (d *DocumentRequest) GetText() *string
func (DocumentRequest) MarshalJSON ¶
func (d DocumentRequest) MarshalJSON() ([]byte, error)
func (*DocumentRequest) UnmarshalJSON ¶
func (d *DocumentRequest) UnmarshalJSON(data []byte) error
type DocumentResponse ¶
type DocumentResponse struct {
// The image (URL or data URI) from the original document
Image *string `json:"image,omitzero"`
// The document text
Text *string `json:"text,omitzero"`
}
DocumentResponse - The document object echoing the original input (text and/or image)
func (*DocumentResponse) GetImage ¶
func (d *DocumentResponse) GetImage() *string
func (*DocumentResponse) GetText ¶
func (d *DocumentResponse) GetText() *string
type DocumentType ¶
type DocumentType string
const ( DocumentTypeStr DocumentType = "str" DocumentTypeDocumentRequest DocumentType = "document_request" )
type DownloadFileContentRequest ¶
type DownloadFileContentRequest struct {
FileID string `pathParam:"style=simple,explode=false,name=file_id"`
// Workspace to scope the request to. Defaults to the caller’s default workspace.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
}
func (*DownloadFileContentRequest) GetFileID ¶
func (d *DownloadFileContentRequest) GetFileID() string
func (*DownloadFileContentRequest) GetProvider ¶ added in v0.7.7
func (d *DownloadFileContentRequest) GetProvider() *components.FileProvider
func (*DownloadFileContentRequest) GetWorkspaceID ¶
func (d *DownloadFileContentRequest) GetWorkspaceID() *string
type Embedding ¶
type Embedding struct {
ArrayOfNumber []float64 `queryParam:"inline" union:"member"`
Str *string `queryParam:"inline" union:"member"`
Type EmbeddingType
}
Embedding vector as an array of floats or a base64 string
func CreateEmbeddingStr ¶
func (Embedding) MarshalJSON ¶
func (*Embedding) UnmarshalJSON ¶
type EmbeddingType ¶
type EmbeddingType string
const ( EmbeddingTypeArrayOfNumber EmbeddingType = "arrayOfNumber" EmbeddingTypeStr EmbeddingType = "str" )
type EncodingFormat ¶
type EncodingFormat string
EncodingFormat - The format of the output embeddings
const ( EncodingFormatFloat EncodingFormat = "float" EncodingFormatBase64 EncodingFormat = "base64" )
func (*EncodingFormat) IsExact ¶
func (e *EncodingFormat) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (EncodingFormat) ToPointer ¶
func (e EncodingFormat) ToPointer() *EncodingFormat
type ExchangeAuthCodeForAPIKeyCodeChallengeMethod ¶
type ExchangeAuthCodeForAPIKeyCodeChallengeMethod string
ExchangeAuthCodeForAPIKeyCodeChallengeMethod - The method used to generate the code challenge
const ( ExchangeAuthCodeForAPIKeyCodeChallengeMethodS256 ExchangeAuthCodeForAPIKeyCodeChallengeMethod = "S256" ExchangeAuthCodeForAPIKeyCodeChallengeMethodPlain ExchangeAuthCodeForAPIKeyCodeChallengeMethod = "plain" )
func (*ExchangeAuthCodeForAPIKeyCodeChallengeMethod) IsExact ¶
func (e *ExchangeAuthCodeForAPIKeyCodeChallengeMethod) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (ExchangeAuthCodeForAPIKeyCodeChallengeMethod) ToPointer ¶
func (e ExchangeAuthCodeForAPIKeyCodeChallengeMethod) ToPointer() *ExchangeAuthCodeForAPIKeyCodeChallengeMethod
type ExchangeAuthCodeForAPIKeyRequest ¶
type ExchangeAuthCodeForAPIKeyRequest struct {
// The authorization code received from the OAuth redirect
Code string `json:"code"`
// The method used to generate the code challenge
CodeChallengeMethod optionalnullable.OptionalNullable[ExchangeAuthCodeForAPIKeyCodeChallengeMethod] `json:"code_challenge_method,omitzero"`
// The code verifier if code_challenge was used in the authorization request
CodeVerifier *string `json:"code_verifier,omitzero"`
}
func (*ExchangeAuthCodeForAPIKeyRequest) GetCode ¶
func (e *ExchangeAuthCodeForAPIKeyRequest) GetCode() string
func (*ExchangeAuthCodeForAPIKeyRequest) GetCodeChallengeMethod ¶
func (e *ExchangeAuthCodeForAPIKeyRequest) GetCodeChallengeMethod() optionalnullable.OptionalNullable[ExchangeAuthCodeForAPIKeyCodeChallengeMethod]
func (*ExchangeAuthCodeForAPIKeyRequest) GetCodeVerifier ¶
func (e *ExchangeAuthCodeForAPIKeyRequest) GetCodeVerifier() *string
type ExchangeAuthCodeForAPIKeyResponse ¶
type ExchangeAuthCodeForAPIKeyResponse struct {
// The API key to use for OpenRouter requests
Key string `json:"key"`
// User ID associated with the API key
UserID *string `json:"user_id"`
}
ExchangeAuthCodeForAPIKeyResponse - Successfully exchanged code for an API key
func (*ExchangeAuthCodeForAPIKeyResponse) GetKey ¶
func (e *ExchangeAuthCodeForAPIKeyResponse) GetKey() string
func (*ExchangeAuthCodeForAPIKeyResponse) GetUserID ¶
func (e *ExchangeAuthCodeForAPIKeyResponse) GetUserID() *string
type Filter ¶
type Filter struct {
// Dimension to filter on. Use the /meta endpoint for available dimensions.
Field string `json:"field"`
// Filter operator
Operator string `json:"operator"`
// Filter value (scalar or array depending on operator). Several dimensions are enriched in responses (returned as human-readable labels), but filters must use the underlying ID: `api_key_id` — numeric ID (from generation metadata) or key hash (64-char hex from GET /api/v1/keys, resolved server-side); `user` — Clerk user ID (e.g. "user_abc123"), not the display name; `workspace` — workspace UUID, not the workspace name; `app` — numeric app ID, not the app title; `model` — permaslug (e.g. "openai/gpt-4o"), not the display name. Other dimensions (provider, origin, country, etc.) are not enriched and accept the value as returned.
Value Value1 `json:"value"`
}
func (*Filter) GetOperator ¶
type GetAnalyticsMetaData ¶
type GetAnalyticsMetaData struct {
Dimensions []Dimension `json:"dimensions"`
Granularities []Granularity `json:"granularities"`
Metrics []Metric `json:"metrics"`
Operators []Operator `json:"operators"`
}
func (*GetAnalyticsMetaData) GetDimensions ¶
func (g *GetAnalyticsMetaData) GetDimensions() []Dimension
func (*GetAnalyticsMetaData) GetGranularities ¶
func (g *GetAnalyticsMetaData) GetGranularities() []Granularity
func (*GetAnalyticsMetaData) GetMetrics ¶
func (g *GetAnalyticsMetaData) GetMetrics() []Metric
func (*GetAnalyticsMetaData) GetOperators ¶
func (g *GetAnalyticsMetaData) GetOperators() []Operator
type GetAnalyticsMetaResponse ¶
type GetAnalyticsMetaResponse struct {
Data GetAnalyticsMetaData `json:"data"`
}
GetAnalyticsMetaResponse - Returns analytics query metadata
func (*GetAnalyticsMetaResponse) GetData ¶
func (g *GetAnalyticsMetaResponse) GetData() GetAnalyticsMetaData
type GetAppRankingsCategory ¶
type GetAppRankingsCategory string
GetAppRankingsCategory - Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group.
const ( GetAppRankingsCategoryCoding GetAppRankingsCategory = "coding" GetAppRankingsCategoryCreative GetAppRankingsCategory = "creative" GetAppRankingsCategoryProductivity GetAppRankingsCategory = "productivity" GetAppRankingsCategoryEntertainment GetAppRankingsCategory = "entertainment" )
func (*GetAppRankingsCategory) IsExact ¶
func (e *GetAppRankingsCategory) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (GetAppRankingsCategory) ToPointer ¶
func (e GetAppRankingsCategory) ToPointer() *GetAppRankingsCategory
type GetAppRankingsRequest ¶
type GetAppRankingsRequest struct {
// Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group.
Category *GetAppRankingsCategory `queryParam:"style=form,explode=true,name=category"`
// Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent.
Subcategory *Subcategory `queryParam:"style=form,explode=true,name=subcategory"`
// `popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results.
Sort *GetAppRankingsSort `default:"popular" queryParam:"style=form,explode=true,name=sort"`
// Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
StartDate *string `queryParam:"style=form,explode=true,name=start_date"`
// End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
EndDate *string `queryParam:"style=form,explode=true,name=end_date"`
// Maximum number of apps to return (1-100). Defaults to 50.
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
// Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`.
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
}
func (*GetAppRankingsRequest) GetCategory ¶
func (g *GetAppRankingsRequest) GetCategory() *GetAppRankingsCategory
func (*GetAppRankingsRequest) GetEndDate ¶
func (g *GetAppRankingsRequest) GetEndDate() *string
func (*GetAppRankingsRequest) GetLimit ¶
func (g *GetAppRankingsRequest) GetLimit() *int64
func (*GetAppRankingsRequest) GetOffset ¶
func (g *GetAppRankingsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (*GetAppRankingsRequest) GetSort ¶
func (g *GetAppRankingsRequest) GetSort() *GetAppRankingsSort
func (*GetAppRankingsRequest) GetStartDate ¶
func (g *GetAppRankingsRequest) GetStartDate() *string
func (*GetAppRankingsRequest) GetSubcategory ¶
func (g *GetAppRankingsRequest) GetSubcategory() *Subcategory
func (GetAppRankingsRequest) MarshalJSON ¶
func (g GetAppRankingsRequest) MarshalJSON() ([]byte, error)
func (*GetAppRankingsRequest) UnmarshalJSON ¶
func (g *GetAppRankingsRequest) UnmarshalJSON(data []byte) error
type GetAppRankingsResponse ¶
type GetAppRankingsResponse struct {
Result components.AppRankingsResponse
Next func() (*GetAppRankingsResponse, error)
}
func (*GetAppRankingsResponse) GetResult ¶
func (g *GetAppRankingsResponse) GetResult() components.AppRankingsResponse
type GetAppRankingsSort ¶
type GetAppRankingsSort string
GetAppRankingsSort - `popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results.
const ( GetAppRankingsSortPopular GetAppRankingsSort = "popular" GetAppRankingsSortTrending GetAppRankingsSort = "trending" )
func (*GetAppRankingsSort) IsExact ¶
func (e *GetAppRankingsSort) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (GetAppRankingsSort) ToPointer ¶
func (e GetAppRankingsSort) ToPointer() *GetAppRankingsSort
type GetBYOKKeyRequest ¶
type GetBYOKKeyRequest struct {
// The BYOK credential ID (UUID).
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*GetBYOKKeyRequest) GetID ¶
func (g *GetBYOKKeyRequest) GetID() string
type GetBenchmarksRequest ¶
type GetBenchmarksRequest struct {
// Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.
Source *Source `queryParam:"style=form,explode=true,name=source"`
// Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category.
TaskType *TaskType `queryParam:"style=form,explode=true,name=task_type"`
// Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.
Arena *Arena `queryParam:"style=form,explode=true,name=arena"`
// Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories.
Category *string `queryParam:"style=form,explode=true,name=category"`
// Maximum number of items to return. When omitted, all matching results are returned.
MaxResults *int64 `queryParam:"style=form,explode=true,name=max_results"`
}
func (*GetBenchmarksRequest) GetArena ¶
func (g *GetBenchmarksRequest) GetArena() *Arena
func (*GetBenchmarksRequest) GetCategory ¶
func (g *GetBenchmarksRequest) GetCategory() *string
func (*GetBenchmarksRequest) GetMaxResults ¶
func (g *GetBenchmarksRequest) GetMaxResults() *int64
func (*GetBenchmarksRequest) GetSource ¶
func (g *GetBenchmarksRequest) GetSource() *Source
func (*GetBenchmarksRequest) GetTaskType ¶
func (g *GetBenchmarksRequest) GetTaskType() *TaskType
type GetCreditsData ¶
type GetCreditsData struct {
// Total credits purchased
TotalCredits float64 `json:"total_credits"`
// Total credits used
TotalUsage float64 `json:"total_usage"`
}
func (*GetCreditsData) GetTotalCredits ¶
func (g *GetCreditsData) GetTotalCredits() float64
func (*GetCreditsData) GetTotalUsage ¶
func (g *GetCreditsData) GetTotalUsage() float64
type GetCreditsResponse ¶
type GetCreditsResponse struct {
Data GetCreditsData `json:"data"`
}
GetCreditsResponse - Total credits purchased and used
func (*GetCreditsResponse) GetData ¶
func (g *GetCreditsResponse) GetData() GetCreditsData
type GetCurrentKeyData ¶
type GetCurrentKeyData struct {
// Total external BYOK usage (in USD) for the API key
ByokUsage float64 `json:"byok_usage"`
// External BYOK usage (in USD) for the current UTC day
ByokUsageDaily float64 `json:"byok_usage_daily"`
// External BYOK usage (in USD) for current UTC month
ByokUsageMonthly float64 `json:"byok_usage_monthly"`
// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
ByokUsageWeekly float64 `json:"byok_usage_weekly"`
// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
CreatorUserID *string `json:"creator_user_id"`
// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
// Whether to include external BYOK usage in the credit limit
IncludeByokInLimit bool `json:"include_byok_in_limit"`
// Whether this is a free tier API key
IsFreeTier bool `json:"is_free_tier"`
// Whether this is a management key
IsManagementKey bool `json:"is_management_key"`
// Whether this is a management key
//
// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
IsProvisioningKey bool `json:"is_provisioning_key"`
// Human-readable label for the API key
Label string `json:"label"`
// Spending limit for the API key in USD
Limit *float64 `json:"limit"`
// Remaining spending limit in USD
LimitRemaining *float64 `json:"limit_remaining"`
// Type of limit reset for the API key
LimitReset *string `json:"limit_reset"`
// Legacy rate limit information about a key. Will always return -1.
//
// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
RateLimit RateLimit `json:"rate_limit"`
// Total OpenRouter credit usage (in USD) for the API key
Usage float64 `json:"usage"`
// OpenRouter credit usage (in USD) for the current UTC day
UsageDaily float64 `json:"usage_daily"`
// OpenRouter credit usage (in USD) for the current UTC month
UsageMonthly float64 `json:"usage_monthly"`
// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
UsageWeekly float64 `json:"usage_weekly"`
}
GetCurrentKeyData - Current API key information
func (*GetCurrentKeyData) GetByokUsage ¶
func (g *GetCurrentKeyData) GetByokUsage() float64
func (*GetCurrentKeyData) GetByokUsageDaily ¶
func (g *GetCurrentKeyData) GetByokUsageDaily() float64
func (*GetCurrentKeyData) GetByokUsageMonthly ¶
func (g *GetCurrentKeyData) GetByokUsageMonthly() float64
func (*GetCurrentKeyData) GetByokUsageWeekly ¶
func (g *GetCurrentKeyData) GetByokUsageWeekly() float64
func (*GetCurrentKeyData) GetCreatorUserID ¶
func (g *GetCurrentKeyData) GetCreatorUserID() *string
func (*GetCurrentKeyData) GetExpiresAt ¶
func (g *GetCurrentKeyData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
func (*GetCurrentKeyData) GetIncludeByokInLimit ¶
func (g *GetCurrentKeyData) GetIncludeByokInLimit() bool
func (*GetCurrentKeyData) GetIsFreeTier ¶
func (g *GetCurrentKeyData) GetIsFreeTier() bool
func (*GetCurrentKeyData) GetIsManagementKey ¶
func (g *GetCurrentKeyData) GetIsManagementKey() bool
func (*GetCurrentKeyData) GetIsProvisioningKey ¶
func (g *GetCurrentKeyData) GetIsProvisioningKey() bool
func (*GetCurrentKeyData) GetLabel ¶
func (g *GetCurrentKeyData) GetLabel() string
func (*GetCurrentKeyData) GetLimit ¶
func (g *GetCurrentKeyData) GetLimit() *float64
func (*GetCurrentKeyData) GetLimitRemaining ¶
func (g *GetCurrentKeyData) GetLimitRemaining() *float64
func (*GetCurrentKeyData) GetLimitReset ¶
func (g *GetCurrentKeyData) GetLimitReset() *string
func (*GetCurrentKeyData) GetRateLimit ¶
func (g *GetCurrentKeyData) GetRateLimit() RateLimit
func (*GetCurrentKeyData) GetUsage ¶
func (g *GetCurrentKeyData) GetUsage() float64
func (*GetCurrentKeyData) GetUsageDaily ¶
func (g *GetCurrentKeyData) GetUsageDaily() float64
func (*GetCurrentKeyData) GetUsageMonthly ¶
func (g *GetCurrentKeyData) GetUsageMonthly() float64
func (*GetCurrentKeyData) GetUsageWeekly ¶
func (g *GetCurrentKeyData) GetUsageWeekly() float64
func (GetCurrentKeyData) MarshalJSON ¶
func (g GetCurrentKeyData) MarshalJSON() ([]byte, error)
func (*GetCurrentKeyData) UnmarshalJSON ¶
func (g *GetCurrentKeyData) UnmarshalJSON(data []byte) error
type GetCurrentKeyResponse ¶
type GetCurrentKeyResponse struct {
// Current API key information
Data GetCurrentKeyData `json:"data"`
}
GetCurrentKeyResponse - API key details
func (*GetCurrentKeyResponse) GetData ¶
func (g *GetCurrentKeyResponse) GetData() GetCurrentKeyData
type GetFileMetadataRequest ¶
type GetFileMetadataRequest struct {
FileID string `pathParam:"style=simple,explode=false,name=file_id"`
// Workspace to scope the request to. Defaults to the caller’s default workspace.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
}
func (*GetFileMetadataRequest) GetFileID ¶
func (g *GetFileMetadataRequest) GetFileID() string
func (*GetFileMetadataRequest) GetProvider ¶ added in v0.7.7
func (g *GetFileMetadataRequest) GetProvider() *components.FileProvider
func (*GetFileMetadataRequest) GetWorkspaceID ¶
func (g *GetFileMetadataRequest) GetWorkspaceID() *string
type GetGenerationRequest ¶
type GetGenerationRequest struct {
// The generation ID
ID string `queryParam:"style=form,explode=true,name=id"`
}
func (*GetGenerationRequest) GetID ¶
func (g *GetGenerationRequest) GetID() string
type GetGuardrailRequest ¶
type GetGuardrailRequest struct {
// The unique identifier of the guardrail to retrieve
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*GetGuardrailRequest) GetID ¶
func (g *GetGuardrailRequest) GetID() string
type GetKeyData ¶
type GetKeyData struct {
// Total external BYOK usage (in USD) for the API key
ByokUsage float64 `json:"byok_usage"`
// External BYOK usage (in USD) for the current UTC day
ByokUsageDaily float64 `json:"byok_usage_daily"`
// External BYOK usage (in USD) for current UTC month
ByokUsageMonthly float64 `json:"byok_usage_monthly"`
// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
ByokUsageWeekly float64 `json:"byok_usage_weekly"`
// ISO 8601 timestamp of when the API key was created
CreatedAt string `json:"created_at"`
// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
CreatorUserID *string `json:"creator_user_id"`
// Whether the API key is disabled
Disabled bool `json:"disabled"`
// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
// Unique hash identifier for the API key
Hash string `json:"hash"`
// Whether to include external BYOK usage in the credit limit
IncludeByokInLimit bool `json:"include_byok_in_limit"`
// Human-readable label for the API key
Label string `json:"label"`
// Spending limit for the API key in USD
Limit *float64 `json:"limit"`
// Remaining spending limit in USD
LimitRemaining *float64 `json:"limit_remaining"`
// Type of limit reset for the API key
LimitReset *string `json:"limit_reset"`
// Name of the API key
Name string `json:"name"`
// ISO 8601 timestamp of when the API key was last updated
UpdatedAt *string `json:"updated_at"`
// Total OpenRouter credit usage (in USD) for the API key
Usage float64 `json:"usage"`
// OpenRouter credit usage (in USD) for the current UTC day
UsageDaily float64 `json:"usage_daily"`
// OpenRouter credit usage (in USD) for the current UTC month
UsageMonthly float64 `json:"usage_monthly"`
// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
UsageWeekly float64 `json:"usage_weekly"`
// The workspace ID this API key belongs to.
WorkspaceID string `json:"workspace_id"`
}
GetKeyData - The API key information
func (*GetKeyData) GetByokUsage ¶
func (g *GetKeyData) GetByokUsage() float64
func (*GetKeyData) GetByokUsageDaily ¶
func (g *GetKeyData) GetByokUsageDaily() float64
func (*GetKeyData) GetByokUsageMonthly ¶
func (g *GetKeyData) GetByokUsageMonthly() float64
func (*GetKeyData) GetByokUsageWeekly ¶
func (g *GetKeyData) GetByokUsageWeekly() float64
func (*GetKeyData) GetCreatedAt ¶
func (g *GetKeyData) GetCreatedAt() string
func (*GetKeyData) GetCreatorUserID ¶
func (g *GetKeyData) GetCreatorUserID() *string
func (*GetKeyData) GetDisabled ¶
func (g *GetKeyData) GetDisabled() bool
func (*GetKeyData) GetExpiresAt ¶
func (g *GetKeyData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
func (*GetKeyData) GetHash ¶
func (g *GetKeyData) GetHash() string
func (*GetKeyData) GetIncludeByokInLimit ¶
func (g *GetKeyData) GetIncludeByokInLimit() bool
func (*GetKeyData) GetLabel ¶
func (g *GetKeyData) GetLabel() string
func (*GetKeyData) GetLimit ¶
func (g *GetKeyData) GetLimit() *float64
func (*GetKeyData) GetLimitRemaining ¶
func (g *GetKeyData) GetLimitRemaining() *float64
func (*GetKeyData) GetLimitReset ¶
func (g *GetKeyData) GetLimitReset() *string
func (*GetKeyData) GetName ¶
func (g *GetKeyData) GetName() string
func (*GetKeyData) GetUpdatedAt ¶
func (g *GetKeyData) GetUpdatedAt() *string
func (*GetKeyData) GetUsage ¶
func (g *GetKeyData) GetUsage() float64
func (*GetKeyData) GetUsageDaily ¶
func (g *GetKeyData) GetUsageDaily() float64
func (*GetKeyData) GetUsageMonthly ¶
func (g *GetKeyData) GetUsageMonthly() float64
func (*GetKeyData) GetUsageWeekly ¶
func (g *GetKeyData) GetUsageWeekly() float64
func (*GetKeyData) GetWorkspaceID ¶
func (g *GetKeyData) GetWorkspaceID() string
func (GetKeyData) MarshalJSON ¶
func (g GetKeyData) MarshalJSON() ([]byte, error)
func (*GetKeyData) UnmarshalJSON ¶
func (g *GetKeyData) UnmarshalJSON(data []byte) error
type GetKeyRequest ¶
type GetKeyRequest struct {
// The hash identifier of the API key to retrieve
Hash string `pathParam:"style=simple,explode=false,name=hash"`
}
func (*GetKeyRequest) GetHash ¶
func (g *GetKeyRequest) GetHash() string
type GetKeyResponse ¶
type GetKeyResponse struct {
// The API key information
Data GetKeyData `json:"data"`
}
GetKeyResponse - API key details
func (*GetKeyResponse) GetData ¶
func (g *GetKeyResponse) GetData() GetKeyData
type GetModelRequest ¶
type GetModelRequest struct {
// The author/organization of the model
Author string `pathParam:"style=simple,explode=false,name=author"`
// The model slug, optionally including a variant suffix (e.g. gpt-4 or gpt-4:free)
Slug string `pathParam:"style=simple,explode=false,name=slug"`
}
func (*GetModelRequest) GetAuthor ¶
func (g *GetModelRequest) GetAuthor() string
func (*GetModelRequest) GetSlug ¶
func (g *GetModelRequest) GetSlug() string
type GetModelsCategory ¶
type GetModelsCategory string
GetModelsCategory - Filter models by use case category
const ( GetModelsCategoryProgramming GetModelsCategory = "programming" GetModelsCategoryRoleplay GetModelsCategory = "roleplay" GetModelsCategoryMarketing GetModelsCategory = "marketing" GetModelsCategoryMarketingSeo GetModelsCategory = "marketing/seo" GetModelsCategoryTechnology GetModelsCategory = "technology" GetModelsCategoryScience GetModelsCategory = "science" GetModelsCategoryTranslation GetModelsCategory = "translation" GetModelsCategoryLegal GetModelsCategory = "legal" GetModelsCategoryFinance GetModelsCategory = "finance" GetModelsCategoryHealth GetModelsCategory = "health" GetModelsCategoryTrivia GetModelsCategory = "trivia" GetModelsCategoryAcademia GetModelsCategory = "academia" )
func (*GetModelsCategory) IsExact ¶
func (e *GetModelsCategory) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (GetModelsCategory) ToPointer ¶
func (e GetModelsCategory) ToPointer() *GetModelsCategory
type GetModelsRequest ¶
type GetModelsRequest struct {
// Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
Limit *int64 `default:"500" queryParam:"style=form,explode=true,name=limit"`
// Filter models by use case category
Category *GetModelsCategory `queryParam:"style=form,explode=true,name=category"`
// Filter models by supported parameter (comma-separated)
SupportedParameters *string `queryParam:"style=form,explode=true,name=supported_parameters"`
// Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
OutputModalities *string `queryParam:"style=form,explode=true,name=output_modalities"`
// Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
Sort *GetModelsSort `queryParam:"style=form,explode=true,name=sort"`
// Free-text search by model name or slug.
Q *string `queryParam:"style=form,explode=true,name=q"`
// Filter models by input modality. Comma-separated list of: text, image, audio, file.
InputModalities *string `queryParam:"style=form,explode=true,name=input_modalities"`
// Minimum context length (tokens). Models with smaller context are excluded.
Context *int64 `queryParam:"style=form,explode=true,name=context"`
// Minimum prompt price in $/M tokens.
MinPrice optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_price"`
// Maximum prompt price in $/M tokens.
MaxPrice optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_price"`
// Filter models by architecture/model family (e.g. GPT, Claude, Gemini, Llama).
Arch *string `queryParam:"style=form,explode=true,name=arch"`
// Filter models by the organization that created the model. Comma-separated list of author slugs.
ModelAuthors *string `queryParam:"style=form,explode=true,name=model_authors"`
// Filter models by hosting provider. Comma-separated list of provider names.
Providers *string `queryParam:"style=form,explode=true,name=providers"`
// Filter by distillation capability. "true" returns only distillable models, "false" excludes them.
Distillable *Distillable `queryParam:"style=form,explode=true,name=distillable"`
// When set to "true", return only models with zero data retention endpoints.
Zdr *Zdr `queryParam:"style=form,explode=true,name=zdr"`
// Filter to models with endpoints in the given data region. Currently only "eu" is supported.
Region *Region `queryParam:"style=form,explode=true,name=region"`
// Minimum completion (output) price in $/M tokens.
MinOutputPrice optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_output_price"`
// Maximum completion (output) price in $/M tokens.
MaxOutputPrice optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_output_price"`
// Minimum model age in days since its creation date.
MinAgeDays optionalnullable.OptionalNullable[int64] `queryParam:"style=form,explode=true,name=min_age_days"`
// Maximum model age in days since its creation date.
MaxAgeDays optionalnullable.OptionalNullable[int64] `queryParam:"style=form,explode=true,name=max_age_days"`
// Minimum Artificial Analysis intelligence index.
MinIntelligenceIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_intelligence_index"`
// Maximum Artificial Analysis intelligence index.
MaxIntelligenceIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_intelligence_index"`
// Minimum Artificial Analysis coding index.
MinCodingIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_coding_index"`
// Maximum Artificial Analysis coding index.
MaxCodingIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_coding_index"`
// Minimum Artificial Analysis agentic index.
MinAgenticIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_agentic_index"`
// Maximum Artificial Analysis agentic index.
MaxAgenticIndex optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_agentic_index"`
// Minimum tool-calling success rate, as a fraction in [0, 1] (e.g. 0.9 = 90% of requests finishing with a tool_calls finish reason).
MinToolSuccessRate optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=min_tool_success_rate"`
// Maximum tool-calling success rate, as a fraction in [0, 1].
MaxToolSuccessRate optionalnullable.OptionalNullable[float64] `queryParam:"style=form,explode=true,name=max_tool_success_rate"`
}
func (*GetModelsRequest) GetArch ¶
func (g *GetModelsRequest) GetArch() *string
func (*GetModelsRequest) GetCategory ¶
func (g *GetModelsRequest) GetCategory() *GetModelsCategory
func (*GetModelsRequest) GetContext ¶
func (g *GetModelsRequest) GetContext() *int64
func (*GetModelsRequest) GetDistillable ¶
func (g *GetModelsRequest) GetDistillable() *Distillable
func (*GetModelsRequest) GetInputModalities ¶
func (g *GetModelsRequest) GetInputModalities() *string
func (*GetModelsRequest) GetLimit ¶ added in v0.5.18
func (g *GetModelsRequest) GetLimit() *int64
func (*GetModelsRequest) GetMaxAgeDays ¶ added in v0.5.13
func (g *GetModelsRequest) GetMaxAgeDays() optionalnullable.OptionalNullable[int64]
func (*GetModelsRequest) GetMaxAgenticIndex ¶ added in v0.5.13
func (g *GetModelsRequest) GetMaxAgenticIndex() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMaxCodingIndex ¶ added in v0.5.13
func (g *GetModelsRequest) GetMaxCodingIndex() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMaxIntelligenceIndex ¶ added in v0.5.13
func (g *GetModelsRequest) GetMaxIntelligenceIndex() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMaxOutputPrice ¶ added in v0.5.13
func (g *GetModelsRequest) GetMaxOutputPrice() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMaxPrice ¶
func (g *GetModelsRequest) GetMaxPrice() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMaxToolSuccessRate ¶ added in v0.5.13
func (g *GetModelsRequest) GetMaxToolSuccessRate() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMinAgeDays ¶ added in v0.5.13
func (g *GetModelsRequest) GetMinAgeDays() optionalnullable.OptionalNullable[int64]
func (*GetModelsRequest) GetMinAgenticIndex ¶ added in v0.5.13
func (g *GetModelsRequest) GetMinAgenticIndex() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMinCodingIndex ¶ added in v0.5.13
func (g *GetModelsRequest) GetMinCodingIndex() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMinIntelligenceIndex ¶ added in v0.5.13
func (g *GetModelsRequest) GetMinIntelligenceIndex() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMinOutputPrice ¶ added in v0.5.13
func (g *GetModelsRequest) GetMinOutputPrice() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMinPrice ¶
func (g *GetModelsRequest) GetMinPrice() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetMinToolSuccessRate ¶ added in v0.5.13
func (g *GetModelsRequest) GetMinToolSuccessRate() optionalnullable.OptionalNullable[float64]
func (*GetModelsRequest) GetModelAuthors ¶
func (g *GetModelsRequest) GetModelAuthors() *string
func (*GetModelsRequest) GetOffset ¶ added in v0.5.18
func (g *GetModelsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (*GetModelsRequest) GetOutputModalities ¶
func (g *GetModelsRequest) GetOutputModalities() *string
func (*GetModelsRequest) GetProviders ¶
func (g *GetModelsRequest) GetProviders() *string
func (*GetModelsRequest) GetQ ¶
func (g *GetModelsRequest) GetQ() *string
func (*GetModelsRequest) GetRegion ¶
func (g *GetModelsRequest) GetRegion() *Region
func (*GetModelsRequest) GetSort ¶
func (g *GetModelsRequest) GetSort() *GetModelsSort
func (*GetModelsRequest) GetSupportedParameters ¶
func (g *GetModelsRequest) GetSupportedParameters() *string
func (*GetModelsRequest) GetZdr ¶
func (g *GetModelsRequest) GetZdr() *Zdr
func (GetModelsRequest) MarshalJSON ¶ added in v0.5.18
func (g GetModelsRequest) MarshalJSON() ([]byte, error)
func (*GetModelsRequest) UnmarshalJSON ¶ added in v0.5.18
func (g *GetModelsRequest) UnmarshalJSON(data []byte) error
type GetModelsResponse ¶ added in v0.5.18
type GetModelsResponse struct {
Result components.ModelsListResponse
Next func() (*GetModelsResponse, error)
}
func (*GetModelsResponse) GetResult ¶ added in v0.5.18
func (g *GetModelsResponse) GetResult() components.ModelsListResponse
type GetModelsSort ¶
type GetModelsSort string
GetModelsSort - Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low, coding-high-to-low, agentic-high-to-low (Artificial Analysis indices), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
const ( GetModelsSortMostPopular GetModelsSort = "most-popular" GetModelsSortNewest GetModelsSort = "newest" GetModelsSortTopWeekly GetModelsSort = "top-weekly" GetModelsSortPricingLowToHigh GetModelsSort = "pricing-low-to-high" GetModelsSortPricingHighToLow GetModelsSort = "pricing-high-to-low" GetModelsSortContextHighToLow GetModelsSort = "context-high-to-low" GetModelsSortThroughputHighToLow GetModelsSort = "throughput-high-to-low" GetModelsSortLatencyLowToHigh GetModelsSort = "latency-low-to-high" GetModelsSortIntelligenceHighToLow GetModelsSort = "intelligence-high-to-low" GetModelsSortCodingHighToLow GetModelsSort = "coding-high-to-low" GetModelsSortAgenticHighToLow GetModelsSort = "agentic-high-to-low" GetModelsSortDesignArenaEloHighToLow GetModelsSort = "design-arena-elo-high-to-low" )
func (*GetModelsSort) IsExact ¶
func (e *GetModelsSort) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (GetModelsSort) ToPointer ¶
func (e GetModelsSort) ToPointer() *GetModelsSort
type GetObservabilityDestinationRequest ¶
type GetObservabilityDestinationRequest struct {
// The destination ID (UUID).
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*GetObservabilityDestinationRequest) GetID ¶
func (g *GetObservabilityDestinationRequest) GetID() string
type GetPresetRequest ¶
type GetPresetRequest struct {
// URL-safe slug identifying the preset.
Slug string `pathParam:"style=simple,explode=false,name=slug"`
}
func (*GetPresetRequest) GetSlug ¶
func (g *GetPresetRequest) GetSlug() string
type GetPresetVersionRequest ¶
type GetPresetVersionRequest struct {
// URL-safe slug identifying the preset.
Slug string `pathParam:"style=simple,explode=false,name=slug"`
// Version number of the preset.
Version string `pathParam:"style=simple,explode=false,name=version"`
}
func (*GetPresetVersionRequest) GetSlug ¶
func (g *GetPresetVersionRequest) GetSlug() string
func (*GetPresetVersionRequest) GetVersion ¶
func (g *GetPresetVersionRequest) GetVersion() string
type GetRankingsDailyCategory ¶ added in v0.5.13
type GetRankingsDailyCategory string
GetRankingsDailyCategory - Restrict to a use-case category (e.g. `programming`, `roleplay`). Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `language_type`.
const ( GetRankingsDailyCategoryProgramming GetRankingsDailyCategory = "programming" GetRankingsDailyCategoryRoleplay GetRankingsDailyCategory = "roleplay" GetRankingsDailyCategoryMarketing GetRankingsDailyCategory = "marketing" GetRankingsDailyCategoryMarketingSeo GetRankingsDailyCategory = "marketing/seo" GetRankingsDailyCategoryTechnology GetRankingsDailyCategory = "technology" GetRankingsDailyCategoryScience GetRankingsDailyCategory = "science" GetRankingsDailyCategoryTranslation GetRankingsDailyCategory = "translation" GetRankingsDailyCategoryLegal GetRankingsDailyCategory = "legal" GetRankingsDailyCategoryFinance GetRankingsDailyCategory = "finance" GetRankingsDailyCategoryHealth GetRankingsDailyCategory = "health" GetRankingsDailyCategoryTrivia GetRankingsDailyCategory = "trivia" GetRankingsDailyCategoryAcademia GetRankingsDailyCategory = "academia" )
func (*GetRankingsDailyCategory) IsExact ¶ added in v0.5.13
func (e *GetRankingsDailyCategory) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (GetRankingsDailyCategory) ToPointer ¶ added in v0.5.13
func (e GetRankingsDailyCategory) ToPointer() *GetRankingsDailyCategory
type GetRankingsDailyRequest ¶
type GetRankingsDailyRequest struct {
// Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`.
StartDate *string `queryParam:"style=form,explode=true,name=start_date"`
// End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400.
EndDate *string `queryParam:"style=form,explode=true,name=end_date"`
// Time grain of each row. `day` (default) returns the per-UTC-day series; `week` buckets by ISO week start; `month` buckets by month start. With `category` or `language_type` only `week` (default) and `month` are available — `day` is rejected with a 400 because those datasets are aggregated weekly. For those sampled datasets `period=month` buckets each week by its week-start month, so totals are approximate at month boundaries.
Period *Period `queryParam:"style=form,explode=true,name=period"`
// Restrict to models for a modality surface: `text` / `image_output` match output modality, `image` / `audio` match input modality, and `tool_calling` keeps only rows that recorded at least one tool call. Exact dataset — cannot be combined with `category` or `language_type`.
Modality *Modality `queryParam:"style=form,explode=true,name=modality"`
// Restrict to requests whose context length falls in this bucket (`1K`, `10K`, `100K`, `1M`, or `10M`). Exact dataset — cannot be combined with `category` or `language_type`.
ContextBucket *ContextBucket `queryParam:"style=form,explode=true,name=context_bucket"`
// Restrict to a use-case category (e.g. `programming`, `roleplay`). Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `language_type`.
Category *GetRankingsDailyCategory `queryParam:"style=form,explode=true,name=category"`
// Restrict to natural-language or programming-language tagged activity. Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `category`.
LanguageType *LanguageType `queryParam:"style=form,explode=true,name=language_type"`
}
func (*GetRankingsDailyRequest) GetCategory ¶ added in v0.5.13
func (g *GetRankingsDailyRequest) GetCategory() *GetRankingsDailyCategory
func (*GetRankingsDailyRequest) GetContextBucket ¶ added in v0.5.13
func (g *GetRankingsDailyRequest) GetContextBucket() *ContextBucket
func (*GetRankingsDailyRequest) GetEndDate ¶
func (g *GetRankingsDailyRequest) GetEndDate() *string
func (*GetRankingsDailyRequest) GetLanguageType ¶ added in v0.5.13
func (g *GetRankingsDailyRequest) GetLanguageType() *LanguageType
func (*GetRankingsDailyRequest) GetModality ¶ added in v0.5.13
func (g *GetRankingsDailyRequest) GetModality() *Modality
func (*GetRankingsDailyRequest) GetPeriod ¶ added in v0.5.13
func (g *GetRankingsDailyRequest) GetPeriod() *Period
func (*GetRankingsDailyRequest) GetStartDate ¶
func (g *GetRankingsDailyRequest) GetStartDate() *string
type GetTaskClassificationsRequest ¶
type GetTaskClassificationsRequest struct {
// Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
Window *Window `default:"7d" queryParam:"style=form,explode=true,name=window"`
}
func (*GetTaskClassificationsRequest) GetWindow ¶
func (g *GetTaskClassificationsRequest) GetWindow() *Window
func (GetTaskClassificationsRequest) MarshalJSON ¶
func (g GetTaskClassificationsRequest) MarshalJSON() ([]byte, error)
func (*GetTaskClassificationsRequest) UnmarshalJSON ¶
func (g *GetTaskClassificationsRequest) UnmarshalJSON(data []byte) error
type GetUserActivityRequest ¶
type GetUserActivityRequest struct {
// Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
Date *string `queryParam:"style=form,explode=true,name=date"`
// Filter by API key hash (SHA-256 hex string, as returned by the keys API).
APIKeyHash *string `queryParam:"style=form,explode=true,name=api_key_hash"`
// Filter by org member user ID. Only applicable for organization accounts.
UserID *string `queryParam:"style=form,explode=true,name=user_id"`
}
func (*GetUserActivityRequest) GetAPIKeyHash ¶
func (g *GetUserActivityRequest) GetAPIKeyHash() *string
func (*GetUserActivityRequest) GetDate ¶
func (g *GetUserActivityRequest) GetDate() *string
func (*GetUserActivityRequest) GetUserID ¶
func (g *GetUserActivityRequest) GetUserID() *string
type GetVideosRequest ¶
type GetVideosRequest struct {
JobID string `pathParam:"style=simple,explode=false,name=jobId"`
}
func (*GetVideosRequest) GetJobID ¶
func (g *GetVideosRequest) GetJobID() string
type GetWorkspaceRequest ¶
type GetWorkspaceRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*GetWorkspaceRequest) GetID ¶
func (g *GetWorkspaceRequest) GetID() string
type Granularity ¶
type Granularity struct {
// Human-readable label
DisplayLabel string `json:"display_label"`
// Granularity identifier
Name GranularityName `json:"name"`
}
func (*Granularity) GetDisplayLabel ¶
func (g *Granularity) GetDisplayLabel() string
func (*Granularity) GetName ¶
func (g *Granularity) GetName() GranularityName
type GranularityName ¶
type GranularityName string
GranularityName - Granularity identifier
const ( GranularityNameMinute GranularityName = "minute" GranularityNameHour GranularityName = "hour" GranularityNameDay GranularityName = "day" GranularityNameWeek GranularityName = "week" GranularityNameMonth GranularityName = "month" )
func (*GranularityName) IsExact ¶
func (e *GranularityName) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (GranularityName) ToPointer ¶
func (e GranularityName) ToPointer() *GranularityName
type Headquarters ¶
type Headquarters string
Headquarters - ISO 3166-1 Alpha-2 country code of the provider headquarters
const ( HeadquartersAd Headquarters = "AD" HeadquartersAe Headquarters = "AE" HeadquartersAf Headquarters = "AF" HeadquartersAg Headquarters = "AG" HeadquartersAi Headquarters = "AI" HeadquartersAl Headquarters = "AL" HeadquartersAm Headquarters = "AM" HeadquartersAo Headquarters = "AO" HeadquartersAq Headquarters = "AQ" HeadquartersAr Headquarters = "AR" HeadquartersAs Headquarters = "AS" HeadquartersAt Headquarters = "AT" HeadquartersAu Headquarters = "AU" HeadquartersAw Headquarters = "AW" HeadquartersAx Headquarters = "AX" HeadquartersAz Headquarters = "AZ" HeadquartersBa Headquarters = "BA" HeadquartersBb Headquarters = "BB" HeadquartersBd Headquarters = "BD" HeadquartersBe Headquarters = "BE" HeadquartersBf Headquarters = "BF" HeadquartersBg Headquarters = "BG" HeadquartersBh Headquarters = "BH" HeadquartersBi Headquarters = "BI" HeadquartersBj Headquarters = "BJ" HeadquartersBl Headquarters = "BL" HeadquartersBm Headquarters = "BM" HeadquartersBn Headquarters = "BN" HeadquartersBo Headquarters = "BO" HeadquartersBq Headquarters = "BQ" HeadquartersBr Headquarters = "BR" HeadquartersBs Headquarters = "BS" HeadquartersBt Headquarters = "BT" HeadquartersBv Headquarters = "BV" HeadquartersBw Headquarters = "BW" HeadquartersBy Headquarters = "BY" HeadquartersBz Headquarters = "BZ" HeadquartersCa Headquarters = "CA" HeadquartersCc Headquarters = "CC" HeadquartersCd Headquarters = "CD" HeadquartersCf Headquarters = "CF" HeadquartersCg Headquarters = "CG" HeadquartersCh Headquarters = "CH" HeadquartersCi Headquarters = "CI" HeadquartersCk Headquarters = "CK" HeadquartersCl Headquarters = "CL" HeadquartersCm Headquarters = "CM" HeadquartersCn Headquarters = "CN" HeadquartersCo Headquarters = "CO" HeadquartersCr Headquarters = "CR" HeadquartersCu Headquarters = "CU" HeadquartersCv Headquarters = "CV" HeadquartersCw Headquarters = "CW" HeadquartersCx Headquarters = "CX" HeadquartersCy Headquarters = "CY" HeadquartersCz Headquarters = "CZ" HeadquartersDe Headquarters = "DE" HeadquartersDj Headquarters = "DJ" HeadquartersDk Headquarters = "DK" HeadquartersDm Headquarters = "DM" HeadquartersDo Headquarters = "DO" HeadquartersDz Headquarters = "DZ" HeadquartersEc Headquarters = "EC" HeadquartersEe Headquarters = "EE" HeadquartersEg Headquarters = "EG" HeadquartersEh Headquarters = "EH" HeadquartersEr Headquarters = "ER" HeadquartersEs Headquarters = "ES" HeadquartersEt Headquarters = "ET" HeadquartersFi Headquarters = "FI" HeadquartersFj Headquarters = "FJ" HeadquartersFk Headquarters = "FK" HeadquartersFm Headquarters = "FM" HeadquartersFo Headquarters = "FO" HeadquartersFr Headquarters = "FR" HeadquartersGa Headquarters = "GA" HeadquartersGb Headquarters = "GB" HeadquartersGd Headquarters = "GD" HeadquartersGe Headquarters = "GE" HeadquartersGf Headquarters = "GF" HeadquartersGg Headquarters = "GG" HeadquartersGh Headquarters = "GH" HeadquartersGi Headquarters = "GI" HeadquartersGl Headquarters = "GL" HeadquartersGm Headquarters = "GM" HeadquartersGn Headquarters = "GN" HeadquartersGp Headquarters = "GP" HeadquartersGq Headquarters = "GQ" HeadquartersGr Headquarters = "GR" HeadquartersGs Headquarters = "GS" HeadquartersGt Headquarters = "GT" HeadquartersGu Headquarters = "GU" HeadquartersGw Headquarters = "GW" HeadquartersGy Headquarters = "GY" HeadquartersHk Headquarters = "HK" HeadquartersHm Headquarters = "HM" HeadquartersHn Headquarters = "HN" HeadquartersHr Headquarters = "HR" HeadquartersHt Headquarters = "HT" HeadquartersHu Headquarters = "HU" HeadquartersID Headquarters = "ID" HeadquartersIe Headquarters = "IE" HeadquartersIl Headquarters = "IL" HeadquartersIm Headquarters = "IM" HeadquartersIn Headquarters = "IN" HeadquartersIo Headquarters = "IO" HeadquartersIq Headquarters = "IQ" HeadquartersIr Headquarters = "IR" HeadquartersIs Headquarters = "IS" HeadquartersIt Headquarters = "IT" HeadquartersJe Headquarters = "JE" HeadquartersJm Headquarters = "JM" HeadquartersJo Headquarters = "JO" HeadquartersJp Headquarters = "JP" HeadquartersKe Headquarters = "KE" HeadquartersKg Headquarters = "KG" HeadquartersKh Headquarters = "KH" HeadquartersKi Headquarters = "KI" HeadquartersKm Headquarters = "KM" HeadquartersKn Headquarters = "KN" HeadquartersKp Headquarters = "KP" HeadquartersKr Headquarters = "KR" HeadquartersKw Headquarters = "KW" HeadquartersKy Headquarters = "KY" HeadquartersKz Headquarters = "KZ" HeadquartersLa Headquarters = "LA" HeadquartersLb Headquarters = "LB" HeadquartersLc Headquarters = "LC" HeadquartersLi Headquarters = "LI" HeadquartersLk Headquarters = "LK" HeadquartersLr Headquarters = "LR" HeadquartersLs Headquarters = "LS" HeadquartersLt Headquarters = "LT" HeadquartersLu Headquarters = "LU" HeadquartersLv Headquarters = "LV" HeadquartersLy Headquarters = "LY" HeadquartersMa Headquarters = "MA" HeadquartersMc Headquarters = "MC" HeadquartersMd Headquarters = "MD" HeadquartersMe Headquarters = "ME" HeadquartersMf Headquarters = "MF" HeadquartersMg Headquarters = "MG" HeadquartersMh Headquarters = "MH" HeadquartersMk Headquarters = "MK" HeadquartersMl Headquarters = "ML" HeadquartersMm Headquarters = "MM" HeadquartersMn Headquarters = "MN" HeadquartersMo Headquarters = "MO" HeadquartersMp Headquarters = "MP" HeadquartersMq Headquarters = "MQ" HeadquartersMr Headquarters = "MR" HeadquartersMs Headquarters = "MS" HeadquartersMt Headquarters = "MT" HeadquartersMu Headquarters = "MU" HeadquartersMv Headquarters = "MV" HeadquartersMw Headquarters = "MW" HeadquartersMx Headquarters = "MX" HeadquartersMy Headquarters = "MY" HeadquartersMz Headquarters = "MZ" HeadquartersNa Headquarters = "NA" HeadquartersNc Headquarters = "NC" HeadquartersNe Headquarters = "NE" HeadquartersNf Headquarters = "NF" HeadquartersNg Headquarters = "NG" HeadquartersNi Headquarters = "NI" HeadquartersNl Headquarters = "NL" HeadquartersNo Headquarters = "NO" HeadquartersNp Headquarters = "NP" HeadquartersNr Headquarters = "NR" HeadquartersNu Headquarters = "NU" HeadquartersNz Headquarters = "NZ" HeadquartersOm Headquarters = "OM" HeadquartersPa Headquarters = "PA" HeadquartersPe Headquarters = "PE" HeadquartersPf Headquarters = "PF" HeadquartersPg Headquarters = "PG" HeadquartersPh Headquarters = "PH" HeadquartersPk Headquarters = "PK" HeadquartersPl Headquarters = "PL" HeadquartersPm Headquarters = "PM" HeadquartersPn Headquarters = "PN" HeadquartersPr Headquarters = "PR" HeadquartersPs Headquarters = "PS" HeadquartersPt Headquarters = "PT" HeadquartersPw Headquarters = "PW" HeadquartersPy Headquarters = "PY" HeadquartersQa Headquarters = "QA" HeadquartersRe Headquarters = "RE" HeadquartersRo Headquarters = "RO" HeadquartersRs Headquarters = "RS" HeadquartersRu Headquarters = "RU" HeadquartersRw Headquarters = "RW" HeadquartersSa Headquarters = "SA" HeadquartersSb Headquarters = "SB" HeadquartersSc Headquarters = "SC" HeadquartersSd Headquarters = "SD" HeadquartersSe Headquarters = "SE" HeadquartersSg Headquarters = "SG" HeadquartersSh Headquarters = "SH" HeadquartersSi Headquarters = "SI" HeadquartersSj Headquarters = "SJ" HeadquartersSk Headquarters = "SK" HeadquartersSl Headquarters = "SL" HeadquartersSm Headquarters = "SM" HeadquartersSn Headquarters = "SN" HeadquartersSo Headquarters = "SO" HeadquartersSr Headquarters = "SR" HeadquartersSs Headquarters = "SS" HeadquartersSt Headquarters = "ST" HeadquartersSv Headquarters = "SV" HeadquartersSx Headquarters = "SX" HeadquartersSy Headquarters = "SY" HeadquartersSz Headquarters = "SZ" HeadquartersTc Headquarters = "TC" HeadquartersTd Headquarters = "TD" HeadquartersTf Headquarters = "TF" HeadquartersTg Headquarters = "TG" HeadquartersTh Headquarters = "TH" HeadquartersTj Headquarters = "TJ" HeadquartersTk Headquarters = "TK" HeadquartersTl Headquarters = "TL" HeadquartersTm Headquarters = "TM" HeadquartersTn Headquarters = "TN" HeadquartersTo Headquarters = "TO" HeadquartersTr Headquarters = "TR" HeadquartersTt Headquarters = "TT" HeadquartersTv Headquarters = "TV" HeadquartersTw Headquarters = "TW" HeadquartersTz Headquarters = "TZ" HeadquartersUa Headquarters = "UA" HeadquartersUg Headquarters = "UG" HeadquartersUm Headquarters = "UM" HeadquartersUs Headquarters = "US" HeadquartersUy Headquarters = "UY" HeadquartersUz Headquarters = "UZ" HeadquartersVa Headquarters = "VA" HeadquartersVc Headquarters = "VC" HeadquartersVe Headquarters = "VE" HeadquartersVg Headquarters = "VG" HeadquartersVi Headquarters = "VI" HeadquartersVn Headquarters = "VN" HeadquartersVu Headquarters = "VU" HeadquartersWf Headquarters = "WF" HeadquartersWs Headquarters = "WS" HeadquartersYe Headquarters = "YE" HeadquartersYt Headquarters = "YT" HeadquartersZa Headquarters = "ZA" HeadquartersZm Headquarters = "ZM" HeadquartersZw Headquarters = "ZW" )
func (*Headquarters) IsExact ¶
func (e *Headquarters) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (Headquarters) ToPointer ¶
func (e Headquarters) ToPointer() *Headquarters
type ImageURL ¶
type ImageURL struct {
URL string `json:"url"`
}
func (ImageURL) MarshalJSON ¶
func (*ImageURL) UnmarshalJSON ¶
type Input ¶
type Input struct {
Content []Content `json:"content"`
}
func (*Input) GetContent ¶
func (Input) MarshalJSON ¶
func (*Input) UnmarshalJSON ¶
type InputUnion ¶
type InputUnion struct {
Str *string `queryParam:"inline" union:"member"`
ArrayOfStr []string `queryParam:"inline" union:"member"`
ArrayOfNumber []float64 `queryParam:"inline" union:"member"`
ArrayOfArrayOfNumber [][]float64 `queryParam:"inline" union:"member"`
ArrayOfInput []Input `queryParam:"inline" union:"member"`
Type InputUnionType
}
InputUnion - Text, token, or multimodal input(s) to embed
func CreateInputUnionArrayOfArrayOfNumber ¶
func CreateInputUnionArrayOfArrayOfNumber(arrayOfArrayOfNumber [][]float64) InputUnion
func CreateInputUnionArrayOfInput ¶
func CreateInputUnionArrayOfInput(arrayOfInput []Input) InputUnion
func CreateInputUnionArrayOfNumber ¶
func CreateInputUnionArrayOfNumber(arrayOfNumber []float64) InputUnion
func CreateInputUnionArrayOfStr ¶
func CreateInputUnionArrayOfStr(arrayOfStr []string) InputUnion
func CreateInputUnionStr ¶
func CreateInputUnionStr(str string) InputUnion
func (InputUnion) MarshalJSON ¶
func (u InputUnion) MarshalJSON() ([]byte, error)
func (*InputUnion) UnmarshalJSON ¶
func (u *InputUnion) UnmarshalJSON(data []byte) error
type InputUnionType ¶
type InputUnionType string
const ( InputUnionTypeStr InputUnionType = "str" InputUnionTypeArrayOfStr InputUnionType = "arrayOfStr" InputUnionTypeArrayOfNumber InputUnionType = "arrayOfNumber" InputUnionTypeArrayOfArrayOfNumber InputUnionType = "arrayOfArrayOfNumber" InputUnionTypeArrayOfInput InputUnionType = "arrayOfInput" )
type LanguageType ¶ added in v0.5.13
type LanguageType string
LanguageType - Restrict to natural-language or programming-language tagged activity. Sourced from a sampled, upsampled dataset, so `total_tokens` is an estimate and is aggregated weekly (the trailing weekly bucket may include traffic past `end_date`). Cannot be combined with `modality`, `context_bucket`, or `category`.
const ( LanguageTypeNatural LanguageType = "natural" LanguageTypeProgramming LanguageType = "programming" )
func (*LanguageType) IsExact ¶ added in v0.5.13
func (e *LanguageType) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (LanguageType) ToPointer ¶ added in v0.5.13
func (e LanguageType) ToPointer() *LanguageType
type ListBYOKKeysRequest ¶
type ListBYOKKeysRequest struct {
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
// Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
// Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
Provider *Provider `queryParam:"style=form,explode=true,name=provider"`
}
func (*ListBYOKKeysRequest) GetLimit ¶
func (l *ListBYOKKeysRequest) GetLimit() *int64
func (*ListBYOKKeysRequest) GetOffset ¶
func (l *ListBYOKKeysRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (*ListBYOKKeysRequest) GetProvider ¶
func (l *ListBYOKKeysRequest) GetProvider() *Provider
func (*ListBYOKKeysRequest) GetWorkspaceID ¶
func (l *ListBYOKKeysRequest) GetWorkspaceID() *string
func (ListBYOKKeysRequest) MarshalJSON ¶ added in v0.5.18
func (l ListBYOKKeysRequest) MarshalJSON() ([]byte, error)
func (*ListBYOKKeysRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListBYOKKeysRequest) UnmarshalJSON(data []byte) error
type ListBYOKKeysResponse ¶
type ListBYOKKeysResponse struct {
Result components.ListBYOKKeysResponse
Next func() (*ListBYOKKeysResponse, error)
}
func (*ListBYOKKeysResponse) GetResult ¶
func (l *ListBYOKKeysResponse) GetResult() components.ListBYOKKeysResponse
type ListData ¶
type ListData struct {
// Total external BYOK usage (in USD) for the API key
ByokUsage float64 `json:"byok_usage"`
// External BYOK usage (in USD) for the current UTC day
ByokUsageDaily float64 `json:"byok_usage_daily"`
// External BYOK usage (in USD) for current UTC month
ByokUsageMonthly float64 `json:"byok_usage_monthly"`
// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
ByokUsageWeekly float64 `json:"byok_usage_weekly"`
// ISO 8601 timestamp of when the API key was created
CreatedAt string `json:"created_at"`
// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
CreatorUserID *string `json:"creator_user_id"`
// Whether the API key is disabled
Disabled bool `json:"disabled"`
// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
// Unique hash identifier for the API key
Hash string `json:"hash"`
// Whether to include external BYOK usage in the credit limit
IncludeByokInLimit bool `json:"include_byok_in_limit"`
// Human-readable label for the API key
Label string `json:"label"`
// Spending limit for the API key in USD
Limit *float64 `json:"limit"`
// Remaining spending limit in USD
LimitRemaining *float64 `json:"limit_remaining"`
// Type of limit reset for the API key
LimitReset *string `json:"limit_reset"`
// Name of the API key
Name string `json:"name"`
// ISO 8601 timestamp of when the API key was last updated
UpdatedAt *string `json:"updated_at"`
// Total OpenRouter credit usage (in USD) for the API key
Usage float64 `json:"usage"`
// OpenRouter credit usage (in USD) for the current UTC day
UsageDaily float64 `json:"usage_daily"`
// OpenRouter credit usage (in USD) for the current UTC month
UsageMonthly float64 `json:"usage_monthly"`
// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
UsageWeekly float64 `json:"usage_weekly"`
// The workspace ID this API key belongs to.
WorkspaceID string `json:"workspace_id"`
}
func (*ListData) GetByokUsage ¶
func (*ListData) GetByokUsageDaily ¶
func (*ListData) GetByokUsageMonthly ¶
func (*ListData) GetByokUsageWeekly ¶
func (*ListData) GetCreatedAt ¶
func (*ListData) GetCreatorUserID ¶
func (*ListData) GetDisabled ¶
func (*ListData) GetExpiresAt ¶
func (l *ListData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
func (*ListData) GetIncludeByokInLimit ¶
func (*ListData) GetLimitRemaining ¶
func (*ListData) GetLimitReset ¶
func (*ListData) GetUpdatedAt ¶
func (*ListData) GetUsageDaily ¶
func (*ListData) GetUsageMonthly ¶
func (*ListData) GetUsageWeekly ¶
func (*ListData) GetWorkspaceID ¶
func (ListData) MarshalJSON ¶
func (*ListData) UnmarshalJSON ¶
type ListEmbeddingsModelsRequest ¶ added in v0.5.18
type ListEmbeddingsModelsRequest struct {
// Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
Limit *int64 `default:"500" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListEmbeddingsModelsRequest) GetLimit ¶ added in v0.5.18
func (l *ListEmbeddingsModelsRequest) GetLimit() *int64
func (*ListEmbeddingsModelsRequest) GetOffset ¶ added in v0.5.18
func (l *ListEmbeddingsModelsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListEmbeddingsModelsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListEmbeddingsModelsRequest) MarshalJSON() ([]byte, error)
func (*ListEmbeddingsModelsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListEmbeddingsModelsRequest) UnmarshalJSON(data []byte) error
type ListEmbeddingsModelsResponse ¶ added in v0.5.18
type ListEmbeddingsModelsResponse struct {
Result components.ModelsListResponse
Next func() (*ListEmbeddingsModelsResponse, error)
}
func (*ListEmbeddingsModelsResponse) GetResult ¶ added in v0.5.18
func (l *ListEmbeddingsModelsResponse) GetResult() components.ModelsListResponse
type ListEndpointsRequest ¶
type ListEndpointsRequest struct {
// The author/organization of the model
Author string `pathParam:"style=simple,explode=false,name=author"`
// The model slug
Slug string `pathParam:"style=simple,explode=false,name=slug"`
}
func (*ListEndpointsRequest) GetAuthor ¶
func (l *ListEndpointsRequest) GetAuthor() string
func (*ListEndpointsRequest) GetSlug ¶
func (l *ListEndpointsRequest) GetSlug() string
type ListEndpointsResponse ¶
type ListEndpointsResponse struct {
// List of available endpoints for a model
Data components.ListEndpointsResponse `json:"data"`
}
ListEndpointsResponse - Returns a list of endpoints
func (*ListEndpointsResponse) GetData ¶
func (l *ListEndpointsResponse) GetData() components.ListEndpointsResponse
type ListEndpointsZdrResponse ¶
type ListEndpointsZdrResponse struct {
Data []components.PublicEndpoint `json:"data"`
}
ListEndpointsZdrResponse - Returns a list of endpoints
func (*ListEndpointsZdrResponse) GetData ¶
func (l *ListEndpointsZdrResponse) GetData() []components.PublicEndpoint
type ListFilesRequest ¶
type ListFilesRequest struct {
// Maximum number of files to return (1–1000).
Limit *int64 `queryParam:"style=form,explode=true,name=limit"`
// Opaque pagination cursor from a previous response.
Cursor *string `queryParam:"style=form,explode=true,name=cursor"`
// Workspace to scope the request to. Defaults to the caller’s default workspace.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
// OpenAI-style forward cursor: the id to list after.
After *string `queryParam:"style=form,explode=true,name=after"`
// Anthropic-style forward cursor: the id to list after.
AfterID *string `queryParam:"style=form,explode=true,name=after_id"`
// Anthropic-style reverse cursor. Not supported by OpenRouter storage.
BeforeID *string `queryParam:"style=form,explode=true,name=before_id"`
// Sort direction. Only `asc` is supported by OpenRouter storage.
Order *Order `queryParam:"style=form,explode=true,name=order"`
}
func (*ListFilesRequest) GetAfter ¶ added in v0.7.7
func (l *ListFilesRequest) GetAfter() *string
func (*ListFilesRequest) GetAfterID ¶ added in v0.7.7
func (l *ListFilesRequest) GetAfterID() *string
func (*ListFilesRequest) GetBeforeID ¶ added in v0.7.7
func (l *ListFilesRequest) GetBeforeID() *string
func (*ListFilesRequest) GetCursor ¶
func (l *ListFilesRequest) GetCursor() *string
func (*ListFilesRequest) GetLimit ¶
func (l *ListFilesRequest) GetLimit() *int64
func (*ListFilesRequest) GetOrder ¶ added in v0.7.7
func (l *ListFilesRequest) GetOrder() *Order
func (*ListFilesRequest) GetProvider ¶ added in v0.7.7
func (l *ListFilesRequest) GetProvider() *components.FileProvider
func (*ListFilesRequest) GetWorkspaceID ¶
func (l *ListFilesRequest) GetWorkspaceID() *string
type ListFilesResponse ¶
type ListFilesResponse struct {
Result components.FileListResponse
Next func() (*ListFilesResponse, error)
}
func (*ListFilesResponse) GetResult ¶
func (l *ListFilesResponse) GetResult() components.FileListResponse
func (*ListFilesResponse) GetResultAnthropic ¶ added in v0.7.7
func (l *ListFilesResponse) GetResultAnthropic() *components.AnthropicFileList
func (*ListFilesResponse) GetResultOpenai ¶ added in v0.7.7
func (l *ListFilesResponse) GetResultOpenai() *components.OpenAIFileList
func (*ListFilesResponse) GetResultOpenrouter ¶ added in v0.7.7
func (l *ListFilesResponse) GetResultOpenrouter() *components.OpenRouterFileList
type ListGenerationContentRequest ¶
type ListGenerationContentRequest struct {
// The generation ID
ID string `queryParam:"style=form,explode=true,name=id"`
}
func (*ListGenerationContentRequest) GetID ¶
func (l *ListGenerationContentRequest) GetID() string
type ListGuardrailKeyAssignmentsRequest ¶
type ListGuardrailKeyAssignmentsRequest struct {
// The unique identifier of the guardrail
ID string `pathParam:"style=simple,explode=false,name=id"`
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListGuardrailKeyAssignmentsRequest) GetID ¶
func (l *ListGuardrailKeyAssignmentsRequest) GetID() string
func (*ListGuardrailKeyAssignmentsRequest) GetLimit ¶
func (l *ListGuardrailKeyAssignmentsRequest) GetLimit() *int64
func (*ListGuardrailKeyAssignmentsRequest) GetOffset ¶
func (l *ListGuardrailKeyAssignmentsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListGuardrailKeyAssignmentsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListGuardrailKeyAssignmentsRequest) MarshalJSON() ([]byte, error)
func (*ListGuardrailKeyAssignmentsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListGuardrailKeyAssignmentsRequest) UnmarshalJSON(data []byte) error
type ListGuardrailKeyAssignmentsResponse ¶
type ListGuardrailKeyAssignmentsResponse struct {
Result components.ListKeyAssignmentsResponse
Next func() (*ListGuardrailKeyAssignmentsResponse, error)
}
func (*ListGuardrailKeyAssignmentsResponse) GetResult ¶
func (l *ListGuardrailKeyAssignmentsResponse) GetResult() components.ListKeyAssignmentsResponse
type ListGuardrailMemberAssignmentsRequest ¶
type ListGuardrailMemberAssignmentsRequest struct {
// The unique identifier of the guardrail
ID string `pathParam:"style=simple,explode=false,name=id"`
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListGuardrailMemberAssignmentsRequest) GetID ¶
func (l *ListGuardrailMemberAssignmentsRequest) GetID() string
func (*ListGuardrailMemberAssignmentsRequest) GetLimit ¶
func (l *ListGuardrailMemberAssignmentsRequest) GetLimit() *int64
func (*ListGuardrailMemberAssignmentsRequest) GetOffset ¶
func (l *ListGuardrailMemberAssignmentsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListGuardrailMemberAssignmentsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListGuardrailMemberAssignmentsRequest) MarshalJSON() ([]byte, error)
func (*ListGuardrailMemberAssignmentsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListGuardrailMemberAssignmentsRequest) UnmarshalJSON(data []byte) error
type ListGuardrailMemberAssignmentsResponse ¶
type ListGuardrailMemberAssignmentsResponse struct {
Result components.ListMemberAssignmentsResponse
Next func() (*ListGuardrailMemberAssignmentsResponse, error)
}
func (*ListGuardrailMemberAssignmentsResponse) GetResult ¶
func (l *ListGuardrailMemberAssignmentsResponse) GetResult() components.ListMemberAssignmentsResponse
type ListGuardrailsRequest ¶
type ListGuardrailsRequest struct {
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
// Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
}
func (*ListGuardrailsRequest) GetLimit ¶
func (l *ListGuardrailsRequest) GetLimit() *int64
func (*ListGuardrailsRequest) GetOffset ¶
func (l *ListGuardrailsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (*ListGuardrailsRequest) GetWorkspaceID ¶
func (l *ListGuardrailsRequest) GetWorkspaceID() *string
func (ListGuardrailsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListGuardrailsRequest) MarshalJSON() ([]byte, error)
func (*ListGuardrailsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListGuardrailsRequest) UnmarshalJSON(data []byte) error
type ListGuardrailsResponse ¶
type ListGuardrailsResponse struct {
Result components.ListGuardrailsResponse
Next func() (*ListGuardrailsResponse, error)
}
func (*ListGuardrailsResponse) GetResult ¶
func (l *ListGuardrailsResponse) GetResult() components.ListGuardrailsResponse
type ListImageModelEndpointsRequest ¶
type ListImageModelEndpointsRequest struct {
// Model author/organization
Author string `pathParam:"style=simple,explode=false,name=author"`
// Model slug
Slug string `pathParam:"style=simple,explode=false,name=slug"`
}
func (*ListImageModelEndpointsRequest) GetAuthor ¶
func (l *ListImageModelEndpointsRequest) GetAuthor() string
func (*ListImageModelEndpointsRequest) GetSlug ¶
func (l *ListImageModelEndpointsRequest) GetSlug() string
type ListKeyAssignmentsRequest ¶
type ListKeyAssignmentsRequest struct {
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListKeyAssignmentsRequest) GetLimit ¶
func (l *ListKeyAssignmentsRequest) GetLimit() *int64
func (*ListKeyAssignmentsRequest) GetOffset ¶
func (l *ListKeyAssignmentsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListKeyAssignmentsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListKeyAssignmentsRequest) MarshalJSON() ([]byte, error)
func (*ListKeyAssignmentsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListKeyAssignmentsRequest) UnmarshalJSON(data []byte) error
type ListKeyAssignmentsResponse ¶
type ListKeyAssignmentsResponse struct {
Result components.ListKeyAssignmentsResponse
Next func() (*ListKeyAssignmentsResponse, error)
}
func (*ListKeyAssignmentsResponse) GetResult ¶
func (l *ListKeyAssignmentsResponse) GetResult() components.ListKeyAssignmentsResponse
type ListMemberAssignmentsRequest ¶
type ListMemberAssignmentsRequest struct {
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListMemberAssignmentsRequest) GetLimit ¶
func (l *ListMemberAssignmentsRequest) GetLimit() *int64
func (*ListMemberAssignmentsRequest) GetOffset ¶
func (l *ListMemberAssignmentsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListMemberAssignmentsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListMemberAssignmentsRequest) MarshalJSON() ([]byte, error)
func (*ListMemberAssignmentsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListMemberAssignmentsRequest) UnmarshalJSON(data []byte) error
type ListMemberAssignmentsResponse ¶
type ListMemberAssignmentsResponse struct {
Result components.ListMemberAssignmentsResponse
Next func() (*ListMemberAssignmentsResponse, error)
}
func (*ListMemberAssignmentsResponse) GetResult ¶
func (l *ListMemberAssignmentsResponse) GetResult() components.ListMemberAssignmentsResponse
type ListModelsCountRequest ¶
type ListModelsCountRequest struct {
// Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text".
OutputModalities *string `queryParam:"style=form,explode=true,name=output_modalities"`
}
func (*ListModelsCountRequest) GetOutputModalities ¶
func (l *ListModelsCountRequest) GetOutputModalities() *string
type ListModelsUserRequest ¶ added in v0.5.18
type ListModelsUserRequest struct {
// Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
Limit *int64 `default:"500" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListModelsUserRequest) GetLimit ¶ added in v0.5.18
func (l *ListModelsUserRequest) GetLimit() *int64
func (*ListModelsUserRequest) GetOffset ¶ added in v0.5.18
func (l *ListModelsUserRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListModelsUserRequest) MarshalJSON ¶ added in v0.5.18
func (l ListModelsUserRequest) MarshalJSON() ([]byte, error)
func (*ListModelsUserRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListModelsUserRequest) UnmarshalJSON(data []byte) error
type ListModelsUserResponse ¶ added in v0.5.18
type ListModelsUserResponse struct {
Result components.ModelsListResponse
Next func() (*ListModelsUserResponse, error)
}
func (*ListModelsUserResponse) GetResult ¶ added in v0.5.18
func (l *ListModelsUserResponse) GetResult() components.ModelsListResponse
type ListModelsUserSecurity ¶
type ListModelsUserSecurity struct {
Bearer string `security:"scheme,type=http,subtype=bearer,name=Authorization,env=openrouter_bearer"`
}
func (*ListModelsUserSecurity) GetBearer ¶
func (l *ListModelsUserSecurity) GetBearer() string
type ListObservabilityDestinationsRequest ¶
type ListObservabilityDestinationsRequest struct {
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
// Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
}
func (*ListObservabilityDestinationsRequest) GetLimit ¶
func (l *ListObservabilityDestinationsRequest) GetLimit() *int64
func (*ListObservabilityDestinationsRequest) GetOffset ¶
func (l *ListObservabilityDestinationsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (*ListObservabilityDestinationsRequest) GetWorkspaceID ¶
func (l *ListObservabilityDestinationsRequest) GetWorkspaceID() *string
func (ListObservabilityDestinationsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListObservabilityDestinationsRequest) MarshalJSON() ([]byte, error)
func (*ListObservabilityDestinationsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListObservabilityDestinationsRequest) UnmarshalJSON(data []byte) error
type ListObservabilityDestinationsResponse ¶
type ListObservabilityDestinationsResponse struct {
Result components.ListObservabilityDestinationsResponse
Next func() (*ListObservabilityDestinationsResponse, error)
}
func (*ListObservabilityDestinationsResponse) GetResult ¶
func (l *ListObservabilityDestinationsResponse) GetResult() components.ListObservabilityDestinationsResponse
type ListOrganizationMembersData ¶
type ListOrganizationMembersData struct {
// Email address of the member
Email string `json:"email"`
// First name of the member
FirstName *string `json:"first_name"`
// User ID of the organization member
ID string `json:"id"`
// Last name of the member
LastName *string `json:"last_name"`
// Role of the member in the organization
Role Role `json:"role"`
}
func (*ListOrganizationMembersData) GetEmail ¶
func (l *ListOrganizationMembersData) GetEmail() string
func (*ListOrganizationMembersData) GetFirstName ¶
func (l *ListOrganizationMembersData) GetFirstName() *string
func (*ListOrganizationMembersData) GetID ¶
func (l *ListOrganizationMembersData) GetID() string
func (*ListOrganizationMembersData) GetLastName ¶
func (l *ListOrganizationMembersData) GetLastName() *string
func (*ListOrganizationMembersData) GetRole ¶
func (l *ListOrganizationMembersData) GetRole() Role
type ListOrganizationMembersRequest ¶
type ListOrganizationMembersRequest struct {
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListOrganizationMembersRequest) GetLimit ¶
func (l *ListOrganizationMembersRequest) GetLimit() *int64
func (*ListOrganizationMembersRequest) GetOffset ¶
func (l *ListOrganizationMembersRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListOrganizationMembersRequest) MarshalJSON ¶ added in v0.5.18
func (l ListOrganizationMembersRequest) MarshalJSON() ([]byte, error)
func (*ListOrganizationMembersRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListOrganizationMembersRequest) UnmarshalJSON(data []byte) error
type ListOrganizationMembersResponse ¶
type ListOrganizationMembersResponse struct {
Result ListOrganizationMembersResponseBody
Next func() (*ListOrganizationMembersResponse, error)
}
func (*ListOrganizationMembersResponse) GetResult ¶
func (l *ListOrganizationMembersResponse) GetResult() ListOrganizationMembersResponseBody
type ListOrganizationMembersResponseBody ¶
type ListOrganizationMembersResponseBody struct {
// List of organization members
Data []ListOrganizationMembersData `json:"data"`
// Total number of members in the organization
TotalCount int64 `json:"total_count"`
}
ListOrganizationMembersResponseBody - List of organization members
func (*ListOrganizationMembersResponseBody) GetData ¶
func (l *ListOrganizationMembersResponseBody) GetData() []ListOrganizationMembersData
func (*ListOrganizationMembersResponseBody) GetTotalCount ¶
func (l *ListOrganizationMembersResponseBody) GetTotalCount() int64
type ListPresetVersionsRequest ¶
type ListPresetVersionsRequest struct {
// URL-safe slug identifying the preset.
Slug string `pathParam:"style=simple,explode=false,name=slug"`
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListPresetVersionsRequest) GetLimit ¶
func (l *ListPresetVersionsRequest) GetLimit() *int64
func (*ListPresetVersionsRequest) GetOffset ¶
func (l *ListPresetVersionsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (*ListPresetVersionsRequest) GetSlug ¶
func (l *ListPresetVersionsRequest) GetSlug() string
func (ListPresetVersionsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListPresetVersionsRequest) MarshalJSON() ([]byte, error)
func (*ListPresetVersionsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListPresetVersionsRequest) UnmarshalJSON(data []byte) error
type ListPresetVersionsResponse ¶
type ListPresetVersionsResponse struct {
Result components.ListPresetVersionsResponse
Next func() (*ListPresetVersionsResponse, error)
}
func (*ListPresetVersionsResponse) GetResult ¶
func (l *ListPresetVersionsResponse) GetResult() components.ListPresetVersionsResponse
type ListPresetsRequest ¶
type ListPresetsRequest struct {
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListPresetsRequest) GetLimit ¶
func (l *ListPresetsRequest) GetLimit() *int64
func (*ListPresetsRequest) GetOffset ¶
func (l *ListPresetsRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListPresetsRequest) MarshalJSON ¶ added in v0.5.18
func (l ListPresetsRequest) MarshalJSON() ([]byte, error)
func (*ListPresetsRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListPresetsRequest) UnmarshalJSON(data []byte) error
type ListPresetsResponse ¶
type ListPresetsResponse struct {
Result components.ListPresetsResponse
Next func() (*ListPresetsResponse, error)
}
func (*ListPresetsResponse) GetResult ¶
func (l *ListPresetsResponse) GetResult() components.ListPresetsResponse
type ListProvidersData ¶
type ListProvidersData struct {
// ISO 3166-1 Alpha-2 country codes of the provider datacenter locations
Datacenters optionalnullable.OptionalNullable[[]Datacenter] `json:"datacenters,omitzero"`
// ISO 3166-1 Alpha-2 country code of the provider headquarters
Headquarters optionalnullable.OptionalNullable[Headquarters] `json:"headquarters,omitzero"`
// Display name of the provider
Name string `json:"name"`
// URL to the provider's privacy policy
PrivacyPolicyURL *string `json:"privacy_policy_url"`
// URL-friendly identifier for the provider
Slug string `json:"slug"`
// URL to the provider's status page
StatusPageURL optionalnullable.OptionalNullable[string] `json:"status_page_url,omitzero"`
// URL to the provider's terms of service
TermsOfServiceURL optionalnullable.OptionalNullable[string] `json:"terms_of_service_url,omitzero"`
}
func (*ListProvidersData) GetDatacenters ¶
func (l *ListProvidersData) GetDatacenters() optionalnullable.OptionalNullable[[]Datacenter]
func (*ListProvidersData) GetHeadquarters ¶
func (l *ListProvidersData) GetHeadquarters() optionalnullable.OptionalNullable[Headquarters]
func (*ListProvidersData) GetName ¶
func (l *ListProvidersData) GetName() string
func (*ListProvidersData) GetPrivacyPolicyURL ¶
func (l *ListProvidersData) GetPrivacyPolicyURL() *string
func (*ListProvidersData) GetSlug ¶
func (l *ListProvidersData) GetSlug() string
func (*ListProvidersData) GetStatusPageURL ¶
func (l *ListProvidersData) GetStatusPageURL() optionalnullable.OptionalNullable[string]
func (*ListProvidersData) GetTermsOfServiceURL ¶
func (l *ListProvidersData) GetTermsOfServiceURL() optionalnullable.OptionalNullable[string]
func (ListProvidersData) MarshalJSON ¶
func (l ListProvidersData) MarshalJSON() ([]byte, error)
func (*ListProvidersData) UnmarshalJSON ¶
func (l *ListProvidersData) UnmarshalJSON(data []byte) error
type ListProvidersResponse ¶
type ListProvidersResponse struct {
Data []ListProvidersData `json:"data"`
}
ListProvidersResponse - Returns a list of providers
func (*ListProvidersResponse) GetData ¶
func (l *ListProvidersResponse) GetData() []ListProvidersData
type ListRequest ¶
type ListRequest struct {
// Whether to include disabled API keys in the response
IncludeDisabled *bool `queryParam:"style=form,explode=true,name=include_disabled"`
// Number of API keys to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `queryParam:"style=form,explode=true,name=offset"`
// Filter API keys by workspace ID. By default, keys in the default workspace are returned.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
}
func (*ListRequest) GetIncludeDisabled ¶
func (l *ListRequest) GetIncludeDisabled() *bool
func (*ListRequest) GetOffset ¶
func (l *ListRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (*ListRequest) GetWorkspaceID ¶
func (l *ListRequest) GetWorkspaceID() *string
type ListResponse ¶
type ListResponse struct {
// List of API keys
Data []ListData `json:"data"`
}
ListResponse - List of API keys
func (*ListResponse) GetData ¶
func (l *ListResponse) GetData() []ListData
type ListVideosContentRequest ¶
type ListVideosContentRequest struct {
JobID string `pathParam:"style=simple,explode=false,name=jobId"`
Index optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=index"`
}
func (*ListVideosContentRequest) GetIndex ¶
func (l *ListVideosContentRequest) GetIndex() optionalnullable.OptionalNullable[int64]
func (*ListVideosContentRequest) GetJobID ¶
func (l *ListVideosContentRequest) GetJobID() string
func (ListVideosContentRequest) MarshalJSON ¶
func (l ListVideosContentRequest) MarshalJSON() ([]byte, error)
func (*ListVideosContentRequest) UnmarshalJSON ¶
func (l *ListVideosContentRequest) UnmarshalJSON(data []byte) error
type ListWorkspaceBudgetsRequest ¶
type ListWorkspaceBudgetsRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
}
func (*ListWorkspaceBudgetsRequest) GetID ¶
func (l *ListWorkspaceBudgetsRequest) GetID() string
type ListWorkspaceMembersRequest ¶ added in v0.5.11
type ListWorkspaceMembersRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListWorkspaceMembersRequest) GetID ¶ added in v0.5.11
func (l *ListWorkspaceMembersRequest) GetID() string
func (*ListWorkspaceMembersRequest) GetLimit ¶ added in v0.5.11
func (l *ListWorkspaceMembersRequest) GetLimit() *int64
func (*ListWorkspaceMembersRequest) GetOffset ¶ added in v0.5.11
func (l *ListWorkspaceMembersRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListWorkspaceMembersRequest) MarshalJSON ¶ added in v0.5.18
func (l ListWorkspaceMembersRequest) MarshalJSON() ([]byte, error)
func (*ListWorkspaceMembersRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListWorkspaceMembersRequest) UnmarshalJSON(data []byte) error
type ListWorkspaceMembersResponse ¶ added in v0.5.11
type ListWorkspaceMembersResponse struct {
Result components.ListWorkspaceMembersResponse
Next func() (*ListWorkspaceMembersResponse, error)
}
func (*ListWorkspaceMembersResponse) GetResult ¶ added in v0.5.11
func (l *ListWorkspaceMembersResponse) GetResult() components.ListWorkspaceMembersResponse
type ListWorkspacesRequest ¶
type ListWorkspacesRequest struct {
// Number of records to skip for pagination
Offset optionalnullable.OptionalNullable[int64] `default:"0" queryParam:"style=form,explode=true,name=offset"`
// Maximum number of records to return (max 100)
Limit *int64 `default:"50" queryParam:"style=form,explode=true,name=limit"`
}
func (*ListWorkspacesRequest) GetLimit ¶
func (l *ListWorkspacesRequest) GetLimit() *int64
func (*ListWorkspacesRequest) GetOffset ¶
func (l *ListWorkspacesRequest) GetOffset() optionalnullable.OptionalNullable[int64]
func (ListWorkspacesRequest) MarshalJSON ¶ added in v0.5.18
func (l ListWorkspacesRequest) MarshalJSON() ([]byte, error)
func (*ListWorkspacesRequest) UnmarshalJSON ¶ added in v0.5.18
func (l *ListWorkspacesRequest) UnmarshalJSON(data []byte) error
type ListWorkspacesResponse ¶
type ListWorkspacesResponse struct {
Result components.ListWorkspacesResponse
Next func() (*ListWorkspacesResponse, error)
}
func (*ListWorkspacesResponse) GetResult ¶
func (l *ListWorkspacesResponse) GetResult() components.ListWorkspacesResponse
type Metadata ¶
type Metadata struct {
QueryTimeMs float64 `json:"query_time_ms"`
RowCount int64 `json:"row_count"`
Truncated bool `json:"truncated"`
}
func (*Metadata) GetQueryTimeMs ¶
func (*Metadata) GetRowCount ¶
func (*Metadata) GetTruncated ¶
type Metric ¶
type Metric struct {
// How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)
DisplayFormat DisplayFormat `json:"display_format"`
// Human-readable label
DisplayLabel string `json:"display_label"`
// Whether this metric is a rate/ratio (averaged, not summed)
IsRate bool `json:"is_rate"`
// Metric identifier used in query requests
Name string `json:"name"`
}
func (*Metric) GetDisplayFormat ¶
func (m *Metric) GetDisplayFormat() DisplayFormat
func (*Metric) GetDisplayLabel ¶
type Modality ¶ added in v0.5.13
type Modality string
Modality - Restrict to models for a modality surface: `text` / `image_output` match output modality, `image` / `audio` match input modality, and `tool_calling` keeps only rows that recorded at least one tool call. Exact dataset — cannot be combined with `category` or `language_type`.
type Object ¶
type Object string
const (
ObjectList Object = "list"
)
func (*Object) UnmarshalJSON ¶
type ObjectEmbedding ¶
type ObjectEmbedding string
const (
ObjectEmbeddingEmbedding ObjectEmbedding = "embedding"
)
func (ObjectEmbedding) ToPointer ¶
func (e ObjectEmbedding) ToPointer() *ObjectEmbedding
func (*ObjectEmbedding) UnmarshalJSON ¶
func (e *ObjectEmbedding) UnmarshalJSON(data []byte) error
type Operator ¶
type Operator struct {
// Operator identifier used in filter definitions
Name OperatorName `json:"name"`
// Whether the operator expects a single value or an array
ValueType ValueType `json:"value_type"`
}
func (*Operator) GetName ¶
func (o *Operator) GetName() OperatorName
func (*Operator) GetValueType ¶
type OperatorName ¶
type OperatorName string
OperatorName - Operator identifier used in filter definitions
const ( OperatorNameEq OperatorName = "eq" OperatorNameNeq OperatorName = "neq" OperatorNameIn OperatorName = "in" OperatorNameNotIn OperatorName = "not_in" OperatorNameGt OperatorName = "gt" OperatorNameGte OperatorName = "gte" OperatorNameLt OperatorName = "lt" OperatorNameLte OperatorName = "lte" )
func (*OperatorName) IsExact ¶
func (e *OperatorName) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (OperatorName) ToPointer ¶
func (e OperatorName) ToPointer() *OperatorName
type Option ¶
func WithAcceptHeaderOverride ¶
func WithAcceptHeaderOverride(acceptHeaderOverride AcceptHeaderEnum) Option
func WithOperationTimeout ¶
WithOperationTimeout allows setting the request timeout applied for an operation.
func WithRetries ¶
WithRetries allows customizing the default retry configuration.
func WithServerURL ¶
WithServerURL allows providing an alternative server URL.
func WithSetHeaders ¶
WithSetHeaders takes a map of headers that will applied to a request. If the request contains headers that are in the map then they will be overwritten.
func WithTemplatedServerURL ¶
WithTemplatedServerURL allows providing an alternative server URL with templated parameters.
func WithURLOverride ¶
WithURLOverride allows overriding the URL.
type Order ¶ added in v0.7.7
type Order string
Order - Sort direction. Only `asc` is supported by OpenRouter storage.
type OrderBy ¶
type OrderBy struct {
Direction Direction `json:"direction"`
// Field to order by: a metric included in `metrics` (or "request_count", which may be ordered by without being requested), a requested dimension, or "date".
Field string `json:"field"`
}
func (*OrderBy) GetDirection ¶
type Period ¶ added in v0.5.13
type Period string
Period - Time grain of each row. `day` (default) returns the per-UTC-day series; `week` buckets by ISO week start; `month` buckets by month start. With `category` or `language_type` only `week` (default) and `month` are available — `day` is rejected with a 400 because those datasets are aggregated weekly. For those sampled datasets `period=month` buckets each week by its week-start month, so totals are approximate at month boundaries.
type PromptTokensDetails ¶
type PromptTokensDetails struct {
// Number of audio tokens in the input
AudioTokens *int64 `json:"audio_tokens,omitzero"`
// Number of file/document tokens in the input
FileTokens *int64 `json:"file_tokens,omitzero"`
// Number of image tokens in the input
ImageTokens *int64 `json:"image_tokens,omitzero"`
// Number of text tokens in the input
TextTokens *int64 `json:"text_tokens,omitzero"`
// Number of video tokens in the input
VideoTokens *int64 `json:"video_tokens,omitzero"`
}
PromptTokensDetails - Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.
func (*PromptTokensDetails) GetAudioTokens ¶
func (p *PromptTokensDetails) GetAudioTokens() *int64
func (*PromptTokensDetails) GetFileTokens ¶
func (p *PromptTokensDetails) GetFileTokens() *int64
func (*PromptTokensDetails) GetImageTokens ¶
func (p *PromptTokensDetails) GetImageTokens() *int64
func (*PromptTokensDetails) GetTextTokens ¶
func (p *PromptTokensDetails) GetTextTokens() *int64
func (*PromptTokensDetails) GetVideoTokens ¶
func (p *PromptTokensDetails) GetVideoTokens() *int64
type Provider ¶
type Provider string
Provider - Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
const ( ProviderAi21 Provider = "ai21" ProviderAionLabs Provider = "aion-labs" ProviderAkashml Provider = "akashml" ProviderAlibaba Provider = "alibaba" ProviderAmazonBedrock Provider = "amazon-bedrock" ProviderAmazonNova Provider = "amazon-nova" ProviderAmbient Provider = "ambient" ProviderAnthropic Provider = "anthropic" ProviderArceeAi Provider = "arcee-ai" ProviderAtlasCloud Provider = "atlas-cloud" ProviderAvian Provider = "avian" ProviderAzure Provider = "azure" ProviderBaidu Provider = "baidu" ProviderBaseten Provider = "baseten" ProviderBlackForestLabs Provider = "black-forest-labs" ProviderByteplus Provider = "byteplus" ProviderCerebras Provider = "cerebras" ProviderChutes Provider = "chutes" ProviderCirrascale Provider = "cirrascale" ProviderClarifai Provider = "clarifai" ProviderCloudflare Provider = "cloudflare" ProviderCohere Provider = "cohere" ProviderCoreweave Provider = "coreweave" ProviderCrusoe Provider = "crusoe" ProviderDarkbloom Provider = "darkbloom" ProviderDecart Provider = "decart" ProviderDeepgram Provider = "deepgram" ProviderDeepinfra Provider = "deepinfra" ProviderDeepseek Provider = "deepseek" ProviderDekallm Provider = "dekallm" ProviderDigitalocean Provider = "digitalocean" ProviderFeatherless Provider = "featherless" ProviderFireworks Provider = "fireworks" ProviderFishAudio Provider = "fish-audio" ProviderFriendli Provider = "friendli" ProviderGmicloud Provider = "gmicloud" ProviderGoogleAiStudio Provider = "google-ai-studio" ProviderGoogleVertex Provider = "google-vertex" ProviderGroq Provider = "groq" ProviderHeygen Provider = "heygen" ProviderInception Provider = "inception" ProviderInceptron Provider = "inceptron" ProviderInferactVllm Provider = "inferact-vllm" ProviderInferenceNet Provider = "inference-net" ProviderInfermatic Provider = "infermatic" ProviderInflection Provider = "inflection" ProviderIoNet Provider = "io-net" ProviderIonstream Provider = "ionstream" ProviderKrea Provider = "krea" ProviderLiquid Provider = "liquid" ProviderMancer Provider = "mancer" ProviderMara Provider = "mara" ProviderMeta Provider = "meta" ProviderMinimax Provider = "minimax" ProviderMistral Provider = "mistral" ProviderModal Provider = "modal" ProviderModelrun Provider = "modelrun" ProviderModular Provider = "modular" ProviderMoonshotai Provider = "moonshotai" ProviderMorph Provider = "morph" ProviderNcompass Provider = "ncompass" ProviderNebius Provider = "nebius" ProviderNexAgi Provider = "nex-agi" ProviderNextbit Provider = "nextbit" ProviderNovita Provider = "novita" ProviderNvidia Provider = "nvidia" ProviderOpenInference Provider = "open-inference" ProviderOpenai Provider = "openai" ProviderParasail Provider = "parasail" ProviderPerceptron Provider = "perceptron" ProviderPerplexity Provider = "perplexity" ProviderPhala Provider = "phala" ProviderPoolside Provider = "poolside" ProviderQuiver Provider = "quiver" ProviderRecraft Provider = "recraft" ProviderReka Provider = "reka" ProviderRelace Provider = "relace" ProviderRunway Provider = "runway" ProviderSailResearch Provider = "sail-research" ProviderSakana Provider = "sakana" ProviderSakanaAi Provider = "sakana-ai" ProviderSambanova Provider = "sambanova" ProviderSeed Provider = "seed" ProviderSiliconflow Provider = "siliconflow" ProviderSourceful Provider = "sourceful" ProviderStepfun Provider = "stepfun" ProviderStreamlake Provider = "streamlake" ProviderSwitchpoint Provider = "switchpoint" ProviderTencent Provider = "tencent" ProviderTenstorrent Provider = "tenstorrent" ProviderTogether Provider = "together" ProviderUpstage Provider = "upstage" ProviderVenice Provider = "venice" ProviderWafer Provider = "wafer" ProviderWandb Provider = "wandb" ProviderWandbLegacy Provider = "wandb-legacy" ProviderXai Provider = "xai" ProviderXiaomi Provider = "xiaomi" ProviderZAi Provider = "z-ai" )
type QueryAnalyticsData1 ¶
type QueryAnalyticsData1 struct {
}
QueryAnalyticsData1 - A row of analytics data with metric/dimension values
type QueryAnalyticsData2 ¶
type QueryAnalyticsData2 struct {
CachedAt *float64 `json:"cachedAt,omitzero"`
Data []QueryAnalyticsData1 `json:"data"`
Metadata Metadata `json:"metadata"`
// Warnings about filter resolution issues (e.g. unresolvable api_key_id hashes). The query still runs normally; these inform the caller that some filter values could not be resolved.
Warnings []string `json:"warnings,omitzero"`
}
func (*QueryAnalyticsData2) GetCachedAt ¶
func (q *QueryAnalyticsData2) GetCachedAt() *float64
func (*QueryAnalyticsData2) GetData ¶
func (q *QueryAnalyticsData2) GetData() []QueryAnalyticsData1
func (*QueryAnalyticsData2) GetMetadata ¶
func (q *QueryAnalyticsData2) GetMetadata() Metadata
func (*QueryAnalyticsData2) GetWarnings ¶
func (q *QueryAnalyticsData2) GetWarnings() []string
func (QueryAnalyticsData2) MarshalJSON ¶
func (q QueryAnalyticsData2) MarshalJSON() ([]byte, error)
func (*QueryAnalyticsData2) UnmarshalJSON ¶
func (q *QueryAnalyticsData2) UnmarshalJSON(data []byte) error
type QueryAnalyticsRequest ¶
type QueryAnalyticsRequest struct {
// Group results by custom classifier tags, breaking down metrics by the specified dimension values. Requires an active classifier on the workspace.
ClassifierDimensions *ClassifierDimensions `json:"classifier_dimensions,omitzero"`
// Filter results to generations with specific classifier tag values. Can be combined with classifier_dimensions (must use the same classifier_id) or used independently with standard dimensions.
ClassifierFilters *ClassifierFilters `json:"classifier_filters,omitzero"`
Dimensions []string `json:"dimensions,omitzero"`
Filters []Filter `json:"filters,omitzero"`
// Time granularity
Granularity *string `json:"granularity,omitzero"`
// Maximum rows per distinct combination of dimensions. When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified.
GroupLimit *int64 `json:"group_limit,omitzero"`
// Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations.
Limit *int64 `json:"limit,omitzero"`
Metrics []string `json:"metrics"`
OrderBy *OrderBy `json:"order_by,omitzero"`
TimeRange *TimeRange `json:"time_range,omitzero"`
}
func (*QueryAnalyticsRequest) GetClassifierDimensions ¶ added in v0.5.14
func (q *QueryAnalyticsRequest) GetClassifierDimensions() *ClassifierDimensions
func (*QueryAnalyticsRequest) GetClassifierFilters ¶ added in v0.5.14
func (q *QueryAnalyticsRequest) GetClassifierFilters() *ClassifierFilters
func (*QueryAnalyticsRequest) GetDimensions ¶
func (q *QueryAnalyticsRequest) GetDimensions() []string
func (*QueryAnalyticsRequest) GetFilters ¶
func (q *QueryAnalyticsRequest) GetFilters() []Filter
func (*QueryAnalyticsRequest) GetGranularity ¶
func (q *QueryAnalyticsRequest) GetGranularity() *string
func (*QueryAnalyticsRequest) GetGroupLimit ¶
func (q *QueryAnalyticsRequest) GetGroupLimit() *int64
func (*QueryAnalyticsRequest) GetLimit ¶
func (q *QueryAnalyticsRequest) GetLimit() *int64
func (*QueryAnalyticsRequest) GetMetrics ¶
func (q *QueryAnalyticsRequest) GetMetrics() []string
func (*QueryAnalyticsRequest) GetOrderBy ¶
func (q *QueryAnalyticsRequest) GetOrderBy() *OrderBy
func (*QueryAnalyticsRequest) GetTimeRange ¶
func (q *QueryAnalyticsRequest) GetTimeRange() *TimeRange
func (QueryAnalyticsRequest) MarshalJSON ¶
func (q QueryAnalyticsRequest) MarshalJSON() ([]byte, error)
func (*QueryAnalyticsRequest) UnmarshalJSON ¶
func (q *QueryAnalyticsRequest) UnmarshalJSON(data []byte) error
type QueryAnalyticsResponse ¶
type QueryAnalyticsResponse struct {
Data QueryAnalyticsData2 `json:"data"`
}
QueryAnalyticsResponse - Analytics query results
func (*QueryAnalyticsResponse) GetData ¶
func (q *QueryAnalyticsResponse) GetData() QueryAnalyticsData2
type RateLimit
deprecated
type RateLimit struct {
// Rate limit interval
Interval string `json:"interval"`
// Note about the rate limit
Note string `json:"note"`
// Number of requests allowed per interval
Requests int64 `json:"requests"`
}
RateLimit - Legacy rate limit information about a key. Will always return -1.
Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
func (*RateLimit) GetInterval ¶
func (*RateLimit) GetRequests ¶
type Region ¶
type Region string
Region - Filter to models with endpoints in the given data region. Currently only "eu" is supported.
const (
RegionEu Region = "eu"
)
func (*Region) UnmarshalJSON ¶
type ResponseFormat ¶ added in v0.5.13
type ResponseFormat string
ResponseFormat - The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).
const ( ResponseFormatJSON ResponseFormat = "json" ResponseFormatVerboseJSON ResponseFormat = "verbose_json" )
func (*ResponseFormat) IsExact ¶ added in v0.5.13
func (e *ResponseFormat) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (ResponseFormat) ToPointer ¶ added in v0.5.13
func (e ResponseFormat) ToPointer() *ResponseFormat
type Result ¶
type Result struct {
// The document object echoing the original input (text and/or image)
Document DocumentResponse `json:"document"`
// Index of the document in the original input list
Index int64 `json:"index"`
// Relevance score of the document to the query
RelevanceScore float64 `json:"relevance_score"`
}
Result - A single rerank result
func (*Result) GetDocument ¶
func (r *Result) GetDocument() DocumentResponse
func (*Result) GetRelevanceScore ¶
type Role ¶
type Role string
Role of the member in the organization
type SendChatCompletionRequestRequest ¶
type SendChatCompletionRequestRequest struct {
// Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
XOpenRouterMetadata *components.MetadataLevel `header:"style=simple,explode=false,name=X-OpenRouter-Metadata"`
ChatRequest components.ChatRequest `request:"mediaType=application/json"`
}
func (*SendChatCompletionRequestRequest) GetChatRequest ¶
func (s *SendChatCompletionRequestRequest) GetChatRequest() components.ChatRequest
func (*SendChatCompletionRequestRequest) GetXOpenRouterMetadata ¶
func (s *SendChatCompletionRequestRequest) GetXOpenRouterMetadata() *components.MetadataLevel
type SendChatCompletionRequestResponse ¶
type SendChatCompletionRequestResponse struct {
ChatResult *components.ChatResult `queryParam:"inline" union:"member"`
EventStream *stream.EventStream[components.ChatStreamingResponse] `queryParam:"inline" union:"member"`
Type SendChatCompletionRequestResponseType
}
func CreateSendChatCompletionRequestResponseChatResult ¶
func CreateSendChatCompletionRequestResponseChatResult(chatResult components.ChatResult) SendChatCompletionRequestResponse
func CreateSendChatCompletionRequestResponseEventStream ¶
func CreateSendChatCompletionRequestResponseEventStream(eventStream *stream.EventStream[components.ChatStreamingResponse]) SendChatCompletionRequestResponse
func (SendChatCompletionRequestResponse) MarshalJSON ¶
func (u SendChatCompletionRequestResponse) MarshalJSON() ([]byte, error)
func (*SendChatCompletionRequestResponse) UnmarshalJSON ¶
func (u *SendChatCompletionRequestResponse) UnmarshalJSON(data []byte) error
type SendChatCompletionRequestResponseType ¶
type SendChatCompletionRequestResponseType string
const ( SendChatCompletionRequestResponseTypeChatResult SendChatCompletionRequestResponseType = "ChatResult" SendChatCompletionRequestResponseTypeEventStream SendChatCompletionRequestResponseType = "event-stream" )
type Source ¶
type Source string
Source - Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.
type Subcategory ¶
type Subcategory string
Subcategory - Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent.
const ( SubcategoryCliAgent Subcategory = "cli-agent" SubcategoryIdeExtension Subcategory = "ide-extension" SubcategoryCloudAgent Subcategory = "cloud-agent" SubcategoryProgrammingApp Subcategory = "programming-app" SubcategoryNativeAppBuilder Subcategory = "native-app-builder" SubcategoryCreativeWriting Subcategory = "creative-writing" SubcategoryVideoGen Subcategory = "video-gen" SubcategoryImageGen Subcategory = "image-gen" SubcategoryAudioGen Subcategory = "audio-gen" SubcategoryRoleplay Subcategory = "roleplay" SubcategoryGame Subcategory = "game" SubcategoryWritingAssistant Subcategory = "writing-assistant" SubcategoryGeneralChat Subcategory = "general-chat" SubcategoryPersonalAgent Subcategory = "personal-agent" SubcategoryLegal Subcategory = "legal" )
func (*Subcategory) IsExact ¶
func (e *Subcategory) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (Subcategory) ToPointer ¶
func (e Subcategory) ToPointer() *Subcategory
type TaskType ¶
type TaskType string
TaskType - Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category.
type TimestampGranularities ¶ added in v0.5.13
type TimestampGranularities string
const ( TimestampGranularitiesWord TimestampGranularities = "word" TimestampGranularitiesSegment TimestampGranularities = "segment" )
func (*TimestampGranularities) IsExact ¶ added in v0.5.13
func (e *TimestampGranularities) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (TimestampGranularities) ToPointer ¶ added in v0.5.13
func (e TimestampGranularities) ToPointer() *TimestampGranularities
type TypeImageURL ¶
type TypeImageURL string
const (
TypeImageURLImageURL TypeImageURL = "image_url"
)
func (TypeImageURL) ToPointer ¶
func (e TypeImageURL) ToPointer() *TypeImageURL
func (*TypeImageURL) UnmarshalJSON ¶
func (e *TypeImageURL) UnmarshalJSON(data []byte) error
type TypeText ¶
type TypeText string
const (
TypeTextText TypeText = "text"
)
func (*TypeText) UnmarshalJSON ¶
type UpdateBYOKKeyRequest ¶
type UpdateBYOKKeyRequest struct {
// The BYOK credential ID (UUID).
ID string `pathParam:"style=simple,explode=false,name=id"`
UpdateBYOKKeyRequest components.UpdateBYOKKeyRequest `request:"mediaType=application/json"`
}
func (*UpdateBYOKKeyRequest) GetID ¶
func (u *UpdateBYOKKeyRequest) GetID() string
func (*UpdateBYOKKeyRequest) GetUpdateBYOKKeyRequest ¶
func (u *UpdateBYOKKeyRequest) GetUpdateBYOKKeyRequest() components.UpdateBYOKKeyRequest
type UpdateGuardrailRequest ¶
type UpdateGuardrailRequest struct {
// The unique identifier of the guardrail to update
ID string `pathParam:"style=simple,explode=false,name=id"`
UpdateGuardrailRequest components.UpdateGuardrailRequest `request:"mediaType=application/json"`
}
func (*UpdateGuardrailRequest) GetID ¶
func (u *UpdateGuardrailRequest) GetID() string
func (*UpdateGuardrailRequest) GetUpdateGuardrailRequest ¶
func (u *UpdateGuardrailRequest) GetUpdateGuardrailRequest() components.UpdateGuardrailRequest
type UpdateKeysData ¶
type UpdateKeysData struct {
// Total external BYOK usage (in USD) for the API key
ByokUsage float64 `json:"byok_usage"`
// External BYOK usage (in USD) for the current UTC day
ByokUsageDaily float64 `json:"byok_usage_daily"`
// External BYOK usage (in USD) for current UTC month
ByokUsageMonthly float64 `json:"byok_usage_monthly"`
// External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
ByokUsageWeekly float64 `json:"byok_usage_weekly"`
// ISO 8601 timestamp of when the API key was created
CreatedAt string `json:"created_at"`
// The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.
CreatorUserID *string `json:"creator_user_id"`
// Whether the API key is disabled
Disabled bool `json:"disabled"`
// ISO 8601 UTC timestamp when the API key expires, or null if no expiration
ExpiresAt optionalnullable.OptionalNullable[time.Time] `json:"expires_at,omitzero"`
// Unique hash identifier for the API key
Hash string `json:"hash"`
// Whether to include external BYOK usage in the credit limit
IncludeByokInLimit bool `json:"include_byok_in_limit"`
// Human-readable label for the API key
Label string `json:"label"`
// Spending limit for the API key in USD
Limit *float64 `json:"limit"`
// Remaining spending limit in USD
LimitRemaining *float64 `json:"limit_remaining"`
// Type of limit reset for the API key
LimitReset *string `json:"limit_reset"`
// Name of the API key
Name string `json:"name"`
// ISO 8601 timestamp of when the API key was last updated
UpdatedAt *string `json:"updated_at"`
// Total OpenRouter credit usage (in USD) for the API key
Usage float64 `json:"usage"`
// OpenRouter credit usage (in USD) for the current UTC day
UsageDaily float64 `json:"usage_daily"`
// OpenRouter credit usage (in USD) for the current UTC month
UsageMonthly float64 `json:"usage_monthly"`
// OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
UsageWeekly float64 `json:"usage_weekly"`
// The workspace ID this API key belongs to.
WorkspaceID string `json:"workspace_id"`
}
UpdateKeysData - The updated API key information
func (*UpdateKeysData) GetByokUsage ¶
func (u *UpdateKeysData) GetByokUsage() float64
func (*UpdateKeysData) GetByokUsageDaily ¶
func (u *UpdateKeysData) GetByokUsageDaily() float64
func (*UpdateKeysData) GetByokUsageMonthly ¶
func (u *UpdateKeysData) GetByokUsageMonthly() float64
func (*UpdateKeysData) GetByokUsageWeekly ¶
func (u *UpdateKeysData) GetByokUsageWeekly() float64
func (*UpdateKeysData) GetCreatedAt ¶
func (u *UpdateKeysData) GetCreatedAt() string
func (*UpdateKeysData) GetCreatorUserID ¶
func (u *UpdateKeysData) GetCreatorUserID() *string
func (*UpdateKeysData) GetDisabled ¶
func (u *UpdateKeysData) GetDisabled() bool
func (*UpdateKeysData) GetExpiresAt ¶
func (u *UpdateKeysData) GetExpiresAt() optionalnullable.OptionalNullable[time.Time]
func (*UpdateKeysData) GetHash ¶
func (u *UpdateKeysData) GetHash() string
func (*UpdateKeysData) GetIncludeByokInLimit ¶
func (u *UpdateKeysData) GetIncludeByokInLimit() bool
func (*UpdateKeysData) GetLabel ¶
func (u *UpdateKeysData) GetLabel() string
func (*UpdateKeysData) GetLimit ¶
func (u *UpdateKeysData) GetLimit() *float64
func (*UpdateKeysData) GetLimitRemaining ¶
func (u *UpdateKeysData) GetLimitRemaining() *float64
func (*UpdateKeysData) GetLimitReset ¶
func (u *UpdateKeysData) GetLimitReset() *string
func (*UpdateKeysData) GetName ¶
func (u *UpdateKeysData) GetName() string
func (*UpdateKeysData) GetUpdatedAt ¶
func (u *UpdateKeysData) GetUpdatedAt() *string
func (*UpdateKeysData) GetUsage ¶
func (u *UpdateKeysData) GetUsage() float64
func (*UpdateKeysData) GetUsageDaily ¶
func (u *UpdateKeysData) GetUsageDaily() float64
func (*UpdateKeysData) GetUsageMonthly ¶
func (u *UpdateKeysData) GetUsageMonthly() float64
func (*UpdateKeysData) GetUsageWeekly ¶
func (u *UpdateKeysData) GetUsageWeekly() float64
func (*UpdateKeysData) GetWorkspaceID ¶
func (u *UpdateKeysData) GetWorkspaceID() string
func (UpdateKeysData) MarshalJSON ¶
func (u UpdateKeysData) MarshalJSON() ([]byte, error)
func (*UpdateKeysData) UnmarshalJSON ¶
func (u *UpdateKeysData) UnmarshalJSON(data []byte) error
type UpdateKeysLimitReset ¶
type UpdateKeysLimitReset string
UpdateKeysLimitReset - New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
const ( UpdateKeysLimitResetDaily UpdateKeysLimitReset = "daily" UpdateKeysLimitResetWeekly UpdateKeysLimitReset = "weekly" UpdateKeysLimitResetMonthly UpdateKeysLimitReset = "monthly" )
func (*UpdateKeysLimitReset) IsExact ¶
func (e *UpdateKeysLimitReset) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (UpdateKeysLimitReset) ToPointer ¶
func (e UpdateKeysLimitReset) ToPointer() *UpdateKeysLimitReset
type UpdateKeysRequest ¶
type UpdateKeysRequest struct {
// The hash identifier of the API key to update
Hash string `pathParam:"style=simple,explode=false,name=hash"`
RequestBody UpdateKeysRequestBody `request:"mediaType=application/json"`
}
func (*UpdateKeysRequest) GetHash ¶
func (u *UpdateKeysRequest) GetHash() string
func (*UpdateKeysRequest) GetRequestBody ¶
func (u *UpdateKeysRequest) GetRequestBody() UpdateKeysRequestBody
type UpdateKeysRequestBody ¶
type UpdateKeysRequestBody struct {
// Whether to disable the API key
Disabled *bool `json:"disabled,omitzero"`
// Whether to include BYOK usage in the limit
IncludeByokInLimit *bool `json:"include_byok_in_limit,omitzero"`
// New spending limit for the API key in USD
Limit optionalnullable.OptionalNullable[float64] `json:"limit,omitzero"`
// New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
LimitReset optionalnullable.OptionalNullable[UpdateKeysLimitReset] `json:"limit_reset,omitzero"`
// New name for the API key
Name *string `json:"name,omitzero"`
}
func (*UpdateKeysRequestBody) GetDisabled ¶
func (u *UpdateKeysRequestBody) GetDisabled() *bool
func (*UpdateKeysRequestBody) GetIncludeByokInLimit ¶
func (u *UpdateKeysRequestBody) GetIncludeByokInLimit() *bool
func (*UpdateKeysRequestBody) GetLimit ¶
func (u *UpdateKeysRequestBody) GetLimit() optionalnullable.OptionalNullable[float64]
func (*UpdateKeysRequestBody) GetLimitReset ¶
func (u *UpdateKeysRequestBody) GetLimitReset() optionalnullable.OptionalNullable[UpdateKeysLimitReset]
func (*UpdateKeysRequestBody) GetName ¶
func (u *UpdateKeysRequestBody) GetName() *string
type UpdateKeysResponse ¶
type UpdateKeysResponse struct {
// The updated API key information
Data UpdateKeysData `json:"data"`
}
UpdateKeysResponse - API key updated successfully
func (*UpdateKeysResponse) GetData ¶
func (u *UpdateKeysResponse) GetData() UpdateKeysData
type UpdateObservabilityDestinationRequest ¶
type UpdateObservabilityDestinationRequest struct {
// The destination ID (UUID).
ID string `pathParam:"style=simple,explode=false,name=id"`
UpdateObservabilityDestinationRequest components.UpdateObservabilityDestinationRequest `request:"mediaType=application/json"`
}
func (*UpdateObservabilityDestinationRequest) GetID ¶
func (u *UpdateObservabilityDestinationRequest) GetID() string
func (*UpdateObservabilityDestinationRequest) GetUpdateObservabilityDestinationRequest ¶
func (u *UpdateObservabilityDestinationRequest) GetUpdateObservabilityDestinationRequest() components.UpdateObservabilityDestinationRequest
type UpdateWorkspaceRequest ¶
type UpdateWorkspaceRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
UpdateWorkspaceRequest components.UpdateWorkspaceRequest `request:"mediaType=application/json"`
}
func (*UpdateWorkspaceRequest) GetID ¶
func (u *UpdateWorkspaceRequest) GetID() string
func (*UpdateWorkspaceRequest) GetUpdateWorkspaceRequest ¶
func (u *UpdateWorkspaceRequest) GetUpdateWorkspaceRequest() components.UpdateWorkspaceRequest
type UploadFileFile ¶ added in v0.5.13
type UploadFileFile struct {
FileName string `multipartForm:"name=fileName"`
// This field accepts []byte data or io.Reader implementations, such as *os.File.
Content any `multipartForm:"content"`
}
func (*UploadFileFile) GetContent ¶ added in v0.5.13
func (u *UploadFileFile) GetContent() any
func (*UploadFileFile) GetFileName ¶ added in v0.5.13
func (u *UploadFileFile) GetFileName() string
type UploadFileRequest ¶
type UploadFileRequest struct {
// Workspace to scope the request to. Defaults to the caller’s default workspace.
WorkspaceID *string `queryParam:"style=form,explode=true,name=workspace_id"`
// Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
Provider *components.FileProvider `queryParam:"style=form,explode=true,name=provider"`
RequestBody UploadFileRequestBody `request:"mediaType=multipart/form-data"`
}
func (*UploadFileRequest) GetProvider ¶ added in v0.7.7
func (u *UploadFileRequest) GetProvider() *components.FileProvider
func (*UploadFileRequest) GetRequestBody ¶
func (u *UploadFileRequest) GetRequestBody() UploadFileRequestBody
func (*UploadFileRequest) GetWorkspaceID ¶
func (u *UploadFileRequest) GetWorkspaceID() *string
type UploadFileRequestBody ¶
type UploadFileRequestBody struct {
File UploadFileFile `multipartForm:"file,name=file"`
}
func (*UploadFileRequestBody) GetFile ¶
func (u *UploadFileRequestBody) GetFile() UploadFileFile
type UpsertWorkspaceBudgetRequest ¶
type UpsertWorkspaceBudgetRequest struct {
// The workspace ID (UUID) or slug
ID string `pathParam:"style=simple,explode=false,name=id"`
// Budget reset interval. Use "lifetime" for a one-time budget that never resets.
Interval components.WorkspaceBudgetInterval `pathParam:"style=simple,explode=false,name=interval"`
UpsertWorkspaceBudgetRequest components.UpsertWorkspaceBudgetRequest `request:"mediaType=application/json"`
}
func (*UpsertWorkspaceBudgetRequest) GetID ¶
func (u *UpsertWorkspaceBudgetRequest) GetID() string
func (*UpsertWorkspaceBudgetRequest) GetInterval ¶
func (u *UpsertWorkspaceBudgetRequest) GetInterval() components.WorkspaceBudgetInterval
func (*UpsertWorkspaceBudgetRequest) GetUpsertWorkspaceBudgetRequest ¶
func (u *UpsertWorkspaceBudgetRequest) GetUpsertWorkspaceBudgetRequest() components.UpsertWorkspaceBudgetRequest
type UsageLimitType ¶
type UsageLimitType string
UsageLimitType - Optional credit limit reset interval. When set, the credit limit resets on this interval.
const ( UsageLimitTypeDaily UsageLimitType = "daily" UsageLimitTypeWeekly UsageLimitType = "weekly" UsageLimitTypeMonthly UsageLimitType = "monthly" )
func (*UsageLimitType) IsExact ¶
func (e *UsageLimitType) IsExact() bool
IsExact returns true if the value matches a known enum value, false otherwise.
func (UsageLimitType) ToPointer ¶
func (e UsageLimitType) ToPointer() *UsageLimitType
type Value1 ¶
type Value1 struct {
Str *string `queryParam:"inline" union:"member"`
Number *float64 `queryParam:"inline" union:"member"`
ArrayOfValue2 []Value2 `queryParam:"inline" union:"member"`
Type Value1Type
}
Value1 - Filter value (scalar or array depending on operator). Several dimensions are enriched in responses (returned as human-readable labels), but filters must use the underlying ID: `api_key_id` — numeric ID (from generation metadata) or key hash (64-char hex from GET /api/v1/keys, resolved server-side); `user` — Clerk user ID (e.g. "user_abc123"), not the display name; `workspace` — workspace UUID, not the workspace name; `app` — numeric app ID, not the app title; `model` — permaslug (e.g. "openai/gpt-4o"), not the display name. Other dimensions (provider, origin, country, etc.) are not enriched and accept the value as returned.
func CreateValue1Number ¶
func CreateValue1Str ¶
func (Value1) MarshalJSON ¶
func (*Value1) UnmarshalJSON ¶
type Value1Type ¶
type Value1Type string
const ( Value1TypeStr Value1Type = "str" Value1TypeNumber Value1Type = "number" Value1TypeArrayOfValue2 Value1Type = "arrayOfValue2" )
type Value2 ¶
type Value2 struct {
Str *string `queryParam:"inline" union:"member"`
Number *float64 `queryParam:"inline" union:"member"`
Type Value2Type
}
func CreateValue2Number ¶
func CreateValue2Str ¶
func (Value2) MarshalJSON ¶
func (*Value2) UnmarshalJSON ¶
type Value2Type ¶
type Value2Type string
const ( Value2TypeStr Value2Type = "str" Value2TypeNumber Value2Type = "number" )
type ValueClassifierFilters ¶ added in v0.5.14
type ValueClassifierFilters struct {
Str *string `queryParam:"inline" union:"member"`
Number *float64 `queryParam:"inline" union:"member"`
Type ValueClassifierFiltersType
}
func CreateValueClassifierFiltersNumber ¶ added in v0.5.14
func CreateValueClassifierFiltersNumber(number float64) ValueClassifierFilters
func CreateValueClassifierFiltersStr ¶ added in v0.5.14
func CreateValueClassifierFiltersStr(str string) ValueClassifierFilters
func (ValueClassifierFilters) MarshalJSON ¶ added in v0.5.14
func (u ValueClassifierFilters) MarshalJSON() ([]byte, error)
func (*ValueClassifierFilters) UnmarshalJSON ¶ added in v0.5.14
func (u *ValueClassifierFilters) UnmarshalJSON(data []byte) error
type ValueClassifierFiltersType ¶ added in v0.5.14
type ValueClassifierFiltersType string
const ( ValueClassifierFiltersTypeStr ValueClassifierFiltersType = "str" ValueClassifierFiltersTypeNumber ValueClassifierFiltersType = "number" )
type ValueType ¶
type ValueType string
ValueType - Whether the operator expects a single value or an array
Source Files
¶
- bulkaddworkspacemembers.go
- bulkassignkeystoguardrail.go
- bulkassignmemberstoguardrail.go
- bulkremoveworkspacemembers.go
- bulkunassignkeysfromguardrail.go
- bulkunassignmembersfromguardrail.go
- createaudiotranscriptionsmultipart.go
- createauthkeyscode.go
- createembeddings.go
- createimages.go
- createkeys.go
- createpresetschatcompletions.go
- createpresetsmessages.go
- createpresetsresponses.go
- creatererank.go
- createresponses.go
- deletebyokkey.go
- deletefile.go
- deleteguardrail.go
- deletekeys.go
- deleteobservabilitydestination.go
- deleteworkspace.go
- deleteworkspacebudget.go
- downloadfilecontent.go
- exchangeauthcodeforapikey.go
- getanalyticsmeta.go
- getapprankings.go
- getbenchmarks.go
- getbyokkey.go
- getcredits.go
- getcurrentkey.go
- getfilemetadata.go
- getgeneration.go
- getguardrail.go
- getkey.go
- getmodel.go
- getmodels.go
- getobservabilitydestination.go
- getpreset.go
- getpresetversion.go
- getrankingsdaily.go
- gettaskclassifications.go
- getuseractivity.go
- getvideos.go
- getworkspace.go
- list.go
- listbyokkeys.go
- listembeddingsmodels.go
- listendpoints.go
- listendpointszdr.go
- listfiles.go
- listgenerationcontent.go
- listguardrailkeyassignments.go
- listguardrailmemberassignments.go
- listguardrails.go
- listimagemodelendpoints.go
- listkeyassignments.go
- listmemberassignments.go
- listmodelscount.go
- listmodelsuser.go
- listobservabilitydestinations.go
- listorganizationmembers.go
- listpresets.go
- listpresetversions.go
- listproviders.go
- listvideoscontent.go
- listworkspacebudgets.go
- listworkspacemembers.go
- listworkspaces.go
- options.go
- queryanalytics.go
- sendchatcompletionrequest.go
- updatebyokkey.go
- updateguardrail.go
- updatekeys.go
- updateobservabilitydestination.go
- updateworkspace.go
- uploadfile.go
- upsertworkspacebudget.go