{"id":26249808,"url":"https://github.com/the-swarm-corporation/createnow-api-docs","last_synced_at":"2025-04-24T02:07:34.785Z","repository":{"id":273021468,"uuid":"918424235","full_name":"The-Swarm-Corporation/createnow-api-docs","owner":"The-Swarm-Corporation","description":"API Documentation for createnow","archived":false,"fork":false,"pushed_at":"2025-01-18T04:16:14.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T02:07:28.351Z","etag":null,"topics":["ai","audiogen","docs","multi-agent","swarms","texttovideo","tti","tts"],"latest_commit_sha":null,"homepage":"https://createnow.xyz","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/The-Swarm-Corporation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-17T22:50:01.000Z","updated_at":"2025-01-22T13:56:58.000Z","dependencies_parsed_at":"2025-01-18T05:17:15.872Z","dependency_job_id":"bc90bbc7-2742-47c1-ba9a-64c09eccde98","html_url":"https://github.com/The-Swarm-Corporation/createnow-api-docs","commit_stats":null,"previous_names":["the-swarm-corporation/createnow-api-docs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2Fcreatenow-api-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2Fcreatenow-api-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2Fcreatenow-api-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2Fcreatenow-api-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-Swarm-Corporation","download_url":"https://codeload.github.com/The-Swarm-Corporation/createnow-api-docs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250546080,"owners_count":21448260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","audiogen","docs","multi-agent","swarms","texttovideo","tti","tts"],"created_at":"2025-03-13T15:49:50.245Z","updated_at":"2025-04-24T02:07:34.765Z","avatar_url":"https://github.com/The-Swarm-Corporation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CreateNow API Documentation\n\nWelcome to the CreateNow API documentation! This API enables developers to generate AI-powered content, including images, music, videos, and speech, using natural language prompts. Use the endpoints below to start generating content.\n\n---\n\n## **1. Claim Your API Key**\nTo use the API, you must first claim your API key. Visit the following link to create an account and get your API key:\n\n### **Claim Your Key**\n```\nhttps://createnow.xyz/account\n```\n\nAfter signing up, your API key will be available in your account dashboard. Keep it secure and include it in your API requests as a Bearer token.\n\n---\n\n## **2. Generation Endpoint**\nThe generation endpoint allows you to create AI-generated content using natural language prompts.\n\n### **Endpoint**\n```\nPOST https://createnow.xyz/api/v1/generate\n```\n\n### **Authentication**\nInclude a Bearer token in the `Authorization` header for all requests:\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\n### **Basic Usage**\nThe simplest way to use the API is to send a prompt. The system will automatically detect the appropriate media type.\n\n#### **Example Request (Basic)**\n```json\n{\n  \"prompt\": \"a beautiful sunset over the ocean\"\n}\n```\n\n### **Advanced Options**\nYou can specify additional parameters for finer control over the output.\n\n#### **Parameters**\n| Parameter      | Type      | Description                                                                                       | Default      |\n|----------------|-----------|---------------------------------------------------------------------------------------------------|--------------|\n| `prompt`       | `string`  | The natural language description of the content to generate.                                     | Required     |\n| `type`         | `string`  | The type of content to generate (`image`, `music`, `video`, `speech`).                          | Auto-detect  |\n| `count`        | `integer` | The number of outputs to generate (1-4).                                                        | 1            |\n| `duration`     | `integer` | Duration of audio or video content in seconds (applicable to `music` and `speech`).            | N/A          |\n\n#### **Example Request (Advanced)**\n```json\n{\n  \"prompt\": \"create an upbeat jazz melody\",\n  \"type\": \"music\",\n  \"count\": 2,\n  \"duration\": 30\n}\n```\n\n### **Response Format**\n\n#### **Success Response**\n```json\n{\n  \"success\": true,\n  \"outputs\": [\n    {\n      \"url\": \"https://createnow.xyz/storage/image1.png\",\n      \"creation_id\": \"12345\",\n      \"share_url\": \"https://createnow.xyz/share/12345\"\n    }\n  ],\n  \"mediaType\": \"image\",\n  \"confidence\": 0.95,\n  \"detected\": true\n}\n```\n\n#### **Error Response**\n```json\n{\n  \"error\": \"Invalid API Key\",\n  \"status\": 401\n}\n```\n\n---\n\n## **3. Examples in Multiple Languages**\n\n### **Python**\n```python\nimport requests\n\nurl = \"https://createnow.xyz/api/v1/generate\"\nheaders = {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n}\n\npayload = {\n    \"prompt\": \"a futuristic cityscape at night\",\n    \"type\": \"image\",\n    \"count\": 2\n}\n\nresponse = requests.post(url, json=payload, headers=headers)\nprint(response.json())\n```\n\n### **Node.js**\n```javascript\nconst axios = require('axios');\n\nconst url = \"https://createnow.xyz/api/v1/generate\";\nconst headers = {\n    Authorization: \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n};\n\nconst payload = {\n    prompt: \"a futuristic cityscape at night\",\n    type: \"image\",\n    count: 2\n};\n\naxios.post(url, payload, { headers })\n    .then(response =\u003e {\n        console.log(response.data);\n    })\n    .catch(error =\u003e {\n        console.error(error.response.data);\n    });\n```\n\n### **cURL**\n```bash\ncurl -X POST https://createnow.xyz/api/v1/generate \\\n-H \"Authorization: Bearer YOUR_API_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"prompt\": \"a futuristic cityscape at night\",\n  \"type\": \"image\",\n  \"count\": 2\n}'\n```\n\n### **Java**\n```java\nimport java.net.HttpURLConnection;\nimport java.net.URL;\nimport java.io.OutputStream;\n\npublic class CreateNowAPI {\n    public static void main(String[] args) throws Exception {\n        URL url = new URL(\"https://createnow.xyz/api/v1/generate\");\n        HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n        conn.setRequestMethod(\"POST\");\n        conn.setRequestProperty(\"Authorization\", \"Bearer YOUR_API_KEY\");\n        conn.setRequestProperty(\"Content-Type\", \"application/json\");\n        conn.setDoOutput(true);\n\n        String jsonPayload = \"{\" +\n            \"\\\"prompt\\\": \\\"a futuristic cityscape at night\\\", \" +\n            \"\\\"type\\\": \\\"image\\\", \" +\n            \"\\\"count\\\": 2}\";\n\n        OutputStream os = conn.getOutputStream();\n        os.write(jsonPayload.getBytes());\n        os.flush();\n\n        int responseCode = conn.getResponseCode();\n        System.out.println(\"Response Code: \" + responseCode);\n    }\n}\n```\n\n---\n\n## **4. Error Codes**\n| Status Code | Meaning                          | Possible Causes                        |\n|-------------|----------------------------------|----------------------------------------|\n| 400         | Bad Request                      | Invalid parameters or payload.         |\n| 401         | Unauthorized                     | Invalid or missing API key.            |\n| 402         | Payment Required                 | Insufficient credits for the request.  |\n| 500         | Internal Server Error            | Issue on the server side.              |\n\n---\n\n## **5. Notes and Limitations**\n- **Maximum Prompt Length:** 1000 characters.\n- **Maximum Outputs per Request:** 4.\n- **Supported Media Types:** `image`, `music`, `video`, `speech`.\n- **Content Shareability:** Every output includes a unique creation ID and shareable URL.\n- **Auto-Detection:** Uses advanced natural language processing to determine the most appropriate media type.\n\n---\n\nFor further support or questions, please contact our support team at [support@createnow.xyz](mailto:support@createnow.xyz).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-swarm-corporation%2Fcreatenow-api-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-swarm-corporation%2Fcreatenow-api-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-swarm-corporation%2Fcreatenow-api-docs/lists"}