### Create Product from URL (POST /v2/product) Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/URLtoVideo Creates a product entry by providing a product URL. The response includes a product_id that must be saved for later video generation. ```bash curl --request POST \ --url 'https://api.jogg.ai/v2/product' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://www.amazon.com/dp/B0BX7CVAPM" }' ``` ```json { "code": 0, "msg": "Success", "data": { "product_id": "NTIzMzc0NjI5", "name": "Owala FreeSip Water Bottle", "description": "Insulated stainless steel water bottle...", "media": [ { "type": 1, "url": "https://m.media-amazon.com/images/I/61wvLrf8ekL._AC_SL1500_.jpg" } ] } } ``` -------------------------------- ### curl GET /v2/voices Source: https://docs.jogg.ai/api-reference/v2/Voice/GetVoices Example curl command to retrieve the list of available voices. Requires an API key in the x-api-key header. ```bash curl --request GET \ --url 'https://api.jogg.ai/v2/voices' \ --header 'x-api-key: YOUR_API_KEY' ``` -------------------------------- ### Video Translation Workflow Sequence Diagram Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/VideoTranslation Mermaid sequence diagram illustrating the 4-step asynchronous workflow: get resources, submit translation, processing, and retrieve result. Shows API endpoints like GET /video_translate/target_languages, GET /voices?language=spanish, POST /video_translate/, and GET /video_translate/{id}, with webhook callback option. ```mermaid sequenceDiagram participant Client participant API participant Queue Note over Client: 1. Get Resources Client->>API: GET /video_translate/target_languages API-->>Client: Supported languages list Client->>API: GET /voices?language=spanish API-->>Client: Available voices Note over Client,Queue: 2. Submit Translation Client->>API: POST /video_translate/ API->>Queue: Queue translation task API-->>Client: 200 OK {video_translate_id} Note over Queue: 3. Processing (10-20 min) Queue->>Queue: Translate audio & generate voiceover Note over Client,Queue: 4. Get Result alt Webhook Queue->>Client: POST /callback {video_url, subtitle_url} else Polling Client->>API: GET /video_translate/{id} API-->>Client: {status, url, subtitle_url} end ``` -------------------------------- ### Create Video with Template - Basic Text and Script Variables Source: https://docs.jogg.ai/api-reference/v2/Video/CreateVideoWithTemplate Basic example that creates a video from a template using text and script variables. Requires a valid API key and template ID. The request includes optional avatar and voice settings. ```bash curl -X POST 'https://api.jogg.ai/v2/create_video_with_template' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "template_id": 1234, "video_name": "Product Showcase", "avatar_id": 127, "avatar_type": 0, "voice_language": "english", "voice_id": "en-US-ChristopherNeural", "variables": [ { "type": "text", "name": "product_name", "properties": { "content": "Amazing Smart Watch" } }, { "type": "script", "name": "script", "properties": { "content": "Check out our amazing product!" } } ] }' ``` -------------------------------- ### Create Product Manually (POST /v2/product) Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/URLtoVideo Creates a product entry by providing manual product details instead of a URL. The response includes a product_id that must be saved for later video generation. ```bash curl --request POST \ --url 'https://api.jogg.ai/v2/product' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "name": "Premium Yoga Mat", "description": "Eco-friendly yoga mat with superior grip and cushioning. Perfect for all yoga styles.", "target_audience": "Yoga enthusiasts and fitness lovers", "media": [ { "type": 1, "name": "product-image.jpg", "url": "https://example.com/yoga-mat.jpg", "description": "Main product image" } ] }' ``` -------------------------------- ### cURL: Get custom avatars Source: https://docs.jogg.ai/api-reference/v2/Avatar/CustomAvatarsGet Retrieves the list of custom avatars by sending a GET request to /v2/avatars/custom with an API key header. ```bash curl --request GET \ --url 'https://api.jogg.ai/v2/avatars/custom' \ --header 'x-api-key: YOUR_API_KEY' ``` -------------------------------- ### Generate Video from Product (POST /v2/create_video_from_product) Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/URLtoVideo Generates a video from a previously created product. The response includes a product_video_id that must be saved to check status later. ```bash curl --request POST \ --url 'https://api.jogg.ai/v2/create_video_from_product' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "product_id": "NTIzMzc0NjI5", "visual_style": "Simple Product Switch", "video_spec": { "aspect_ratio": "portrait", "length": "30", "caption": true }, "avatar": { "id": 81, "type": 0 }, "voice": { "id": "en-US-ChristopherNeural" }, "audio": {}, "script": { "style": "Storytime", "language": "english" } }' ``` ```json { "code": 0, "msg": "Success", "data": { "product_video_id": "pv_123456" } } ``` -------------------------------- ### Get Supported Languages with curl Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/VideoTranslation Optional description if provided. Use this GET request to list all available target languages for video translation. ```bash curl --request GET \ --url 'https://api.jogg.ai/v2/video_translate/target_languages' \ --header 'x-api-key: YOUR_API_KEY' ``` -------------------------------- ### GET /v2/video_translate/target_languages Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/VideoTranslation Lists all available target languages supported by the video translation API. Use this endpoint to get the list of languages you can translate your video into. ```APIDOC ## GET /v2/video_translate/target_languages ### Description List all available target languages for video translation. ### Method GET ### Endpoint https://api.jogg.ai/v2/video_translate/target_languages ### Parameters #### Headers - **x-api-key** (string) - Required - Your API key for authentication. ### Request Example ```bash curl --request GET \ --url 'https://api.jogg.ai/v2/video_translate/target_languages' \ --header 'x-api-key: YOUR_API_KEY' ``` ### Response #### Success Response (200) - **code** (integer) - Response code, 0 indicates success. - **msg** (string) - Response message. - **data.languages** (array of strings) - List of supported target languages. #### Response Example ```json { "code": 0, "msg": "Success", "data": { "languages": ["spanish", "french", "german", "japanese", "chinese", "korean"] } } ``` ``` -------------------------------- ### Create video with audio (POST /v2/create_video_from_avatar) Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/AvatarVideosWithAudioSource Step 3: Create a video from an avatar using the uploaded audio. Set voice.type to "audio" and voice.audio_url to the asset_url from the upload response. The response contains the video_id for status polling. Video length automatically matches audio duration. ```bash curl --request POST \ --url 'https://api.jogg.ai/v2/create_video_from_avatar' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "avatar": { "avatar_id": 81, "avatar_type": 0 }, "voice": { "type": "audio", "voice_id": "en-US-ChristopherNeural", "audio_url": "https://res.jogg.ai/assets/aud_abc123.mp3" }, "aspect_ratio": "portrait", "screen_style": 1, "caption": false }' ``` ```json { "code": 0, "msg": "Success", "data": { "video_id": "video_123456" } } ``` -------------------------------- ### Get Supported Languages - JSON Response Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/VideoTranslation Response from the get supported languages endpoint. The data object contains a list of available language codes. ```json { "code": 0, "msg": "Success", "data": { "languages": ["spanish", "french", "german", "japanese", "chinese", "korean"] } } ``` -------------------------------- ### Create Video with Template - Image Variable (URL) Source: https://docs.jogg.ai/api-reference/v2/Video/CreateVideoWithTemplate Example that uses an image variable with a URL to provide the product image. The script variable supplies the narration text. Requires a valid API key and template ID. ```bash curl -X POST 'https://api.jogg.ai/v2/create_video_with_template' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "template_id": 1234, "voice_language": "english", "variables": [ { "type": "image", "name": "product_image", "properties": { "url": "https://example.com/product.jpg" } }, { "type": "script", "name": "script", "properties": { "content": "Check out this amazing product!" } } ] }' ``` -------------------------------- ### POST /v2/video/create-from-product Source: https://docs.jogg.ai/api-reference/v2/Video/CreateVideoFromProduct Creates a product video with the specified avatar, voice, audio, and script. Returns the video ID and generation status. ```APIDOC ## POST /v2/video/create-from-product ### Description Creates a product video using the provided avatar, voice, audio, and script configuration. Returns the video ID and processing status. ### Method POST ### Endpoint /v2/video/create-from-product ### Parameters #### Request Body - **avatar** (object) - Required - Avatar configuration - **id** (integer) - Required - Avatar ID - **type** (integer) - Required - Source type of the avatar: 0 - Public avatar, 1 - Custom avatar - **voice** (object) - Optional - Voice configuration - **id** (string) - Optional - Voice ID for text-to-speech - **audio** (object) - Optional - Audio configuration - **music_id** (integer) - Optional - Background music ID (minimum: 0) - **script** (object) - Required - Script configuration - **style** (string) - Required - Script writing style (enum: Don't Worry, Storytime, Discovery, Data, Top 3 reasons, Light marketing) - **language** (string) - Required - Script generation language - **override_script** (string) - Optional - Override the auto-generated script - **webhook_url** (string) - Optional - Webhook URL for status notifications (format: uri) ### Request Example { "avatar": { "id": 1, "type": 0 }, "voice": { "id": "en-US-ChristopherNeural" }, "audio": { "music_id": 13 }, "script": { "style": "Storytime", "language": "english" }, "override_script": "Your custom script", "webhook_url": "https://example.com/webhook" } ### Response #### Success Response (200) - **code** (integer) - Business status code: 0 - Success, 10104 - Record not found, 10105 - Invalid API key, 18020 - Insufficient credit, 18025 - No permission to call APIs, 40000 - Parameter error, 50000 - System error - **msg** (string) - Response message - **data** (object) - Response data - **video_id** (string) - Created product video ID - **status** (string) - Video generation status (enum: processing, completed, failed) #### Response Example { "code": 0, "msg": "Success", "data": { "video_id": "video_789", "status": "processing" } } ### Authentication API key required. Pass in header: `x-api-key`. ``` -------------------------------- ### OpenAPI Specification for Get Remaining Quota Source: https://docs.jogg.ai/api-reference/v2/User/GetRemainingQuota OpenAPI specification for the GET /v2/user/remaining_quota endpoint. It defines the endpoint, authentication via x-api-key header, and the response schema with remaining_quota. ```yaml openapi: 3.0.1 info: title: JoggAI OpenAPI v2 description: > JoggAI OpenAPI v2 provides a comprehensive suite of endpoints for creating and managing AI-powered video content. ## Authentication All API requests require authentication using an API key provided in the `x-api-key` header. ## Base URL Production: https://api.jogg.ai/v2 ## Rate Limiting API calls are subject to rate limiting based on your subscription plan. ## Error Handling All endpoints return standard HTTP status codes along with detailed error messages in the response body. version: 2.0.0 license: name: MIT servers: - url: https://api.jogg.ai description: Production server security: - apiKeyAuth: [] tags: - name: Video description: Video creation and management operations - name: Avatar description: Avatar management and creation operations - name: Voice description: Voice and timbre management operations - name: Asset description: Asset management including music, scripts, and uploads - name: Template description: Template management operations - name: Product description: Product management operations - name: User description: User account operations - name: Webhook description: Webhook endpoint management for event notifications paths: /v2/user/remaining_quota: get: tags: - User summary: Get Remaining Quota description: Retrieve the remaining JoggAI API quota for the authenticated user responses: '200': description: Success content: application/json: schema: allOf: - $ref: '#/components/schemas/BaseResponse' - type: object properties: data: type: object properties: remaining_quota: type: number description: Remaining API quota example: 1000 components: schemas: BaseResponse: type: object required: - code - msg properties: code: type: integer description: | Business status code: * 0 - Success * 10104 - Record not found * 10105 - Invalid API key * 18020 - Insufficient credit * 18025 - No permission to call APIs * 40000 - Parameter error * 50000 - System error example: 0 msg: type: string description: Response message example: Success securitySchemes: apiKeyAuth: type: apiKey in: header name: x-api-key description: API key for authentication. Obtain your key from the JoggAI dashboard. ``` -------------------------------- ### OpenAPI YAML for GET /v2/voices Source: https://docs.jogg.ai/api-reference/v2/Voice/GetVoices OpenAPI 3.0.1 specification for the GET /v2/voices endpoint, including authentication, base URL, rate limiting, error handling, and response schema. ```yaml openapi: 3.0.1 info: title: JoggAI OpenAPI v2 description: > JoggAI OpenAPI v2 provides a comprehensive suite of endpoints for creating and managing AI-powered video content. ## Authentication All API requests require authentication using an API key provided in the `x-api-key` header. ## Base URL Production: https://api.jogg.ai/v2 ## Rate Limiting API calls are subject to rate limiting based on your subscription plan. ## Error Handling All endpoints return standard HTTP status codes along with detailed error messages in the response body. version: 2.0.0 license: name: MIT servers: - url: https://api.jogg.ai description: Production server security: - apiKeyAuth: [] tags: - name: Video description: Video creation and management operations - name: Avatar description: Avatar management and creation operations - name: Voice description: Voice and timbre management operations - name: Asset description: Asset management including music, scripts, and uploads - name: Template description: Template management operations - name: Product description: Product management operations - name: User description: User account operations - name: Webhook description: Webhook endpoint management for event notifications paths: /v2/voices: get: tags: - Voice summary: Get Timbre List description: > Retrieve a list of available timbres with filtering options. Supports pagination and various filters including gender, language, age, and use case. parameters: - $ref: '#/components/parameters/PageParam' - $ref: '#/components/parameters/PageSizeParam' - name: gender in: query description: Filter by gender schema: type: string enum: - female - male - name: language in: query description: Filter by language schema: type: string example: english - name: age in: query description: Filter by age group schema: type: string enum: - young - middle_aged - old - name: use_case in: query description: Filter by use case schema: type: string example: narrative_story responses: '200': description: Success content: application/json: schema: allOf: - $ref: '#/components/schemas/BaseResponse' - type: object properties: data: type: object properties: voices: type: array description: List of voices items: type: object properties: name: type: string description: Voice name example: Christopher voice_id: type: string description: Voice identifier example: en-US-ChristopherNeural audio_url: type: string description: Voice sample audio URL format: uri example: https://res.jogg.ai/voice-sample.mp3 language: type: string description: Voice language example: english gender: type: string description: Voice gender enum: ``` -------------------------------- ### curl POST /v2/create_video_from_product Source: https://docs.jogg.ai/api-reference/v2/Video/CreateVideoFromProduct Creates a video from a product ID with specified avatar, voice, and aspect ratio. Requires an API key in the x-api-key header. The product_id must be obtained from a prior product creation step. ```bash curl -X POST 'https://api.jogg.ai/v2/create_video_from_product' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "product_id": "prod_abc123", "avatar_id": 127, "voice_id": "en-US-ChristopherNeural", "aspect_ratio": 1 }' ``` -------------------------------- ### GET /v2/voices Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/VideoTranslation Retrieves the available voices for a specified target language. Use this endpoint to get voice options for your translation, and save the voice_id for use as output_voice in the translation request. ```APIDOC ## GET /v2/voices ### Description Get available voices for a target language. ### Method GET ### Endpoint https://api.jogg.ai/v2/voices ### Parameters #### Query Parameters - **language** (string) - Required - The target language for which to list voices. #### Headers - **x-api-key** (string) - Required - Your API key for authentication. ### Request Example ```bash curl --request GET \ --url 'https://api.jogg.ai/v2/voices?language=spanish' \ --header 'x-api-key: YOUR_API_KEY' ``` ### Response #### Success Response (200) - **code** (integer) - Response code, 0 indicates success. - **msg** (string) - Response message. - **data.voices** (array of objects) - List of available voices. - **name** (string) - Voice name. - **voice_id** (string) - Unique identifier for the voice. - **language** (string) - Language of the voice. - **gender** (string) - Gender of the voice. - **age** (string) - Age category of the voice. - **accent** (string) - Accent of the voice. - **audio_url** (string) - URL to a sample audio clip. - **data.has_more** (boolean) - Indicates if there are more voices available. #### Response Example ```json { "code": 0, "msg": "Success", "data": { "voices": [ { "name": "Elvira", "voice_id": "es-ES-ElviraNeural", "language": "spanish", "gender": "female", "age": "young", "accent": "spanish", "audio_url": "https://res.jogg.ai/voice-sample.mp3" }, { "name": "Alvaro", "voice_id": "es-ES-AlvaroNeural", "language": "spanish", "gender": "male", "age": "young", "accent": "spanish", "audio_url": "https://res.jogg.ai/voice-sample.mp3" } ], "has_more": false } } ``` ``` -------------------------------- ### POST /v2/create_video_from_product Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/URLtoVideo Generates a video directly from a product, bypassing the preview step. ```APIDOC ## POST /v2/create_video_from_product ### Description Generates a video directly from a product, bypassing the preview step. ### Method POST ### Endpoint /v2/create_video_from_product ### Parameters #### Request Body - **product_id** (string) - Required - Product ID from Step 1 - **aspect_ratio** (string) - Required - portrait/landscape/square - **video_length** (string) - Required - "15"/"30"/"60" seconds - **language** (string) - Required - Script language (e.g., "english") - **avatar_id** (integer) - Required - Avatar ID - **avatar_type** (integer) - Required - 0=Public, 1=Custom - **script_style** (string) - Required - Script style (see Script Styles below) - **visual_style** (string) - Optional - Visual template name - **voice_id** (string) - Optional - Voice ID for TTS - **music_id** (integer) - Optional - Background music ID - **override_script** (string) - Optional - Custom script to override AI-generated - **template_id** (integer) - Optional - Custom template ID - **template_type** (string) - Optional - "custom" or "public" - **caption** (boolean) - Optional - Enable subtitles (default: false) ### Request Example { "product_id": "prod_12345", "aspect_ratio": "portrait", "video_length": "30", "language": "english", "avatar_id": 1, "avatar_type": 0, "script_style": "informative", "visual_style": "modern", "voice_id": "voice_1", "music_id": 1, "override_script": "Custom script text", "template_id": 1, "template_type": "custom", "caption": true } ### Response #### Success Response (200) - **product_video_id** (string) - ID of the generated video #### Response Example { "product_video_id": "video_123" } ``` -------------------------------- ### Get Photo Avatar Status with curl Source: https://docs.jogg.ai/api-reference/v2/Avatar/PhotoAvatarStatusGet Use this GET request to check the status of a photo avatar generation task by providing the photo_id. Replace YOUR_API_KEY with your actual API key. ```bash curl --request GET \ --url 'https://api.jogg.ai/v2/photo_avatar/photo?photo_id=photo_123' \ --header 'x-api-key: YOUR_API_KEY' ``` -------------------------------- ### Create Product with URL using cURL Source: https://docs.jogg.ai/api-reference/v2/Product/CreateProduct Use this cURL command to create a product by providing a product URL. The system automatically extracts product details from the URL. Replace YOUR_API_KEY with your actual API key. ```bash curl -X POST 'https://api.jogg.ai/v2/product' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/product/amazing-gadget" }' ``` -------------------------------- ### POST /v2/create_video_from_product/preview_list Source: https://docs.jogg.ai/api-reference/v2/Video/SubmitPreviewList Submit multiple visual styles for preview generation from a product. This allows you to generate multiple preview videos with different styles simultaneously. ```APIDOC ## POST /v2/create_video_from_product/preview_list ### Description Submit multiple visual styles for preview generation from a product. This allows you to generate multiple preview videos with different styles simultaneously. ### Method POST ### Endpoint /v2/create_video_from_product/preview_list ### Parameters #### Request Body - **product_id** (string) - Required - Product ID - **visual_styles** (array of string) - Required - List of visual style names to generate previews - **video_spec** (object) - Required - Video specification settings - **aspect_ratio** (string) - Optional - Video aspect ratio. Enum: portrait, landscape, square. Default: landscape - **length** (string) - Required - Video length in seconds. Enum: '15', '30', '60' - **caption** (boolean) - Optional - Whether to include captions - **avatar** (object) - Required - Avatar settings - **id** (integer) - Optional - Avatar ID - **type** (integer) - Optional - Avatar type - **voice** (object) - Required - Voice settings - **id** (string) - Optional - Voice ID - **audio** (object) - Required - Audio settings - **script** (object) - Required - Script settings - **style** (string) - Optional - Script style - **language** (string) - Optional - Script language ### Request Example { "product_id": "NTIzMzc0NjI5", "visual_styles": ["Simple Product Switch", "Dynamic Showcase"], "video_spec": { "aspect_ratio": "landscape", "length": "30", "caption": true }, "avatar": { "id": 1, "type": 0 }, "voice": { "id": "en-US-ChristopherNeural" }, "audio": {}, "script": { "style": "Storytime", "language": "english" } } ### Response #### Success Response (200) No response schema provided in the source. #### Response Example No response example provided in the source. ### Error Handling All endpoints return standard HTTP status codes along with detailed error messages in the response body. ### Authentication All API requests require authentication using an API key provided in the `x-api-key` header. ### Base URL Production: https://api.jogg.ai/v2 ### Rate Limiting API calls are subject to rate limiting based on your subscription plan. ``` -------------------------------- ### OpenAPI Specification for GET /v2/voices/custom Source: https://docs.jogg.ai/api-reference/v2/Voice/GetCustomVoices OpenAPI specification for the GET /v2/voices/custom endpoint. It defines the request parameters, response schema, and authentication requirements. Use this to understand the API contract and integrate programmatically. ```yaml openapi: 3.0.1 info: title: JoggAI OpenAPI v2 description: > JoggAI OpenAPI v2 provides a comprehensive suite of endpoints for creating and managing AI-powered video content. ## Authentication All API requests require authentication using an API key provided in the `x-api-key` header. ## Base URL Production: https://api.jogg.ai/v2 ## Rate Limiting API calls are subject to rate limiting based on your subscription plan. ## Error Handling All endpoints return standard HTTP status codes along with detailed error messages in the response body. version: 2.0.0 license: name: MIT servers: - url: https://api.jogg.ai description: Production server security: - apiKeyAuth: [] tags: - name: Video description: Video creation and management operations - name: Avatar description: Avatar management and creation operations - name: Voice description: Voice and timbre management operations - name: Asset description: Asset management including music, scripts, and uploads - name: Template description: Template management operations - name: Product description: Product management operations - name: User description: User account operations - name: Webhook description: Webhook endpoint management for event notifications paths: /v2/voices/custom: get: tags: - Voice summary: Get User Timbre List description: | Retrieve a list of user's custom timbres with filtering options. Returns user's personalized voice collection. parameters: - name: language in: query description: Filter by language schema: type: string example: english responses: '200': description: Success content: application/json: schema: allOf: - $ref: '#/components/schemas/BaseResponse' - type: object properties: data: type: object properties: total: type: integer description: Total number of custom voices example: 5 voices: type: array description: List of custom voices items: type: object properties: name: type: string description: Voice name example: My Custom Voice voice_id: type: string description: Voice identifier example: custom_123 audio_url: type: string description: Voice sample audio URL format: uri example: https://res.jogg.ai/voice-sample.mp3 language: type: string description: Voice language example: english components: schemas: BaseResponse: type: object required: - code - msg properties: code: type: integer description: | Business status code: * 0 - Success * 10104 - Record not found * 10105 - Invalid API key * 18020 - Insufficient credit * 18025 - No permission to call APIs * 40000 - Parameter error * 50000 - System error example: 0 msg: type: string description: Response message example: Success securitySchemes: apiKeyAuth: type: apiKey in: header name: x-api-key description: API key for authentication. Obtain your key from the JoggAI dashboard. ``` -------------------------------- ### Upload Audio Asset: Get Signed URL and PUT Upload Source: https://docs.jogg.ai/api-reference/v2/API%20Documentation/UploadMedia Upload an audio asset by first requesting a signed URL via POST to /v2/upload/asset, then uploading the file with a PUT request to the returned sign_url. The response provides an asset_url to use in video creation. Supported formats are MP3, WAV, and M4A, each up to 20MB and 10 minutes; recommended bitrate is 192 kbps for music and 128 kbps for voice. ```bash curl --request POST \ --url 'https://api.jogg.ai/v2/upload/asset' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "filename": "music.mp3", "content_type": "audio/mpeg", "file_size": 3456789 }' ``` ```json { "code": 0, "msg": "Success", "data": { "sign_url": "https://storage.jogg.ai/upload/signed-url-here", "asset_url": "https://res.jogg.ai/assets/aud_ghi789.mp3" } } ``` ```bash curl --request PUT \ --url 'https://storage.jogg.ai/upload/signed-url-here' \ --header 'Content-Type: audio/mpeg' \ --data-binary '@/path/to/music.mp3' ``` -------------------------------- ### OpenAPI Specification for Get AI Script Result Source: https://docs.jogg.ai/api-reference/v2/Asset/GetAIScriptResult OpenAPI specification for the GET /v2/ai_scripts/results/{task_id} endpoint. It includes authentication requirements, base URL, rate limiting, and error handling details. ```yaml openapi: 3.0.1 info: title: JoggAI OpenAPI v2 description: > JoggAI OpenAPI v2 provides a comprehensive suite of endpoints for creating and managing AI-powered video content. ## Authentication All API requests require authentication using an API key provided in the `x-api-key` header. ## Base URL Production: https://api.jogg.ai/v2 ## Rate Limiting API calls are subject to rate limiting based on your subscription plan. ## Error Handling ``` -------------------------------- ### OpenAPI Specification for GET /v2/visual_styles Source: https://docs.jogg.ai/api-reference/v2/Asset/GetVisualStyles OpenAPI specification for the GET /v2/visual_styles endpoint. Defines the endpoint, parameters (aspect_ratio), response schema, and authentication requirements. Use this to understand the API contract and integrate programmatically. ```yaml openapi: 3.0.1 info: title: JoggAI OpenAPI v2 description: > JoggAI OpenAPI v2 provides a comprehensive suite of endpoints for creating and managing AI-powered video content. ## Authentication All API requests require authentication using an API key provided in the `x-api-key` header. ## Base URL Production: https://api.jogg.ai/v2 ## Rate Limiting API calls are subject to rate limiting based on your subscription plan. ## Error Handling All endpoints return standard HTTP status codes along with detailed error messages in the response body. version: 2.0.0 license: name: MIT servers: - url: https://api.jogg.ai description: Production server security: - apiKeyAuth: [] tags: - name: Video description: Video creation and management operations - name: Avatar description: Avatar management and creation operations - name: Voice description: Voice and timbre management operations - name: Asset description: Asset management including music, scripts, and uploads - name: Template description: Template management operations - name: Product description: Product management operations - name: User description: User account operations - name: Webhook description: Webhook endpoint management for event notifications paths: /v2/visual_styles: get: tags: - Asset summary: List visual styles description: | Get available visual styles/templates filtered by aspect ratio. Visual styles determine the look and feel of your product videos. parameters: - name: aspect_ratio in: query description: Filter by aspect ratio schema: type: string enum: - portrait - landscape - square example: portrait responses: '200': description: Success content: application/json: schema: allOf: - $ref: '#/components/schemas/BaseResponse' - type: object properties: data: type: object properties: visual_styles: type: array description: List of visual styles items: type: object properties: id: type: integer description: Visual style ID example: 2400 name: type: string description: Visual style name example: Simple split screen template components: schemas: BaseResponse: type: object required: - code - msg properties: code: type: integer description: | Business status code: * 0 - Success * 10104 - Record not found * 10105 - Invalid API key * 18020 - Insufficient credit * 18025 - No permission to call APIs * 40000 - Parameter error * 50000 - System error example: 0 msg: type: string description: Response message example: Success securitySchemes: apiKeyAuth: type: apiKey in: header name: x-api-key description: API key for authentication. Obtain your key from the JoggAI dashboard. ``` -------------------------------- ### POST /v2/product Source: https://docs.jogg.ai/api-reference/v2/Product/CreateProduct Creates a new product with URL analysis or manual input. This is Step 1 in the product video generation workflow. ```APIDOC ## POST /v2/product ### Description Create a new product with URL analysis or manual input. This is Step 1 in the product video generation workflow. ### Method POST ### Endpoint /v2/product ### Parameters #### Request Body - **url** (string) - Optional - Product URL to crawl information from. Example: https://www.amazon.com/product/... - **name** (string) - Optional - Product name (required if no URL). Example: Physicians Formula Happy Booster Heart Blush - **description** (string) - Optional - Product description and selling points. Example: Brush on a radiant blushing glow... - **target_audience** (string) - Optional - Target audience. Example: Beauty enthusiasts - **media** (array) - Optional - Media resources array. Each item is an object with properties: - **type** (integer) - Optional - Media type: 1 - Image, 2 - Video. Example: 1 - **name** (string) - Optional - Example: product.jpg - **url** (string) - Optional - Example: https://res.jogg.ai/media.jpg - **description** (string) - Optional - Example: Product front view ### Request Example ```json { "url": "https://example.com/product/amazing-gadget" } ``` ### Response #### Success Response (200) - **code** (integer) - Business status code: 0 - Success, 10104 - Record not found, 10105 - Invalid API key - **msg** (string) - Response message - **data** (ProductInfo) - Product information object #### Response Example ```json { "code": 0, "msg": "success", "data": {} } ``` ```