[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"header-nav":3,"header-nav-data":155,"footer-secondary":157,"footer-description":183,"github-stars":185,"openai":290,"footer-primary":434,"site-banner":510,"8f849cd0-a47b-4e32-bb19-b478973c90f7":515,"dfd79d2b-7af5-4cdb-aa94-3f73de97ebd8":521,"74634853-196b-4ce3-b256-4534c054838f":527,"1b444c23-b593-4391-9410-4ca5d2c7a7cb":556,"358b0659-1f05-4427-bd1c-4bc03a43c182":562,"9df3f40e-6272-4ec6-a0d7-cc29265e087c":567},{"items":4},[5,74,136,141,148],{"id":6,"title":7,"url":8,"callout":9,"callout_title":10,"children_title":11,"page":8,"children":12},"62c04c6c-5793-4702-8ed1-73dd563fd605","Product",null,"8f849cd0-a47b-4e32-bb19-b478973c90f7","Project Showcase","Use Cases and Features",[13,21,29,37,43,51,59,67],{"id":14,"title":15,"url":16,"description":17,"image":8,"icon":18,"page":19},"e7d7d5ed-89b1-4455-8b4a-8ae92c70e3a0","Headless CMS","/solutions/headless-cms/","Manage and deliver content with ease","code_blocks",{"permalink":20},"/solutions/headless-cms",{"id":22,"title":23,"url":24,"description":25,"image":8,"icon":26,"page":27},"60bdefd9-95e6-45a3-9f81-4748d07c59d3","Backend-as-a-Service","/solutions/backend-as-a-service/","Build and ship applications faster","speed",{"permalink":28},"/solutions/backend-as-a-service",{"id":30,"title":31,"url":32,"description":33,"image":8,"icon":34,"page":35},"5f9aebeb-4f89-445e-9850-5b1261a2743c","Headless Commerce","/solutions/product-information-management/","A single source of truth for products","shopping_cart_checkout",{"permalink":36},"/solutions/product-information-management",{"id":38,"title":39,"url":40,"description":41,"image":8,"icon":42,"page":8},"49e46134-80be-470e-8c73-afb1417fa9b6","100+ More Use Cases","https://directus.io/blog/100-tools-apps-and-platforms-you-can-build-with-directus","Build anything (or everything)","lightbulb",{"id":44,"title":45,"url":46,"description":47,"image":8,"icon":48,"page":49},"a589ac77-a5ce-45c5-a054-e43111e19158","Instant APIs","/products/connect/","Connect a database, get REST + GraphQL APIs","api",{"permalink":50},"/toolkit/connect",{"id":52,"title":53,"url":54,"description":55,"image":8,"icon":56,"page":57},"4a0f129a-c546-4493-b0a9-306e51692e90","Granular Policy-Based Auth","/products/auth/","Provide secure, autonomous data access","lock_person",{"permalink":58},"/toolkit/auth",{"id":60,"title":61,"url":62,"description":63,"image":8,"icon":64,"page":65},"f9250f2c-93a4-4108-80db-011bbe391ecf","Visual Automation Builder","/products/automate/","Automate content and data workflows with ease","build",{"permalink":66},"/toolkit/automate",{"id":68,"title":69,"url":8,"description":70,"image":8,"icon":71,"page":72},"f1ae4e40-5b05-42a4-9cd3-33dda35cc939","50+ More Features","Get everything you need out-of-the-box","auto_fix",{"permalink":73},"/features",{"id":75,"title":76,"url":8,"callout":77,"callout_title":78,"children_title":79,"page":8,"children":80},"2f6ad0d1-6dd3-4f17-b5c8-9f2abf71409a","Resources","dfd79d2b-7af5-4cdb-aa94-3f73de97ebd8","Watch Directus TV","Learn More",[81,88,96,102,109,116,122,129],{"id":82,"title":83,"url":84,"description":85,"image":8,"icon":86,"page":87},"0a3bf9f5-1ef2-43f4-bc09-7ff7488241c5","Blog","/blog","Read our latest articles and guides","library_books",{"permalink":84},{"id":89,"title":90,"url":91,"description":92,"image":8,"icon":93,"page":94},"165e3dc2-e51b-4456-8382-99c5775b0412","Case Studies","#","Case studies and success stories","magic_button",{"permalink":95},"/case-studies",{"id":97,"title":98,"url":99,"description":100,"image":8,"icon":101,"page":8},"5ae324b6-bf44-4c21-95ad-e6dc0c1c1f40","Community Forum","https://community.directus.io/","Questions and conversations","comment",{"id":103,"title":104,"url":91,"description":105,"image":8,"icon":106,"page":107},"b1db03f0-e537-490e-8c0f-c61c401d1024","Agency Directory","Browse our list of agency partners ","handshake",{"permalink":108},"/agency-directory",{"id":110,"title":111,"url":112,"description":113,"image":8,"icon":114,"page":115},"991731c8-eb40-4eec-85a5-6e977bcd7ec9","About Us","/about","Learn more about Directus and the team","supervised_user_circle",{"permalink":112},{"id":117,"title":118,"url":119,"description":120,"image":8,"icon":121,"page":8},"52aebf38-b3ad-4a27-807d-ce52398cd509","Wall of Love","https://testimonial.to/directus/all","See what others are saying about us","heart_plus",{"id":123,"title":124,"url":91,"description":125,"image":8,"icon":126,"page":127},"a86eca65-d5ae-4263-b7d9-4f1a1c50a0b1","Contact","Have a general inquiry or question for us?","mark_email_unread",{"permalink":128},"/contact",{"id":130,"title":131,"url":8,"description":132,"image":8,"icon":133,"page":134},"28225825-8d41-4809-9032-192fbf5c6e5d","Support","Reach out to Directus support","support",{"permalink":135},"/support",{"id":137,"title":138,"url":139,"callout":8,"callout_title":8,"children_title":8,"page":8,"children":140},"a3f1275d-b088-4b11-99bf-143fcbf39104","Developers","/docs",[],{"id":142,"title":143,"url":144,"callout":8,"callout_title":8,"children_title":8,"page":145,"children":147},"fae8fded-d2e2-468e-a68b-82abec7a7225","Enterprise","/solutions/enterprise/",{"permalink":146},"/solutions/enterprise",[],{"id":149,"title":150,"url":151,"callout":8,"callout_title":8,"children_title":8,"page":152,"children":154},"5c5e2fbc-49fd-4e41-a71e-e4f8db2b00cf","Pricing","/pricing/",{"permalink":153},"/pricing/self-hosted",[],{"header_cta_buttons":156},"74634853-196b-4ce3-b256-4534c054838f",{"items":158},[159,165,171,177],{"id":160,"title":161,"url":8,"page":162,"children":164},"8a1b7bfa-429d-4ffc-a650-2a5fdcf356da","Cloud Policies",{"permalink":163},"/cloud-policies",[],{"id":166,"title":167,"url":91,"page":168,"children":170},"bea848ef-828f-4306-8017-6b00ec5d4a0c","License",{"permalink":169},"/bsl",[],{"id":172,"title":173,"url":91,"page":174,"children":176},"4e914f47-4bee-42b7-b445-3119ee4196ef","Terms",{"permalink":175},"/terms",[],{"id":178,"title":179,"url":91,"page":180,"children":182},"ea69eda6-d317-4981-8421-fcabb1826bfd","Privacy",{"permalink":181},"/privacy",[],{"description":184},"\u003Cp>A composable backend to build your Headless CMS, BaaS, and more.&nbsp;\u003C/p>",{"id":186,"node_id":187,"name":188,"full_name":189,"private":190,"owner":191,"html_url":209,"description":210,"fork":190,"url":211,"forks_url":212,"keys_url":213,"collaborators_url":214,"teams_url":215,"hooks_url":216,"issue_events_url":217,"events_url":218,"assignees_url":219,"branches_url":220,"tags_url":221,"blobs_url":222,"git_tags_url":223,"git_refs_url":224,"trees_url":225,"statuses_url":226,"languages_url":227,"stargazers_url":228,"contributors_url":229,"subscribers_url":230,"subscription_url":231,"commits_url":232,"git_commits_url":233,"comments_url":234,"issue_comment_url":235,"contents_url":236,"compare_url":237,"merges_url":238,"archive_url":239,"downloads_url":240,"issues_url":241,"pulls_url":242,"milestones_url":243,"notifications_url":244,"labels_url":245,"releases_url":246,"deployments_url":247,"created_at":248,"updated_at":249,"pushed_at":250,"git_url":251,"ssh_url":252,"clone_url":253,"svn_url":209,"homepage":254,"size":255,"stargazers_count":256,"watchers_count":256,"language":257,"has_issues":258,"has_projects":258,"has_downloads":258,"has_wiki":190,"has_pages":190,"has_discussions":258,"forks_count":259,"mirror_url":8,"archived":190,"disabled":190,"open_issues_count":260,"license":261,"allow_forking":258,"is_template":190,"web_commit_signoff_required":190,"has_pull_requests":258,"pull_request_creation_policy":266,"topics":267,"visibility":208,"forks":259,"open_issues":260,"watchers":256,"default_branch":286,"temp_clone_token":8,"custom_properties":287,"organization":288,"network_count":259,"subscribers_count":289},7122594,"MDEwOlJlcG9zaXRvcnk3MTIyNTk0","directus","directus/directus",false,{"login":188,"id":192,"node_id":193,"avatar_url":194,"gravatar_id":195,"url":196,"html_url":197,"followers_url":198,"following_url":199,"gists_url":200,"starred_url":201,"subscriptions_url":202,"organizations_url":203,"repos_url":204,"events_url":205,"received_events_url":206,"type":207,"user_view_type":208,"site_admin":190},15967950,"MDEyOk9yZ2FuaXphdGlvbjE1OTY3OTUw","https://avatars.githubusercontent.com/u/15967950?v=4","","https://api.github.com/users/directus","https://github.com/directus","https://api.github.com/users/directus/followers","https://api.github.com/users/directus/following{/other_user}","https://api.github.com/users/directus/gists{/gist_id}","https://api.github.com/users/directus/starred{/owner}{/repo}","https://api.github.com/users/directus/subscriptions","https://api.github.com/users/directus/orgs","https://api.github.com/users/directus/repos","https://api.github.com/users/directus/events{/privacy}","https://api.github.com/users/directus/received_events","Organization","public","https://github.com/directus/directus","The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.","https://api.github.com/repos/directus/directus","https://api.github.com/repos/directus/directus/forks","https://api.github.com/repos/directus/directus/keys{/key_id}","https://api.github.com/repos/directus/directus/collaborators{/collaborator}","https://api.github.com/repos/directus/directus/teams","https://api.github.com/repos/directus/directus/hooks","https://api.github.com/repos/directus/directus/issues/events{/number}","https://api.github.com/repos/directus/directus/events","https://api.github.com/repos/directus/directus/assignees{/user}","https://api.github.com/repos/directus/directus/branches{/branch}","https://api.github.com/repos/directus/directus/tags","https://api.github.com/repos/directus/directus/git/blobs{/sha}","https://api.github.com/repos/directus/directus/git/tags{/sha}","https://api.github.com/repos/directus/directus/git/refs{/sha}","https://api.github.com/repos/directus/directus/git/trees{/sha}","https://api.github.com/repos/directus/directus/statuses/{sha}","https://api.github.com/repos/directus/directus/languages","https://api.github.com/repos/directus/directus/stargazers","https://api.github.com/repos/directus/directus/contributors","https://api.github.com/repos/directus/directus/subscribers","https://api.github.com/repos/directus/directus/subscription","https://api.github.com/repos/directus/directus/commits{/sha}","https://api.github.com/repos/directus/directus/git/commits{/sha}","https://api.github.com/repos/directus/directus/comments{/number}","https://api.github.com/repos/directus/directus/issues/comments{/number}","https://api.github.com/repos/directus/directus/contents/{+path}","https://api.github.com/repos/directus/directus/compare/{base}...{head}","https://api.github.com/repos/directus/directus/merges","https://api.github.com/repos/directus/directus/{archive_format}{/ref}","https://api.github.com/repos/directus/directus/downloads","https://api.github.com/repos/directus/directus/issues{/number}","https://api.github.com/repos/directus/directus/pulls{/number}","https://api.github.com/repos/directus/directus/milestones{/number}","https://api.github.com/repos/directus/directus/notifications{?since,all,participating}","https://api.github.com/repos/directus/directus/labels{/name}","https://api.github.com/repos/directus/directus/releases{/id}","https://api.github.com/repos/directus/directus/deployments","2012-12-12T01:35:36Z","2026-04-15T04:20:19Z","2026-04-14T21:58:02Z","git://github.com/directus/directus.git","git@github.com:directus/directus.git","https://github.com/directus/directus.git","https://directus.io",439603,34792,"TypeScript",true,4701,388,{"key":262,"name":263,"spdx_id":264,"url":8,"node_id":265},"other","Other","NOASSERTION","MDc6TGljZW5zZTA=","all",[48,268,269,270,271,272,188,273,274,275,276,277,278,279,280,281,282,283,284,285],"app","cms","composable","data-visualization","database","graphql","headless-cms","javascript","mariadb","mssql","mysql","no-code","node","postgresql","sql","sqlite","typescript","vue","main",{},{"login":188,"id":192,"node_id":193,"avatar_url":194,"gravatar_id":195,"url":196,"html_url":197,"followers_url":198,"following_url":199,"gists_url":200,"starred_url":201,"subscriptions_url":202,"organizations_url":203,"repos_url":204,"events_url":205,"received_events_url":206,"type":207,"user_view_type":208,"site_admin":190},327,{"metadata":8,"logo":291,"helpful_resources":292,"extensions":296,"date_updated":304,"user_updated":305,"date_created":306,"user_created":307,"sort":8,"id":308,"content":309,"website":310,"status":311,"category":312,"description":313,"slug":314,"name":315,"external_resources":316,"extensionDetails":317},"fa77c320-a7b0-46ff-90b8-bffe934521be",[293],{"title":294,"url":295},"OpenAI API Documentation","https://platform.openai.com/docs",[297,298,299,300,301,302,303],"directus-extension-ai-operation-bundle","directus-extension-ai-sdk-bundle","directus-extension-assistant","@directus-labs/ai-focal-point-detection-operation","@directus-labs/ai-image-generation-operation","@directus-labs/ai-writer-operation","@directus-labs/ai-researcher-bundle","2025-07-31T13:09:15.556Z","1a9ab95a-93bc-4908-af85-0d42bb6e6aa6","2025-07-11T14:29:16.851Z","1cd0a355-b103-477d-9375-61e88f3110f8","1eafb8a1-915d-4f6d-bcc6-13f4e09b3dde","\u003Cp>OpenAI is a leader in artificial intelligence, offering advanced models for content generation, image creation, and natural language processing.\u003C/p>\n\u003Cp>With OpenAI integrated into Directus, users can bring powerful AI tools directly into their data and content workflows, making it easier to automate tasks, generate new assets, and enhance existing content without leaving the Directus environment. Within Directus, OpenAI integrations let you create written content, generate images, and analyze text using AI models like GPT and DALL&middot;E.\u003C/p>\n\u003Cp>You can use extensions such as the AI Writer to draft articles or product descriptions, or the Image Generation tool to create visuals on demand. The AI Assistant helps automate repetitive tasks, while focal point detection can improve how images are managed and displayed in your projects. These tools work together to save time and offer new creative options for anyone managing digital content.\u003C/p>\n\u003Cp>Whether you want to automate copywriting, enrich your database with AI-generated images, or simply make your content workflows more efficient, OpenAI&rsquo;s extensions in Directus offer practical solutions for modern data and content needs.\u003C/p>","https://openai.com","published","AI","Use your favorite models from OpenAI to generate content and more right inside Directus","openai","OpenAI",[],[318,342,363,389,403,420],{"description":319,"featured_image":320,"formatted_description":319,"formatted_name":321,"host_version":322,"id":323,"images":324,"last_updated":325,"license":326,"name":301,"published_at":327,"publisher":328,"readme":337,"recent_downloads_30_days":338,"recent_downloads_7_days":339,"sandbox":258,"total_downloads":340,"type":341},"Use DALLE•E 3 to generate images based on a user prompt.","https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-image-generation-operation/docs/options.png","AI Image Generation Operation","^10.10.0","1c09c3a4-2750-4a01-94fd-c0d91fe35870",[320],1734520040,"MIT",1710416979,{"github_avatar_url":329,"github_bio":330,"github_blog":331,"github_company":332,"github_location":333,"github_name":334,"github_username":335,"id":336,"username":335,"verified":258},"https://avatars.githubusercontent.com/u/804683?v=4","(╯°□°）╯︵ TABLEFLIP","http://elsmore.me","@DigitalSpeed","UK","Mike Elsmore","ukmadlz","74ce2e77-733a-4e9a-b96d-93bf6264f622","# AI Image Generation Operation\n\nGenerate new images within Directus Flows with this custom operation, powered by [OpenAI](https://platform.openai.com).\n\n![The AI Image Generation operation, showing an OpenAI API Key field, and fields for a prompt, quality, and size selection](https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-image-generation-operation/docs/options.png)\n\nThis operation contains four required configuration options - an [OpenAI API Key](https://platform.openai.com), a text prompt, a quality (standard or high), and a size (square, portrait, or landscape). It returns a string which is a direct URL to the generated image.\n\nYou can use an operation to then import the image to your project, or run further automation on the output.\n\n## Output\n\nThe output is a plain string which is a URL to the generated image.\n\n## Flow Setup\n\nUse the **AI Image Generation** operation, using the `{{ step }}` variable syntax to dynamically create a prompt.\n\nImmediately after the operation, create a **Webhook / Request URL** operation with the name \"Import\". Use a `POST` Method and a URL of `https://your-directus-project-url/files/import`, being sure to provide your specific Directus Project URL. If public file uploads are not enabled, you will need to add an `Authorization` header with the value `Bearer token`, where `token` must be a static token from a user who has permissions to create files.\n\nUse the following Request Body:\n\n```json\n{\n\t\"url\": \"{{$last}}\"\n}\n```\n\nThis operation will return the id of the new file at `{{ import.data.data.id }}`. You can use this ID in file/image relational fields.\n",5047,812,28362,"operation",{"description":343,"featured_image":344,"formatted_description":343,"formatted_name":345,"host_version":346,"id":347,"images":348,"last_updated":350,"license":326,"name":302,"published_at":351,"publisher":352,"readme":358,"recent_downloads_30_days":359,"recent_downloads_7_days":360,"repository_url":361,"sandbox":258,"total_downloads":362,"type":341},"Use OpenAI, Claude, Meta and Mistral Text Generation APIs to generate text.","https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-writer-operation/docs/options.png","AI Writer Operation","^10.0.0 || ^11.0.0","8c20b301-38aa-48a7-99c4-3142338da1b2",[344,349],"https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-writer-operation/docs/output.png",1773175592,1748550102,{"github_avatar_url":353,"github_blog":354,"github_name":355,"github_username":356,"id":357,"username":356,"verified":258},"https://avatars.githubusercontent.com/u/23302570?v=4","https://www.bryantgillespie.com","Bryant Gillespie","bryantgillespie","85f85c84-9af0-4ba7-a30f-3617605d412b","# AI Writer Operation\n\nGenerate text based on a written prompt within Directus Flows with this custom operation, powered by [OpenAI's Text Generation API]([https://.com](https://openai.com/product)), [Anthropic](https://www.anthropic.com/) [MistralAi  (via Replicate)](https://replicate.com/mistralai/mistral-7b-v0.1) and [Meta's LLama (via Replicate)](https://replicate.com/meta/meta-llama-3.1-405b-instruct).\n\n![The AI Writer operation, showing a masked OpenAI API Key field, model and prompt selection fields, and a multiline text input.](https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-writer-operation/docs/options.png)\n\n## Configuration\nThis operation contains some configuration options - an Api-Key, a selection of which model and prompt to use, and a text input. The text input can contain references like `{{$last.data}}` to refer to data available in the current flow. The prompt can be customised further using the optional Messages repeater field. The operation returns a string of the transformed or generated text.\n\n![The output showing a string that has been grammatically fixed.](https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-writer-operation/docs/output.png)\n\n### API-Keys\nYou can generate your API-Keys on the follosing sites:\n- [OpenAI](https://platform.openai.com/api-keys)\n- [Anthropic](https://console.anthropic.com/settings/workspaces/default/keys)\n- [Replicate](https://replicate.com/account/api-tokens)\n\n## Custom Prompts\n\nFor a completely custom prompt using the \"Create custom prompt\" type, you will need to create a **system** message at the start of the message thread so that the Text Generation API knows how it should respond. Examples of initial system prompts can be found in the config objects of each built-in prompt in the [source code of this extension](https://github.com/directus-labs/extension-ai-writer-operation/tree/production/src/prompts). OpenAI also provides a solid overview of [how to write good prompts](https://platform.openai.com/docs/guides/prompt-engineering).\n\n## Customising Responses (Advanced users)\n\nThe Messages repeater can be used to create or extend seed prompts to OpenAI's Text Generation API. The Messages repeater creates an array of messages that form a conversation thread. The Text Generation API will refer to the thread to determine how it should respond to further user prompts. The content in the Text field is used as the last user prompt sent to the Text Generation API before receiving the final response. This response is forwarded to the next operation in the flow as a string.\n\nMessages can be simulated as coming from one of three roles:\n\n* **System** — Modifies the personality of the assistant or provide specific instructions about how it should behave throughout the conversation. An initial system message is already included for each prompt type. Using this option will add further system messages to the thread.\n* **User** — User provided requests or comments for the assistant to respond to\n* **Assistant** — Example responses generated by the Text Generation API to help provide hints on how the Generative Text API should respond.\n\n[OpenAI's Documentation](https://platform.openai.com/docs/guides/text-generation/chat-completions-api) explains further how the underlying API and models work. It may be helpful to read these to better understand the underlying process. The following quote from the documentation is important for understanding the Message Thread format and intent:\n\n> Typically, a conversation is formatted with a system message first, followed by alternating user and assistant messages.\n\nGetting a desired output works best when following the format of creating a **system** message first followed by alternating between **user**, then **assistant** responses. Each of the preset prompt types available in the drop down field include a system message except for the \"Create Custom Prompt\" option which allows you a lot more flexibility.\n\n### Extending Built-in Prompts\n\nYou can add more messages to the conversation thread, before getting your final response, by adding them to the Messages repeater field. These are injected at the end of the built-in seed thread and before the final prompt is sent.\n\nThis can be useful for:\n\n* Providing examples of the expected behaviour\n* Injecting content from your Directus instance to show the type of tone used in your project\n* Providing clarifying instructions - the [Editor prompt](https://github.com/directus-labs/extension-ai-writer-operation/tree/production/src/prompts/editor.js) makes use of this as Chat GPT-3.5 can get confused when given a prompt to edit that looks like a new instruction\n\nKeep in mind that OpenAI pricing charges for both [tokens](https://platform.openai.com/docs/guides/text-generation/managing-tokens) received *and* sent. Longer seed threads will result in higher usage costs.\n",2847,757,"https://github.com/directus-labs/extensions.git",24221,{"description":364,"featured_image":365,"formatted_description":366,"formatted_name":367,"host_version":368,"id":369,"images":370,"last_updated":378,"license":326,"name":297,"published_at":379,"publisher":380,"readme":383,"recent_downloads_30_days":384,"recent_downloads_7_days":385,"repository_url":386,"sandbox":190,"total_downloads":387,"type":388},"A small bundle of Flow Operations which enable interaction with the [OpenAI](https://beta.openai.com/overview) and [Stability](https://stability.ai/) API's.","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/stable-diffusion-demo.gif","A small bundle of Flow Operations which enable interaction with the OpenAI and Stability API's.","AI Operation Bundle","^9.26.0","cb4ffa8a-58e8-4052-9af4-83648bd1502b",[365,371,372,373,374,375,376,377],"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/stable-diffusion-config.png","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/dall-e-demo.gif","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/dall-e-config.png","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/davinci-demo.gif","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/davinci-config.png","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/chatgpt_demo.gif","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/global-configuration.png",1732820301,1673125851,{"id":381,"username":382,"verified":258},"ab487166-f95d-4454-9f6c-5f1a58d57f3c","brainslug","# Directus AI Operations Bundle\n\nA small bundle of Flow Operations which enable interaction with the [OpenAI](https://beta.openai.com/overview) and [Stability](https://stability.ai/) API's.\n\n> Note: To use these you will need an API Key for the respective services.\n\n> Tested with Directus 11.2.2\n\n## Installation\n\nThe package is published to npm:\n`npm install directus-extension-ai-operation-bundle`\n\n**Manual Installation**\n- Download or fork the repository\n- Install the requirements\\\n  `npm install`\n- Build the extension\\\n  `npm run build`\n- Move the entire project to your extension folder (only the `package.json` and `dist` folder are strictly necessary)\\\n  `mv ./ extensions/directus-extension-ai-operation-bundle`\n- Restart your Directus instance\n\n## Bundle Content\n\n### Stable Diffusion Operation\n\nThis operation allow you generate images from text using the Stable Diffusion models with the [Stability.ai API](https://platform.stability.ai/) taking a `prompt` as input and saves the resulting image to the file library returning its ID as output.\n\n![Demo](examples/stable-diffusion-demo.gif)\n\n**Output**\\\nAn object containing the ID of the resulting image file.\n```json\n{ \"id\": \"[UUID]\" }\n```\n\n**Configuration Options**\\\nI am by no means an expert in what any of these model specific settings do so please check out the [stability docs](https://api.stability.ai/docs) for that.\n1. `Prompt` This is the main text input used for generating the image.\n2. `Width` Width of the image (note: height * width must be \u003C= 1 Megapixel)\n3. `Height` Height of the image (note: height * width must be \u003C= 1 Megapixel)\n4. `CFG Scale` How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt)\n5. `Steps` Number of diffusion steps to run\n6. `Engine` The model to be used (defined choices can be found in [src/lib/constants.js](src/lib/constants.js)\n7. `API Key Override` Used to set an API Key to be used specificly on this operation.\n\n![config](examples/stable-diffusion-config.png)\n\n### DALL-E Operation\n\nSimilar to the Stable Diffusion operation this allows you to generate images from text but using the OpenAI DALL-E models instead with the [OpenAI API](https://beta.openai.com/docs/guides/images) taking a `prompt` as input, optionally saves it to the local file library and returning both the original URL and local image file ID.\n![Demo](examples/dall-e-demo.gif)\n\n**Output**\\\nAn object containing the ID(s) and URL(s) of the resulting image file(s).\nFor a single result:\n```json\n{ \"url\": \"https://some.url\", \"id\": \"[UUID]\" }\n```\nFor multiple results:\n```json\n{ \"url\": [\"https://some.url\",\"https://some.other.url\"], \"id\": [\"[UUID]\",\"[UUID]\"] }\n```\n\n**Configuration Options**\n1. `Prompt` This is the main text input used for generating the image.\n2. `Save To File Library` Disable importing the image into the local storage allowing you to use the DALL-E result URL for other systems.\n3. `Number of pictures` DALL-E allows you to generate up to 10 images.\n4. `Image Size` Choices are `256x256`, `512x512` or `1024x1024`\n5. `API Key Override` Used to set an API Key to be used specificly on this operation.\n\n![config](examples/dall-e-config.png)\n\n### GPT-3 Davinci Operation\n\nThis operation allows text completion using the OpenAI Davinci models with the [OpenAI API](https://beta.openai.com/docs/guides/completion/introduction) taking a `prompt` as input and returns the generated text.\n\n![Demo](examples/davinci-demo.gif)\n\n**Output**\\\nAn object containing the generated text:\n```json\n{ \"response\": \"Generated TEXT\" }\n```\n\n**Configuration Options**\\\nI am by no means an expert in what any of these model specific settings do so please check out the [OpenAI docs](https://beta.openai.com/docs/guides/completion) for that.\n1. `Prompt` This is the main text input used for text completion.\n2. `Temperature` Controls randomness: Lowering results in less random completions.\n3. `Maximum Length` The maximum number of tokens to **generate**. Requests can use up to 2,048 or 4,000 tokens shared between prompt and completion.\n4. `Top P` Controls diversity via nucleus sampling: 0.5 means hald of all likelihood-weighted options are considered.\n5. `Frequency Penalty` How much to penalize new tokens based on their existing frequency in the text so far. Decreases the models likelihood to repeat the same line verbatim.\n6. `Presence Penalty` How much to penalize new tokens based on whether they appear in the text so far. Increases the models likelihood to talk about new topics.\n7. `API Key Override` Used to set an API Key to be used specificly on this operation.\n\n![config](examples/davinci-config.png)\n\n### ChatGPT Operation\n\nThis operation allows chat text completion using any of the available OpenAI models with the [OpenAI API](https://platform.openai.com/docs/guides/chat) taking a list of `messages` as input and returns the generated response text.\n![Demo](examples/chatgpt_demo.gif)\n\n**Output**\\\nAn object containing the generated text:\n```json\n{ \"response\": \"Generated chat message\" }\n```\n\n**Configuration Options**\\\nPlease check out the [OpenAI docs](https://platform.openai.com/docs/guides/chat) for details usage.\n\n1. `Messages` a *json string* list of messages as described in [OpenAI docs](https://platform.openai.com/docs/guides/chat/introduction)\n2. `Temperature` Controls randomness: Lowering results in less random completions.\n3. `Maximum Length` The maximum number of tokens to **generate**. Requests can use up to 2,048 or 4,000 tokens shared between prompt and completion.\n4. `Top P` Controls diversity via nucleus sampling: 0.5 means hald of all likelihood-weighted options are considered.\n5. `Frequency Penalty` How much to penalize new tokens based on their existing frequency in the text so far. Decreases the models likelihood to repeat the same line verbatim.\n6. `Presence Penalty` How much to penalize new tokens based on whether they appear in the text so far. Increases the models likelihood to talk about new topics.\n7. `API Key Override` Used to set an API Key to be used specificly on this operation.\n\n### Configuration Hook\n\nThis hook ensures the existence of API Key fields in the Directus Setting. These global settings will be used by the individual operations if not overridden in its local configuration. You can now also select your model of choice. If you want to manually choose one, simply click edit raw value.\n\n![Global Configuration](examples/global-configuration.png)\n",21,3,"https://github.com/br41nslug/directus-extension-ai-pack.git",2295,"bundle",{"description":390,"featured_image":391,"formatted_description":390,"formatted_name":392,"host_version":322,"id":393,"images":394,"last_updated":396,"license":326,"name":300,"published_at":397,"publisher":398,"readme":399,"recent_downloads_30_days":400,"recent_downloads_7_days":401,"sandbox":258,"total_downloads":402,"type":341},"Use OpenAI Vision models to find an image's focal points.","https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-focal-point-detection-operation/docs/options.png","AI Focal Point Detection Operation","ef89be76-255d-428b-9ab3-1fe38b4e71f4",[391,395],"https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-focal-point-detection-operation/docs/output.png",1734520024,1723464501,{"github_avatar_url":329,"github_bio":330,"github_blog":331,"github_company":332,"github_location":333,"github_name":334,"github_username":335,"id":336,"username":335,"verified":258},"# AI Focal Point Detection Operation\n\nDetermine an image focal point, powered by [OpenAI](https://platform.openai.com/).\n\n![The AI Focal Point Detection operation, showing an Openai API Key field and a File URL field.](https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-focal-point-detection-operation/docs/options.png)\n\nThis operation contains two required configuration options - an [OpenAI API Key](https://platform.openai.com), and a link to a file. It returns a JSON object containing the focal point coordinates and the reason these were chosen.\n\n![The output showing a JSON object containing a a flocal_point_x, focal_point_y, and reason parameter.](https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-focal-point-detection-operation/docs/output.png)\n\nYou can use the operation to then save the result to a file.\n\n## Output\n\nThis operation outputs a JSON object with the following structure:\n\n```json\n{\n    \"focal_point_x\": 328,\n    \"focal_point_y\": 250,\n    \"reason\": \"Centered between the two people on the beach, who are the main subjects of the image.\"\n}\n```\n\nUse an Update Data operation to store the `focal_point_x` and `focal_point_y` values on the file object.\n\n## Flow Setup\n\n### Automatically Detect Focal Points For New Files\n\nCreate a Flow with an **Event Hook** action trigger and a scope of `files.upload`. Use the AI Focal Point detection operation, setting the File URL to `https://your-directus-project-url/assets/{{ $trigger.key }}`, being sure to provide your specific Directus Project URL.\n\nThis will work if your file is public, but if it isn't, you can append `?access_token=token` to the File URL, replacing the value with a valid user token that has access to the file.\n\nThis operation will trigger on every new file upload, regardless of location or filetype. You may wish to add a conditional step between the trigger and detection operation. The following condition rule will check that the file is an image:\n\n```json\n{\n    \"$trigger\": {\n        \"payload\": {\n            \"type\": {\n                \"_contains\": \"image\"\n            }\n        }\n    }\n}\n```\n\n### Detect On-Demand\n\nCreate a Flow with a **Manual** trigger and select a collection with a file field, which should contain an image file. Set the Location to Item Page Only. To receive the file ID create a **Read Data** operation for the same collection, setting IDs to `{{ $trigger.body.keys[0] }}`.\n\nUse the AI Focal Point Detection operation, setting the File URL to `https://your-directus-project-url/assets/{{ $last.file_field_name }}`, being sure to provide your specific Directus Project URL and file field name.\n",49,1,1113,{"description":404,"formatted_description":404,"formatted_name":405,"host_version":406,"id":407,"images":408,"last_updated":409,"name":299,"published_at":409,"publisher":410,"readme":417,"recent_downloads_30_days":418,"recent_downloads_7_days":401,"sandbox":190,"total_downloads":419,"type":388},"A powerful Directus extension leveraging GPT-4 AI to simplify CMS management and automate complex tasks with intuitive AI commands.","Assistant","^10.2.0","999a74ca-1517-4aa3-9750-4c367b535d30",[],1702286959,{"github_avatar_url":411,"github_blog":195,"github_location":412,"github_name":413,"github_username":414,"id":415,"username":416,"verified":190},"https://avatars.githubusercontent.com/u/17298604?v=4","Palma de Mallorca","Bernat Vadell","bernatvadell","85b0bca9-0296-42d9-8109-5e44e85e23e4","bvadell","# Directus Chat Assistant Extension\n## Overview\nDirectus Assistant revolutionizes the way you manage your CMS, harnessing the power of OpenAI's GPT-4 to expand beyond traditional capabilities. This innovative tool empowers users with the ability to execute complex functions seamlessly, even those not natively supported by the CMS.\n\nImagine effortlessly instructing the Assistant to identify and merge duplicate items, and then to remove any redundancies – tasks that typically require intricate manual processes or advanced programming skills. With Directus Assistant, these actions are simplified into intuitive commands, making CMS management more efficient and user-friendly.\n\nBy leveraging the cutting-edge AI of GPT-4, Directus Assistant not only enhances your productivity but also unlocks new possibilities for content management, offering a glimpse into the future of AI-assisted digital administration.\n\n## Features\n* **ItemsService:** The main functionalities of ItemsService have been mapped to be able to manage the content of the collections.\n\n## Screenshots\n- Chat Assistant Interface: \n![Chat Assistant Interface](/screenshots/assistant_1.jpg)\n- Collection Items List: \n![ Collection Items List](/screenshots/list_of_cars.jpg)\n- Execution Logs: \n![ Collection Items List](/screenshots/tools_call.jpg)\n\n## Setup and Configuration\n### As package npm setup\nSee this \"how to\" provided by Directus:\nhttps://docs.directus.io/extensions/installing-extensions.html#installing-through-npm\n\nPackage name: directus-extension-assistant\n\n### Local setup\nTo get started with this extension, follow the steps below:\n\n1. Clone the Repository:\n```sh\ngit clone https://github.com/bernatvadell/directus-assistant.git\ncd directus-assistant/\n```\n2. Create .env File:\nThis project requires an API key from OpenAI. Create a .env file in the root directory and add your OpenAI API key:\n\n```\nOPENAI_API_KEY=your_openai_api_key_here\n```\n\n3. Install Dependencies & Build:\n```sh\npnpm install\npnpm dev\n```\n\n4. Running Directus:\nAfter setting up the environment and dependencies, you can start the Directus:\n\n```sh\ndocker compose up\n```\n\n## Usage\nOnce the extension is up and running, you can interact with the Chat Assistant through the Directus UI. Just type in your queries like you would in a normal conversation, and the assistant will fetch the relevant data from your Directus collections.\n\n## Disclaimer\n### Response Accuracy\nWhile this Directus Chat Assistant Extension leverages the advanced capabilities of OpenAI's GPT-4-1106-preview model, it's important to note that the accuracy of responses may vary. The assistant strives to provide relevant and contextually appropriate information based on the input queries and the underlying data schema. However, users should be aware that the responses might not always be entirely precise or exhaustive, and should verify critical information independently.\n\n### Token Consumption\nThe integration of GPT-4-1106-preview model in this extension involves significant token consumption, primarily due to the comprehensive nature of data schema analysis and query processing. Users should be mindful of the potentially high usage of OpenAI tokens, which could lead to elevated API costs. It's recommended to monitor the token usage regularly and consider optimizing queries for efficiency.\n\nBy using this extension, you acknowledge and agree to these limitations and conditions.",7,601,{"description":421,"featured_image":422,"formatted_description":421,"formatted_name":423,"host_version":346,"id":424,"images":425,"last_updated":428,"license":326,"name":303,"published_at":428,"publisher":429,"readme":430,"recent_downloads_30_days":431,"recent_downloads_7_days":432,"sandbox":190,"total_downloads":433,"type":388},"An AI agent for the purpose of content research within the Editor","https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-researcher-bundle/docs/interface.png","AI Researcher Bundle","c1fd2d7e-d36c-4419-91ee-3deb67d8cb44",[422,426,427],"https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-researcher-bundle/docs/chat-history.png","https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-researcher-bundle/docs/settings.png",1738264427,{"github_avatar_url":329,"github_bio":330,"github_blog":331,"github_company":332,"github_location":333,"github_name":334,"github_username":335,"id":336,"username":335,"verified":258},"# AI Researcher\nA Directus interface that integrates an AI chatbot powered by OpenAI or Anthropic directly into the Directus editor.\n\n\n![](https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-researcher-bundle/docs/interface.png)\n\n![](https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-researcher-bundle/docs/chat-history.png)\n\n## Features\n- Chat with AI directly from your Directus editor\n- View the chat history\n- Start a new chat\n\n## Prerequisites\n- An OpenAI or Anthropic API key\n\n## Installation\nTo install the extension, take a look at the [official guide](https://docs.directus.io/extensions/installing-extensions.html).\n\n## Configuration\n\n![](https://raw.githubusercontent.com/directus-labs/extensions/main/packages/ai-researcher-bundle/docs/settings.png)\n\nYou can select the AI provider and models directly from the interface configuration.\n\n### API-Keys\nThe API keys can be added either in the interface configuration or via environment variables:\n\n```env\nEXTENSION_AI_RESEARCHER_API_KEY_OPENAI=\"\u003CYOUR_API_KEY>\"\nEXTENSION_AI_RESEARCHER_API_KEY_ANTHROPIC=\"\u003CYOUR_API_KEY>\"\n```\n\n> [!IMPORTANT]  \n> If you add the API key via the interface configuration, it will be exposed to your app users. Add them via environment variables to fully hide and protect them.\n\n\nYou can generate your API keys on the following sites:\n\n- [OpenAi](https://platform.openai.com/api-keys)\n- [Anthropic](https://console.anthropic.com/settings/workspaces/default/keys)\n\n### Support\nFor issues and feature requests, please use the GitHub issues section of this repository.",9,2,287,{"items":435},[436,453,472,491],{"id":437,"title":438,"url":8,"page":8,"children":439},"522e608a-77b0-4333-820d-d4f44be2ade1","Solutions",[440,443,446,450],{"id":441,"title":15,"url":8,"page":442},"fcafe85a-a798-4710-9e7a-776fe413aae5",{"permalink":20},{"id":444,"title":23,"url":8,"page":445},"79972923-93cf-4777-9e32-5c9b0315fc10",{"permalink":28},{"id":447,"title":448,"url":8,"page":449},"0fa8d0c1-7b64-4f6f-939d-d7fdb99fc407","Product Information",{"permalink":36},{"id":451,"title":452,"url":40,"page":8},"63946d54-6052-4780-8ff4-91f5a9931dcc","100+ Things to Build",{"id":454,"title":76,"url":8,"page":8,"children":455},"8ab4f9b1-f3e2-44d6-919b-011d91fe072f",[456,460,464,468],{"id":457,"title":458,"url":459,"page":8},"f951fb84-8777-4b84-9e91-996fe9d25483","Documentation","https://docs.directus.io",{"id":461,"title":462,"url":463,"page":8},"366febc7-a538-4c08-a326-e6204957f1e3","Guides","https://docs.directus.io/guides/",{"id":465,"title":466,"url":467,"page":8},"aeb9128e-1c5f-417f-863c-2449416433cd","Community","https://directus.chat",{"id":469,"title":470,"url":471,"page":8},"da1c2ed8-0a77-49b0-a903-49c56cb07de5","Release Notes","https://github.com/directus/directus/releases",{"id":473,"title":131,"url":8,"page":8,"children":474},"d61fae8c-7502-494a-822f-19ecff3d0256",[475,479,483,487],{"id":476,"title":477,"url":478,"page":8},"8c43c781-7ebd-475f-a931-747e293c0a88","Issue Tracker","https://github.com/directus/directus/issues",{"id":480,"title":481,"url":482,"page":8},"d77bb78e-cf7b-4e01-932a-514414ba49d3","Feature Requests","https://github.com/directus/directus/discussions?discussions_q=is:open+sort:top",{"id":484,"title":485,"url":486,"page":8},"4346be2b-2c53-476e-b53b-becacec626a6","Community Chat","https://discord.com/channels/725371605378924594/741317677397704757",{"id":488,"title":489,"url":490,"page":8},"26c115d2-49f7-4edc-935e-d37d427fb89d","Cloud Dashboard","https://directus.cloud",{"id":492,"title":207,"url":8,"page":8,"children":493},"49141403-4f20-44ac-8453-25ace1265812",[494,498,503,507],{"id":495,"title":496,"url":112,"page":497},"1f36ea92-8a5e-47c8-914c-9822a8b9538a","About",{"permalink":112},{"id":499,"title":500,"url":91,"page":501},"b84bf525-5471-4b14-a93c-225f6c386005","Careers",{"permalink":502},"/careers",{"id":504,"title":505,"url":506,"page":8},"86aabc3a-433d-434b-9efa-ad1d34be0a34","Brand Assets","https://drive.google.com/drive/folders/1lBOTba4RaA5ikqOn8Ewo4RYzD0XcymG9?usp=sharing",{"id":508,"title":124,"url":8,"page":509},"8d2fa1e3-198e-4405-81e1-2ceb858bc237",{"permalink":128},{"id":511,"icon":512,"content":513,"link":514},"812bf73d-ebfb-4246-9538-937a09a0c795","connected_tv","Learn more about our native MCP","https://directus.io/mcp",{"id":9,"title":516,"description":517,"image":518,"external_url":8,"icon":8,"badge":8,"page":519,"resource":8},"Built With Directus","See what everyone's been building with Directus","e658de72-fb08-4ed2-8029-215c712c789e",{"permalink":520},"/built-with-directus",{"id":77,"title":522,"description":523,"image":524,"external_url":525,"icon":512,"badge":526,"page":8,"resource":8},"Directus TV","Go down the rabbit hole with hours of original video content from our team. ","ab70faf5-fc28-4608-a7e7-74fd4f020a9d","/tv","Video",{"alignment":528,"style":529,"experiment_enabled":190,"experiment":8,"experiment_variant":530,"buttons":533,"variants":543},"center","default",{"id":531,"key":532,"experiment":8},"8c4951b4-a6f9-4c06-9f71-fd39a3bdad1e","control",[534,537,540],{"id":535,"block_button_id":536},15,"358b0659-1f05-4427-bd1c-4bc03a43c182",{"id":538,"block_button_id":539},16,"9df3f40e-6272-4ec6-a0d7-cc29265e087c",{"id":541,"block_button_id":542},232,"1b444c23-b593-4391-9410-4ca5d2c7a7cb",[544],{"id":545,"alignment":528,"style":529,"buttons":546,"experiment_variant":553},"e1885d45-3119-41a3-8294-3cd796ea6f02",[547,550],{"id":548,"block_button_id":549},203,"ade37731-147d-48c4-864a-cec007576362",{"id":551,"block_button_id":552},202,"1cb4e89f-f7de-4b46-bbb8-080191517a72",{"id":554,"key":555},"66d2be4f-2492-4944-8060-039c15515918","variant",{"id":542,"external_url":490,"label":557,"color":558,"outline":258,"icon":559,"size":560,"target":561,"ph_event":8,"page":8,"resource":8},"Log In","secondary","arrow_forward","medium","_self",{"id":536,"external_url":8,"label":563,"color":564,"outline":190,"icon":8,"size":560,"target":561,"ph_event":8,"page":565,"resource":8},"Book a Demo","primary",{"permalink":566},"/demo",{"id":539,"external_url":568,"label":569,"color":558,"outline":190,"icon":8,"size":560,"target":561,"ph_event":8,"page":8,"resource":8},"https://directus.cloud/account/register","Get Started"]