# Connect OpenAI to your AI agent

> Yes — ClawLink is a hosted OpenAI MCP server. 126 tools your agent can call from chat, with one-click API key and nothing to run locally.

Web version: https://claw-link.dev/hub/openai

ClawLink hosts a managed OpenAI MCP server that exposes 126 tools to your AI agent. You connect OpenAI in one click, and your agent can read, create, and update OpenAI data from chat without you building or running a local MCP server.

## Quick facts

- 126 tools callable from chat
- One-click API key
- Works with OpenClaw, Hermes, Claude Code, Cursor, Codex, and any MCP client
- No local server or config files

## Overview

The usual path is: build auth, handle token refresh, wire up the tools. With ClawLink you connect OpenAI once and start using the real actions from the agent.

## Setup

OpenAI uses an API key. You paste it once during setup and ClawLink handles the rest. No secure storage to build, no per-request auth headers to manage.

Authentication: API key

## What you can do

- **Mix model output with real tools** — Call OpenAI inside the agent when model output and real actions need to happen together.
- **Skip the glue code** — Reach OpenAI from chat to test a workflow before you write custom automation around it.
- **Keep it practical** — The agent calls OpenAI, reads the result, and iterates. No separate integration project first.

## OpenAI tools

126 OpenAI tools, ready the moment you connect.

- `openai_add_upload_part` — Tool to add a part (chunk of bytes) to an Upload object. Use when uploading large files in chunks, with each part up to 64 MB.
- `openai_cancel_batch` — Tool to cancel an in-progress batch. Use when you need to stop a batch that is currently processing. The batch will be in status 'cancelling' for up to 10 minutes before changing to 'cancelled', where partial results (if any) will be available.
- `openai_cancel_eval_run` — Tool to cancel an ongoing evaluation run. Use when you need to stop an evaluation run that is currently in progress.
- `openai_cancel_response` — Tool to cancel a background model response by its ID. Use when you need to stop a response that was created with the 'background' parameter set to true. Only background responses can be cancelled; attempting to cancel a non-background response will fail.
- `openai_cancel_run` — Tool to cancel a run that is currently in progress. Use when you need to stop an assistant run that is taking too long or is no longer needed. The run's status will transition to 'cancelling' and then 'cancelled'.
- `openai_cancel_upload` — Tool to cancel an upload. Use when you need to stop an upload that is in progress. No parts may be added after cancellation.
- `openai_compact_response` — Tool to compact a conversation or response to reduce token usage. Use when you need to reduce the size of long conversations while preserving important context. Either provide an array of input messages or reference a previous response ID to compact.
- `openai_create_audio_transcription` — Tool to transcribe audio files to text via OpenAI Audio Transcriptions API. Use when you need to convert speech in audio files to written text, optionally with timestamps or speaker diarization.
- `openai_create_audio_translation` — Tool to translate audio files to English text via OpenAI Audio Translations API. Use when you need to convert speech in audio files (any language) to English text.
- `openai_create_batch` — Tool to create and execute a batch from an uploaded file of requests. Use after uploading a JSONL file with purpose 'batch' to process multiple API requests in a single batch operation.
- `openai_create_chat_completion` — Tool to create a chat completion response from OpenAI models. Use for conversational AI, text generation, function calling, multimodal tasks with vision/audio, and structured JSON outputs. Supports advanced features like reasoning models, tool use, and streaming responses.
- `openai_create_completion` — Tool to generate text completions using OpenAI's legacy Completions API. Use for single-turn text generation with models like gpt-3.5-turbo-instruct. Note: This endpoint is legacy; prefer Chat Completions for newer models.
- `openai_create_embeddings` — Generate text embeddings via the OpenAI embeddings endpoint
- `openai_create_moderation` — Classify text and/or image inputs for potentially harmful content via the OpenAI Moderation API
- `openai_create_speech` — Generate text-to-speech audio using OpenAI's Audio API
- `openai_download_file` — Download the contents of a specified file by its ID
- `openai_download_video` — Download video content (MP4) or preview assets from OpenAI Videos API
- `openai_get_chat_completion` — Retrieve a stored chat completion
- `openai_get_chat_completion_messages` — Retrieve messages from a stored chat completion
- `openai_get_chatkit_thread` — Retrieve a ChatKit thread by its ID
- `openai_get_conversation_item` — Retrieve a single item from a conversation
- `openai_get_eval` — Retrieve an evaluation by ID
- `openai_get_eval_run` — Retrieve an evaluation run by ID to check status and results
- `openai_get_eval_run_output_item` — Retrieve a specific output item from an evaluation run by its ID
- `openai_get_eval_run_output_items` — Get a list of output items for an evaluation run
- `openai_get_eval_runs` — Get a paginated list of runs for an evaluation
- `openai_get_input_token_counts` — Calculate input token counts for OpenAI API requests
- `openai_get_message` — Retrieve a specific message from a thread by its ID
- `openai_get_response` — Retrieve a model response by ID
- `openai_get_run_step` — Retrieve a specific run step from an Assistants API run to inspect detailed execution progress

## Example prompts

- **Add upload part:** Use OpenAI to add upload part and walk me through it.
- **Cancel batch:** Use OpenAI to cancel batch and walk me through it.
- **Cancel eval run:** Use OpenAI to cancel eval run and walk me through it.
- **Cancel response:** Use OpenAI to cancel response and walk me through it.

## ClawLink vs. building it yourself

| | Manual | ClawLink |
|---|---|---|
| Connection | Build it yourself. You generate and rotate OpenAI API keys, store them safely, keep per-environment secrets straight, and make sure every tool call uses the right key. | Hosted API key. Connect once in the browser. ClawLink owns the lifecycle. |
| Maintenance | Token refresh, permission debugging, env config, every edge case. All yours. | ClawLink handles the plumbing. You focus on the workflow. |
| Time to first call | Days to weeks. Auth, storage, tool wiring, testing. Then the agent can act. | About two minutes from sign-up to the agent calling OpenAI. |

## FAQ

### How do I connect OpenAI to my AI agent?

Install ClawLink, open the dashboard, click Connect next to OpenAI, and finish the API key flow. Your agent can call OpenAI from the next message. Two minutes, total.

### Is there a OpenAI MCP server I can use?

Yes. ClawLink exposes OpenAI as 126 tools your agent calls through a hosted MCP-compatible runtime. You don't run a local server or edit a config file. The tools are there the moment you connect.

### Do I need OpenAI API credentials?

Yes. You'll paste your OpenAI API key once during setup. ClawLink stores it and uses it for every tool call after.

### How much does it cost?

Your first integration is free, plus a 7-day trial of the full catalog. Paid plans unlock the rest of the library.

### Can I set this up from the terminal instead of the dashboard?

Yes. Run npx -y @useclawlink/cli login, then npx -y @useclawlink/cli connect openai. The first opens a browser to sign in to ClawLink. The second opens a browser to authorize OpenAI. No API keys to create. Works with OpenClaw, Hermes, Claude Code, Cursor, Codex, and any agent that runs shell commands.
