# mir-ashiq/vibesai-api architecture

> Architecture diagram of the GitHub repository mir-ashiq/vibesai-api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mir-ashiq/vibesai-api
- Repository: https://github.com/mir-ashiq/vibesai-api

## Overview

vibes-api is an unofficial Python client and REST/CLI interface to Vibes.ai’s private API. The main workflow is to authenticate with a session cookie, manage a project, submit generation or editing requests, poll batches where needed, and download or export results. The client also exposes studio, media, collaboration, timeline, and account capabilities. The sampled files show the CLI and REST server delegating to the client, but do not expose every client method’s internal call path; the capability branches below therefore share the client implementation path.

Main entry points: [`vibes_api/client.py`](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py) (Vibes client), [`vibes_api/tts_fallback.py`](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/tts_fallback.py) (Speech synthesis), [`server/app.py`](https://github.com/mir-ashiq/vibesai-api/blob/main/server/app.py) (REST server), [`vibes_api/cli.py`](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/cli.py) (Command line)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["Command line<br/>[cli.py]"]
  node_rest["REST server<br/>[app.py]"]
end

subgraph group_generation["Generation lifecycle"]
  node_client["Vibes client<br/>[client.py]"]
  node_projects_auth["Auth and projects<br/>[client.py]"]
  node_generation_ops["Generation and edits<br/>[client.py]"]
  node_batch_ops["Batch polling<br/>[client.py]"]
end

subgraph group_studio["Studio and media"]
  node_uploads["Media uploads<br/>[client.py]"]
  node_media_library["Media library<br/>[client.py]"]
  node_ingredients["Ingredients<br/>[ingredients.py]"]
  node_models["API models<br/>[models.py]"]
  node_moodboards_music["Moodboards and music<br/>[client.py]"]
  node_sharing_sync["Sharing and sync<br/>[client.py]"]
  node_collab_account["Collaboration and account<br/>[client.py]"]
end

subgraph group_timeline["Timeline and speech"]
  node_composition["Composition builder<br/>[composition.py]"]
  node_timeline_ops["Timeline chat and export<br/>[client.py]"]
  node_tts["Speech synthesis<br/>[tts_fallback.py]"]
end

node_cli_user(("CLI user"))
node_rest_caller(("REST caller"))
node_vibes{{"Vibes.ai API"}}
node_edge_tts{{"Edge TTS"}}
node_google_tts{{"Google Translate TTS"}}

node_cli_user -->|"runs commands"| node_cli
node_cli -->|"invokes methods"| node_client
node_rest_caller -->|"calls endpoints"| node_rest
node_rest -->|"delegates requests"| node_client
node_client -->|"sends API requests"| node_vibes
node_client -->|"implements"| node_projects_auth
node_client -->|"implements"| node_generation_ops
node_client -->|"implements"| node_batch_ops
node_client -->|"implements"| node_uploads
node_client -->|"implements"| node_media_library
node_client -->|"implements"| node_moodboards_music
node_client -->|"implements"| node_sharing_sync
node_client -->|"implements"| node_collab_account
node_client -->|"uses helpers"| node_ingredients
node_ingredients -->|"uses types"| node_models
node_composition -->|"serializes for saving"| node_client
node_client -->|"exports timeline"| node_composition
node_client -->|"implements"| node_timeline_ops
node_rest -->|"calls synthesis"| node_tts
node_client -->|"uses fallback"| node_tts
node_tts -.->|"falls back to"| node_edge_tts
node_tts -.->|"falls back to"| node_google_tts

click node_cli "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/cli.py"
click node_rest "https://github.com/mir-ashiq/vibesai-api/blob/main/server/app.py"
click node_client "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_projects_auth "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_generation_ops "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_batch_ops "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_uploads "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_media_library "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_ingredients "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/ingredients.py"
click node_models "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/models.py"
click node_moodboards_music "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_sharing_sync "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_collab_account "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_composition "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/composition.py"
click node_timeline_ops "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py"
click node_tts "https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/tts_fallback.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_rest,node_cli_user toneBlue
class node_client,node_projects_auth,node_generation_ops,node_batch_ops toneAmber
class node_uploads,node_media_library,node_ingredients,node_models,node_moodboards_music,node_sharing_sync,node_collab_account,node_vibes toneMint
class node_composition,node_timeline_ops,node_tts toneRose
class node_rest_caller,node_edge_tts,node_google_tts toneIndigo
```

## Components

### User interfaces

- [Command line](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/cli.py): `vibes_api/cli.py`
- [REST server](https://github.com/mir-ashiq/vibesai-api/blob/main/server/app.py): `server/app.py`

### Generation lifecycle

- [Vibes client](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`
- [Auth and projects](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`
- [Generation and edits](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`
- [Batch polling](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`

### Studio and media

- [Media uploads](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`
- [Media library](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`
- [Ingredients](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/ingredients.py): `vibes_api/ingredients.py`
- [API models](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/models.py): `vibes_api/models.py`
- [Moodboards and music](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`
- [Sharing and sync](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`
- [Collaboration and account](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`

### Timeline and speech

- [Composition builder](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/composition.py): `vibes_api/composition.py`
- [Timeline chat and export](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/client.py): `vibes_api/client.py`
- [Speech synthesis](https://github.com/mir-ashiq/vibesai-api/blob/main/vibes_api/tts_fallback.py): `vibes_api/tts_fallback.py`

### Other components

- **CLI user**
- **REST caller**
- **Vibes.ai API**
- **Edge TTS**
- **Google Translate TTS**

## Connections

- CLI user → Command line: runs commands (evidence: `vibes_api/cli.py`)
- Command line → Vibes client: invokes methods (evidence: `vibes_api/cli.py`)
- REST caller → REST server: calls endpoints (evidence: `server/app.py`)
- REST server → Vibes client: delegates requests (evidence: `server/app.py`)
- Vibes client → Vibes.ai API: sends API requests (evidence: `vibes_api/client.py`)
- Vibes client → Auth and projects: implements (evidence: `README.md`)
- Vibes client → Generation and edits: implements (evidence: `README.md`)
- Vibes client → Batch polling: implements (evidence: `README.md`)
- Vibes client → Media uploads: implements (evidence: `README.md`)
- Vibes client → Media library: implements (evidence: `README.md`)
- Vibes client → Moodboards and music: implements (evidence: `README.md`)
- Vibes client → Sharing and sync: implements (evidence: `README.md`)
- Vibes client → Collaboration and account: implements (evidence: `vibes_api/__init__.py`)
- Vibes client → Ingredients: uses helpers (evidence: `vibes_api/client.py`)
- Ingredients → API models: uses types (evidence: `vibes_api/ingredients.py`)
- Composition builder → Vibes client: serializes for saving (evidence: `vibes_api/composition.py`)
- Vibes client → Composition builder: exports timeline (evidence: `README.md`)
- Vibes client → Timeline chat and export: implements (evidence: `README.md`)
- REST server → Speech synthesis: calls synthesis (evidence: `server/app.py`)
- Vibes client → Speech synthesis: uses fallback (evidence: `vibes_api/client.py`)
- Speech synthesis → Edge TTS: falls back to
- Speech synthesis → Google Translate TTS: falls back to
