Practical overview
When it fits
Use it when a project specifically needs a Python wrapper or REST server around Meta AI chat, image generation or conversation handling, and can accommodate browser-cookie authentication.
Who it is for
- Python developers who want to call Meta AI chat or image generation from a Python project.
- Developers who want to expose documented Meta AI chat and image-generation functions through a REST server.
- Teams building conversation workflows that need to list or start conversations and retrieve media by card ID.
Documented uses
- Send a text prompt to Meta AI and retrieve a chat response.
- Generate images from text prompts and obtain image URLs.
- List or start conversations.
- Expose chat and image-generation requests through a server for clients written in other languages.
- Fetch media URLs for already-generated media using a card ID.
Requirements & limits
The repository is public and lists an MIT license. The documented authentication uses the datr and ecto_1_sess browser cookies; the server can also be configured with an optional API key.
- The project is unofficial and reverse-engineered, not affiliated with or endorsed by Meta.
- Current primary methods use browser automation through agent-browser and headless Chrome.
- Cookie-based authentication may break as Meta changes its platform.
- The documented current interface does not provide video generation or image upload.
- The README documents a Python SDK and a FastAPI server; the server offers chat, image generation, conversation listing and media-fetching endpoints.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare Meta AI cookies for the SDK or server
Obtain the two browser cookies the project uses for authentication and make them available to the SDK or API server.
Before you start
- A browser session logged in to meta.ai
- The metaai-api project and its documented Python/browser dependencies for running the SDK or server
Steps
Open meta.ai and log in.
Open browser developer tools and navigate to Application → Cookies → https://www.meta.ai.
Copy the values of datr and ecto_1_sess.
Pass the values in the SDK cookies argument or set META_AI_DATR and META_AI_ECTO_1_SESS for the server.
Expected outcome
The project has the cookie values its documented SDK and server authentication methods require.
Guide limitations
- The repository warns that cookie-based authentication can break when Meta updates its platform.
- This is an authentication-setup guide; it does not verify that a request will succeed.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- mir-ashiq/metaai-api · Official homepage title · retained in its source language

