# Fireworks AI — how to use (mcp.ai)

Connect your Fireworks AI account and use 9 tools for artificial intelligence straight from your AI agent. Connect with your own API key. Fireworks AI provides APIs for serverless model inference, fine-tuning, deployments, datasets, evaluations, and account management.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_fireworks_ai?ms=1787296020000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `fireworks_ai_create_chat_completion`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/fireworks_ai`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/fireworks_ai/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/fireworks_ai/create/chat/completion` — Generate one non-streaming OpenAI-compatible chat completion from role-based messages using a caller-supplied Fireworks model or deployment ID.
  - body: { seed?: integer, stop?: string|string[], model: string, tools?: object[], top_p?: number, messages: object[], max_tokens?: integer, temperature?: number, tool_choice?: string|object, response_format?: object }
- `POST https://api.mcp.ai/api/fireworks_ai/create/embeddings` — Create embedding vectors for one or more caller-provided inputs using a caller-supplied Fireworks embedding model.
  - body: { input: string|string[]|object|object[], model: string, normalize?: boolean, dimensions?: integer, prompt_template?: string }
- `POST https://api.mcp.ai/api/fireworks_ai/generate/model/response` — Generate one non-streaming Responses API result, optionally continuing a stored response or using function, MCP, or SSE tools; storage is off by default.
  - body: { input: string|object[], model: string, store?: boolean, tools?: object[], top_p?: number, truncation?: string, temperature?: number, tool_choice?: string|object, instructions?: string, max_tool_calls?: integer, max_output_tokens?: integer, previous_response_id?: string }
- `POST https://api.mcp.ai/api/fireworks_ai/get/deployment` — Return configuration and serving status for one Fireworks deployment without scaling or modifying it.
  - body: { read_mask?: string, account_id: string, deployment_id: string }
- `POST https://api.mcp.ai/api/fireworks_ai/get/model` — Return metadata and status for one model resource in a Fireworks account; this does not test whether the model can serve inference.
  - body: { model_id: string, read_mask?: string, account_id: string }
- `POST https://api.mcp.ai/api/fireworks_ai/list/accounts` — Return one page of Fireworks accounts accessible to the API key so an agent can obtain account IDs for model and deployment discovery.
  - body: { filter?: string, page_size?: integer, read_mask?: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/fireworks_ai/list/deployments` — Return one page of deployment resources in a Fireworks account for deployment ID discovery and serving-capacity and status inspection.
  - body: { filter?: string, order_by?: string, page_size?: integer, read_mask?: string, account_id: string, next_cursor?: string, show_deleted?: boolean }
- `POST https://api.mcp.ai/api/fireworks_ai/list/models` — Return one page of model resources in a Fireworks account for model-ID discovery and status inspection; availability for inference is not guaranteed.
  - body: { filter?: string, order_by?: string, page_size?: integer, read_mask?: string, account_id: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/fireworks_ai/rerank/documents` — Rank a provided document list by relevance to a query using an optional caller-supplied Fireworks reranker model.
  - body: { task?: string, model?: string, query: string, top_n?: integer, documents: string[], return_documents?: boolean }

## Example prompts
- "What can I do in Fireworks AI?"
- "Show me a summary of my Fireworks AI account"

## More
- Page: https://mcp.ai/fireworks_ai
- Agent spec (llms.txt): https://mcp.ai/fireworks_ai/llms.txt
- Postman collection: https://mcp.ai/fireworks_ai/postman.json
