import type { AssetEmbeddedMetadata, AssetMetadataEmbeddingStatus, AssetSpeechMetadata, PlaydropSpeechVoiceId } from '@playdrop/types';
export type TextGenerationMode = 'text';
export type TextGenerationSize = 'small' | 'medium' | 'large';
export type ImageAttachment = {
    data?: string;
    mimeType?: string;
    url?: string;
};
export type AiImageAspectRatio = '1:1' | '3:4' | '9:16' | '4:3' | '16:9';
export type AiImageSize = '1K' | '4K';
export type GenerationBilling = {
    amount: number;
    paidBy: 'USER' | 'CREATOR';
    generationId: string;
    transactionId: number;
    creditBalance: number;
};
export type GeneratedAssetRef = {
    creatorUsername: string;
    assetName: string;
    revision: number;
    versionId: number;
    subcategory: string;
    ref: string;
};
export type GenerateTextResponse = {
    input: string;
    output: string;
    model: string;
    totalTokenCount: number | null;
    promptTokenCount: number | null;
    responseTokenCount: number | null;
    maxOutputTokens: number | null;
    size: TextGenerationSize;
    mode: TextGenerationMode;
    cost: number;
    createdAt: string;
    billing: GenerationBilling;
};
export type GenerateTextOptions = {
    signal?: AbortSignal;
    size?: TextGenerationSize;
    mode?: TextGenerationMode;
    system?: string;
};
export type GenerateImageResponse = {
    input: string;
    imageUrl: string;
    imageMimeType: string;
    inputImageUrls: string[];
    aspectRatio: AiImageAspectRatio;
    imageSize: AiImageSize;
    metadata?: unknown;
    embeddedMetadata?: AssetEmbeddedMetadata;
    embeddingStatus?: AssetMetadataEmbeddingStatus;
    metadataUrl?: string | null;
    generatedAssetDisplayName?: string | null;
    generatedAssetDescription?: string | null;
    model: string;
    mode: 'image';
    cost: number;
    totalTokenCount: number | null;
    promptTokenCount: number | null;
    responseTokenCount: number | null;
    generatedAsset?: GeneratedAssetRef;
    createdAt: string;
    billing: GenerationBilling;
};
export type GenerateJsonResponse = {
    input: string;
    system: string | null;
    output: unknown;
    raw: string;
    size: TextGenerationSize;
    model: string;
    mode: 'json';
    cost: number;
    totalTokenCount: number | null;
    promptTokenCount: number | null;
    responseTokenCount: number | null;
    responseSchemaProvided: boolean;
    responseSchema: unknown;
    createdAt: string;
    billing: GenerationBilling;
};
export type GenerateMusicResponse = {
    input: string;
    durationMs: number | null;
    forceInstrumental: boolean;
    audioUrl: string;
    audioMimeType: string;
    coverUrl: string | null;
    coverMimeType: string | null;
    providerSongMetadata: ElevenLabsSongMetadata | null;
    providerCompositionPlan: ElevenLabsCompositionPlan | null;
    providerWordTimestamps: ElevenLabsWordTimestamp[] | null;
    embeddedMetadata?: AssetEmbeddedMetadata;
    embeddingStatus?: AssetMetadataEmbeddingStatus;
    metadataUrl?: string | null;
    model: string;
    mode: 'music';
    cost: number;
    generatedAsset?: GeneratedAssetRef;
    createdAt: string;
    billing: GenerationBilling;
};
export type GenerateSfxResponse = {
    input: string;
    durationSeconds: number | null;
    loop: boolean;
    audioUrl: string;
    audioMimeType: string;
    coverUrl: string | null;
    coverMimeType: string | null;
    embeddedMetadata?: AssetEmbeddedMetadata;
    embeddingStatus?: AssetMetadataEmbeddingStatus;
    metadataUrl?: string | null;
    model: string;
    mode: 'sfx';
    cost: number;
    generatedAsset?: GeneratedAssetRef;
    createdAt: string;
    billing: GenerationBilling;
};
export type GenerateSpeechResponse = {
    input: string;
    audioUrl: string;
    audioMimeType: string;
    previewUrl: string | null;
    previewMimeType: string | null;
    speech: AssetSpeechMetadata;
    embeddedMetadata?: AssetEmbeddedMetadata;
    embeddingStatus?: AssetMetadataEmbeddingStatus;
    metadataUrl?: string | null;
    model: string;
    mode: 'speech';
    cost: number;
    generatedAsset?: GeneratedAssetRef;
    createdAt: string;
    billing: GenerationBilling;
};
export type GenerateVideoResponse = {
    input: string;
    durationSeconds: 4 | 8;
    aspectRatio: '16:9' | '9:16';
    resolution: '720p';
    videoUrl: string;
    videoMimeType: string;
    thumbnailUrl: string | null;
    embeddedMetadata?: AssetEmbeddedMetadata;
    embeddingStatus?: AssetMetadataEmbeddingStatus;
    metadataUrl?: string | null;
    generatedAssetDisplayName?: string | null;
    generatedAssetDescription?: string | null;
    model: string;
    mode: 'video';
    cost: number;
    generatedAsset?: GeneratedAssetRef;
    createdAt: string;
    billing: GenerationBilling;
};
export type GenerateModel3DResponse = {
    input: string;
    sourceMode: 'TEXT' | 'IMAGE';
    topology: 'triangle' | 'quad';
    targetPolycount: number;
    shouldRemesh: boolean;
    shouldTexture: boolean;
    modelUrl: string;
    modelMimeType: string;
    thumbnailUrl: string | null;
    modelSizeBytes?: number | null;
    metadata?: unknown;
    embeddedMetadata?: AssetEmbeddedMetadata;
    embeddingStatus?: AssetMetadataEmbeddingStatus;
    metadataUrl?: string | null;
    generatedAssetDisplayName?: string | null;
    generatedAssetDescription?: string | null;
    model: string;
    mode: 'model_3d';
    cost: number;
    generatedAsset?: GeneratedAssetRef;
    createdAt: string;
    billing: GenerationBilling;
};
export type GenerateAssetModality = 'IMAGE' | 'MUSIC' | 'SFX' | 'SPEECH' | 'VIDEO' | 'MODEL_3D';
export type GenerateAssetRequest = {
    modality: GenerateAssetModality;
    input: string;
    signal?: AbortSignal;
    assetName?: string;
    assetDisplayName?: string;
    assetDescription?: string;
    assetVisibility?: 'PRIVATE' | 'PUBLIC';
    assetSubcategory?: string;
    attachAppVersionId?: number;
    remixAssetVersionRef?: string;
    suggestedTagRefs?: string[];
    image1?: ImageAttachment | null;
    image2?: ImageAttachment | null;
    durationMs?: number;
    forceInstrumental?: boolean;
    durationSeconds?: number;
    loop?: boolean;
    coverPrompt?: string;
    speechVoice?: PlaydropSpeechVoiceId;
    speechProviderVoiceId?: string;
    aspectRatio?: AiImageAspectRatio;
    imageSize?: AiImageSize;
    resolution?: '720p';
    sourceMode?: 'TEXT' | 'IMAGE';
    topology?: 'triangle' | 'quad';
    targetPolycount?: number;
    shouldRemesh?: boolean;
    shouldTexture?: boolean;
};
export type GenerationJobStatus = 'PENDING' | 'RUNNING' | 'SUCCESS' | 'FAILURE';
export declare const GENERATION_JOB_ETA_BASELINE_SECONDS: Record<GenerateAssetModality, number>;
export type GenerationJobRecord = {
    id: string;
    modality: GenerateAssetModality;
    status: GenerationJobStatus;
    requestPrompt: string;
    requestPayload: unknown;
    resultData: unknown | null;
    errorCode: string | null;
    errorMessage: string | null;
    linkedGenerationId: string | null;
    createdAt: string;
    updatedAt: string;
    startedAt: string | null;
    completedAt: string | null;
    failedAt: string | null;
    progressPercent: number | null;
    etaSecondsRemaining: number | null;
};
export type CreateGenerationJobRequest = GenerateAssetRequest;
export type CreateGenerationJobResponse = {
    job: GenerationJobRecord;
};
export type GetGenerationJobResponse = {
    job: GenerationJobRecord;
};
type PaginationMeta = {
    limit: number;
    offset: number;
    count: number;
    hasMore: boolean;
};
type GenerationRecordBase = {
    id: string;
    type: 'text' | 'json' | 'image' | 'music' | 'sfx' | 'speech' | 'video' | 'model_3d';
    cost: number;
    createdAt: string;
};
export type ElevenLabsSongMetadata = {
    title?: string | null;
    description?: string | null;
    genres: string[];
    languages: string[];
    isExplicit?: boolean | null;
};
export type ElevenLabsWordTimestamp = {
    word: string;
    startMs: number;
    endMs: number;
};
export type ElevenLabsCompositionPlanSection = {
    sectionName?: string;
    durationMs?: number;
    positiveLocalStyles?: string[];
    negativeLocalStyles?: string[];
    lines?: string[];
};
export type ElevenLabsCompositionPlan = {
    durationMs?: number;
    positiveGlobalStyles?: string[];
    negativeGlobalStyles?: string[];
    sections?: ElevenLabsCompositionPlanSection[];
};
export type ListTextGenerationRecord = GenerationRecordBase & {
    type: 'text';
    systemPrompt: string | null;
    inputPrompt: string;
    outputText: string;
    modelSize: TextGenerationSize;
};
export type ListJsonGenerationRecord = GenerationRecordBase & {
    type: 'json';
    systemPrompt: string | null;
    inputPrompt: string;
    outputSchema: unknown;
    outputJSON: unknown;
};
export type ListImageGenerationRecord = GenerationRecordBase & {
    type: 'image';
    inputPrompt: string;
    inputImages: string[];
    outputImage: string | null;
    aspectRatio: AiImageAspectRatio | null;
    imageSize: AiImageSize | null;
    metadata?: unknown;
    embeddedMetadata?: AssetEmbeddedMetadata | null;
    embeddingStatus?: AssetMetadataEmbeddingStatus | null;
    metadataUrl?: string | null;
    generatedAssetDisplayName?: string | null;
    generatedAssetDescription?: string | null;
    generatedAsset?: GeneratedAssetRef;
};
export type ListMusicGenerationRecord = GenerationRecordBase & {
    type: 'music';
    inputPrompt: string;
    durationMs: number | null;
    forceInstrumental: boolean;
    audioUrl: string | null;
    audioMimeType: string | null;
    coverUrl: string | null;
    coverMimeType: string | null;
    providerSongMetadata: ElevenLabsSongMetadata | null;
    providerCompositionPlan: ElevenLabsCompositionPlan | null;
    providerWordTimestamps: ElevenLabsWordTimestamp[] | null;
    embeddedMetadata?: AssetEmbeddedMetadata | null;
    embeddingStatus?: AssetMetadataEmbeddingStatus | null;
    metadataUrl?: string | null;
    generatedAsset?: GeneratedAssetRef;
};
export type ListSfxGenerationRecord = GenerationRecordBase & {
    type: 'sfx';
    inputPrompt: string;
    durationSeconds: number | null;
    loop: boolean;
    audioUrl: string | null;
    audioMimeType: string | null;
    coverUrl: string | null;
    coverMimeType: string | null;
    embeddedMetadata?: AssetEmbeddedMetadata | null;
    embeddingStatus?: AssetMetadataEmbeddingStatus | null;
    metadataUrl?: string | null;
    generatedAsset?: GeneratedAssetRef;
};
export type ListSpeechGenerationRecord = GenerationRecordBase & {
    type: 'speech';
    inputPrompt: string;
    audioUrl: string | null;
    audioMimeType: string | null;
    previewUrl: string | null;
    previewMimeType: string | null;
    speech: AssetSpeechMetadata | null;
    embeddedMetadata?: AssetEmbeddedMetadata | null;
    embeddingStatus?: AssetMetadataEmbeddingStatus | null;
    metadataUrl?: string | null;
    generatedAsset?: GeneratedAssetRef;
};
export type ListVideoGenerationRecord = GenerationRecordBase & {
    type: 'video';
    inputPrompt: string;
    durationSeconds: number | null;
    aspectRatio: string | null;
    resolution: string | null;
    videoUrl: string | null;
    videoMimeType: string | null;
    thumbnailUrl: string | null;
    metadata?: unknown;
    embeddedMetadata?: AssetEmbeddedMetadata | null;
    embeddingStatus?: AssetMetadataEmbeddingStatus | null;
    metadataUrl?: string | null;
    generatedAssetDisplayName?: string | null;
    generatedAssetDescription?: string | null;
    generatedAsset?: GeneratedAssetRef;
};
export type ListModel3DGenerationRecord = GenerationRecordBase & {
    type: 'model_3d';
    inputPrompt: string;
    sourceMode: 'TEXT' | 'IMAGE' | null;
    topology: 'triangle' | 'quad' | null;
    targetPolycount: number | null;
    shouldRemesh: boolean;
    shouldTexture: boolean;
    modelUrl: string | null;
    modelMimeType: string | null;
    thumbnailUrl: string | null;
    modelSizeBytes?: number | null;
    metadata?: unknown;
    embeddedMetadata?: AssetEmbeddedMetadata | null;
    embeddingStatus?: AssetMetadataEmbeddingStatus | null;
    metadataUrl?: string | null;
    generatedAssetDisplayName?: string | null;
    generatedAssetDescription?: string | null;
    generatedAsset?: GeneratedAssetRef;
};
export type GenerationRecord = ListTextGenerationRecord | ListJsonGenerationRecord | ListImageGenerationRecord | ListMusicGenerationRecord | ListSfxGenerationRecord | ListSpeechGenerationRecord | ListVideoGenerationRecord | ListModel3DGenerationRecord;
export type ListGenerationsOptions = {
    signal?: AbortSignal;
    type?: 'text' | 'json' | 'image' | 'music' | 'sfx' | 'speech' | 'video' | 'model_3d';
    limit?: number;
    offset?: number;
};
export type ListGenerationsResponse = {
    generations: GenerationRecord[];
    pagination: PaginationMeta;
};
export type ListGenerationJobsOptions = {
    signal?: AbortSignal;
    modality?: GenerateAssetModality;
    status?: GenerationJobStatus;
    limit?: number;
    offset?: number;
};
export type ListGenerationJobsResponse = {
    jobs: GenerationJobRecord[];
    pagination: PaginationMeta;
};
export type GenerateJsonOptions = {
    signal?: AbortSignal;
    size?: TextGenerationSize;
    system?: string;
    responseJsonSchema?: string;
};
export type AiClientConfig = {
    baseUrl?: string;
    fetchImpl?: typeof fetch;
    tokenProvider?: () => string | null | Promise<string | null>;
    clientHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
};
export interface AiClient {
    generateText(input: string, options?: GenerateTextOptions): Promise<GenerateTextResponse>;
    createGenerationJob(request: CreateGenerationJobRequest): Promise<CreateGenerationJobResponse>;
    getGenerationJob(id: string, options?: {
        signal?: AbortSignal;
    }): Promise<GetGenerationJobResponse>;
    listGenerationJobs(options?: ListGenerationJobsOptions): Promise<ListGenerationJobsResponse>;
    deleteGenerationJob(id: string, options?: {
        signal?: AbortSignal;
    }): Promise<void>;
    generateJson(input: string, options?: GenerateJsonOptions): Promise<GenerateJsonResponse>;
    listGenerations(options?: ListGenerationsOptions): Promise<ListGenerationsResponse>;
    listDiscoverGenerations(options?: ListGenerationsOptions): Promise<ListGenerationsResponse>;
}
export declare function createAiClient(config?: AiClientConfig): AiClient;
export {};
//# sourceMappingURL=index.d.ts.map