- Work on a repository: Provide a
repoUrlto have the agent analyze and modify code in a GitHub repository - Standalone prompt: Omit
repoUrlto treat the request as a direct prompt for the agent to perform actions
Authentication
To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:- Click on your Profile Image in the top right corner at cloud.blackbox.ai
- Click on “BLACKBOX MCP Token” from the dropdown menu
- Copy the existing token or click “Generate” if you don’t have one yet
bb_xxxxxxxxxxxxxxxxxxxxxx
Headers
API Key of the form
Bearer <api_key>.Example: Bearer bb_b41b647ffbfed27f61656049d3eaeef3d903cc503345d9eb80080d98bc0Must be set to
application/json.Request
The task description or instruction for the AI agent to execute. Be specific about what you want the agent to do.Examples:
- “Create README in French”
- “Add unit tests for authentication module”
- “Refactor the database connection logic”
- “Write a Python script to process CSV files”
GitHub repository URL to work on. If provided, the agent will clone and work on this repository.Important: If
repoUrl is not passed, the request will be treated as a standalone prompt for the agent to perform actions without a repository context.Example: https://github.com/<org-name>/<repo-name>.gitThe branch to work on in the repository. Defaults to
main if not specified.Example: main, develop, feature/new-apiThe AI agent to use for executing the task. Each agent has different capabilities and specializations.Available agents:
claude- Anthropic’s Claude models (Sonnet 4.5, Sonnet 4, Opus 4)blackbox- BLACKBOX AI models with multiple provider optionscodex- OpenAI’s GPT models (GPT-5, GPT-4.1)gemini- Google’s Gemini models (2.0 Flash, 2.5 Pro)
blackboxThe specific AI model to use with the selected agent. Each agent supports different models.See the Agent Models section below for available options per agent.Default:
blackboxai/blackbox-proAgent Models
Claude Agent
blackboxai/anthropic/claude-sonnet-4.5
BLACKBOX Agent
blackboxai/blackbox-pro
Codex Agent
gpt-5-codex
Gemini Agent
gemini-2.0-flash-exp
Usage Modes
Repository Mode
WhenrepoUrl is provided, the agent will:
- Clone the specified repository
- Checkout the selected branch
- Analyze the codebase
- Execute the task within the repository context
- Create commits with the changes
Standalone Mode
WhenrepoUrl is not provided, the agent will:
- Treat the prompt as a standalone instruction
- Execute the task without repository context
- Return results or generated code directly
- Code generation tasks
- Algorithm implementation
- Documentation writing
- Quick scripts or utilities
- Q&A or explanations