Automate Instagram and YouTube posting with Claude without getting banned

Use Claude to plan, write and schedule posts through YouTube's and Instagram's official tools and APIs, follow their automation rules, and disclose AI content correctly.

  • Level Intermediate
  • Time 1-2 hours to set up, then minutes per week
  • Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code
On this page7 sections

This guide sets up a posting routine where Claude does the slow parts (planning, captions, titles, descriptions, hashtags, a content calendar) and your posts go out through the platforms’ own scheduling tools or official APIs. Done this way, automation is something YouTube and Meta explicitly support. The things that get accounts restricted are different: bots that like, follow or comment, password-sharing tools, bought engagement, and undisclosed realistic AI content.

One honest limit up front: Claude has no built-in “post to Instagram” or “upload to YouTube” button. You either schedule in the platform’s own tool, or have Claude Code write a small script that calls the official API with your permission.

What you’ll have at the end

  • A month’s content calendar as a spreadsheet, with captions and metadata ready.
  • Posts scheduled through YouTube Studio, or through a script that uses the official APIs.
  • A checklist for AI disclosure and platform rules, so automation doesn’t cost you the account.

What you need

  • Claude (any plan with Code execution and file creation, for the spreadsheet; Anthropic lists this on Free and paid plans).
  • A YouTube channel, and/or an Instagram professional account (Meta’s publishing API documentation applies to professional accounts).
  • For the API route only: Claude Code, a Meta developer app and/or a Google Cloud project with the YouTube Data API enabled.

What’s safe and what gets you banned

ActivityStatusSource
Scheduling your own videos in YouTube StudioBuilt-in featureYouTube Help
Uploading/scheduling via YouTube Data API (status.publishAt)Official APIYouTube API docs
Publishing your own posts via Instagram’s content publishing APIOfficial APIMeta developer docs
Using Claude to write captions, titles, descriptionsYour content, your accountn/a
Bots or rewards to inflate views, likes, comments or subscribersProhibited: “engagement manipulation”YouTube spam policy
Mass-producing repetitive content with automation or AIProhibited under spam policyYouTube spam policy
Any program that buys, sells or exchanges “Likes”Prohibited for apps (section 2.7)Meta Developer Policies
Posting for someone else without their consentProhibited for apps (section 1.7)Meta Developer Policies
Realistic AI-generated or altered content without disclosurePenalties possible on YouTubeYouTube Help

YouTube’s spam policy says it “may suspend your monetization or terminate your channel”, and that three strikes within 90 days may terminate a channel.

Step-by-step

1. Have Claude plan the month as a spreadsheet

Give Claude your niche, posting frequency and the platforms you use, and ask for an .xlsx calendar (prompt 1 below). With file creation on, Claude returns a real Excel file. Columns that work well: date, platform, format (Reel, carousel, video, Short), topic, caption or title, description, hashtags, alt text, AI-used (yes/no), status.

Read every row. You’re the one publishing it.

2. Decide your disclosure for each post

YouTube requires you to disclose realistic AI-generated or altered content, such as content that makes a real person appear to say or do something they didn’t, alters footage of real events or places, generates a realistic scene that didn’t happen, or creates music that’s the main focus of the video. You don’t need to disclose non-realistic content or minor edits like beauty filters, color fixes, captions, upscaling, idea generation, or cloning your own voice for voiceovers. To disclose, set AI use to Yes in the Attributes section during upload in YouTube Studio. Creators who consistently don’t disclose may get a label applied for them or face penalties, including content removal or suspension from the YouTube Partner Program.

YouTube’s rule targets realistic AI-generated or altered content, and “idea generation” is on its list of things you don’t need to disclose. Using an AI tool to make realistic video or audio is what triggers the requirement.

Instagram (Meta) applies an “AI info” label, partly based on people disclosing that they’re uploading AI-generated content. Meta says it will “require people to use this disclosure and label tool when they post organic content with a photorealistic video or realistic-sounding audio that was digitally created or altered, and we may apply penalties if they fail to do so.” If your Reel uses realistic AI video or an AI voice that sounds real, turn on the AI label when you post.

3a. Schedule on YouTube without writing code

In YouTube Studio, choose Create > Upload, pick the file, fill in the details (paste Claude’s title and description), open the Schedule card, pick date, time and time zone, and confirm. The visibility must be set to scheduled or private to set a publish time. If your channel has a Community Guidelines strike, YouTube keeps the video private during the penalty period, and you’ll need to reschedule it afterwards.

For Instagram without code, use a scheduling tool that connects through Instagram’s official login screen and permissions. A tool that asks for your Instagram password instead is a warning sign.

3b. Or have Claude Code build a script on the official APIs

This is for people comfortable approving terminal commands. Claude Code writes and runs the code; you create the credentials and approve each step.

YouTube Data API (videos.insert):

  • Needs an OAuth sign-in with a YouTube scope such as https://www.googleapis.com/auth/youtube.upload.
  • Set status.privacyStatus and status.publishAt to schedule. If you don’t set privacy, uploads default to public.
  • Set status.containsSyntheticMedia to true for realistic AI content, and status.selfDeclaredMadeForKids as appropriate.
  • Limits: files up to 256 GB; the docs list “100 calls per day”, each upload costing 1 unit in the Video Uploads quota bucket.

Instagram content publishing API:

  • Two flavors: Instagram API with Instagram Login (permissions instagram_business_basic, instagram_business_content_publish) or with Facebook Login (instagram_basic, instagram_content_publish, pages_read_engagement). Meta’s page lists access-level requirements for both; read them before building.
  • Two steps: create a media container (POST /{IG_ID}/media with an image_url or video_url), then publish it (POST /{IG_ID}/media_publish with the creation_id).
  • Media must be on a publicly reachable URL when you publish, because Meta fetches it.
  • JPEG is the only image format supported. Reels, video, stories and carousels (up to 10 items) are supported. Shopping tags and filters are not.
  • Limit: “100 API-published posts within a 24-hour moving period”, with a carousel counting as one. The same page’s carousel section says 50, so plan well under both.

Keep tokens out of your code: ask Claude to read them from environment variables and to add your .env file to .gitignore.

Make it useful: prompts to try

I run a small home-baking Instagram (@example) and a YouTube channel with one long video and two Shorts a week. Plan 4 weeks of content as an Excel file: date, platform, format, topic, caption or title, YouTube description, up to 5 relevant hashtags, alt text for images, and an "AI used?" column. No engagement-bait like "comment YES". Keep my voice: warm, practical, a little dry.
Here's my video script. Write 3 YouTube title options under 70 characters, a description with chapters from the timestamps, and tell me whether this video needs YouTube's "AI use" disclosure based on what I used: AI voice cloning of my own voice, plus one AI-generated realistic shot of a bakery that doesn't exist. Explain your reasoning briefly.
In this folder, write a Python script that reads schedule.csv and uploads each video with the YouTube Data API videos.insert method, setting privacyStatus to private, publishAt from the CSV, and containsSyntheticMedia from the "ai_used" column. Use OAuth with the youtube.upload scope, read secrets from environment variables, add .env to .gitignore, stop after the first upload so I can check it in YouTube Studio, and explain each step before you run anything.

Troubleshooting

  • Instagram publish fails on an image. Convert it to JPEG and make sure the URL is publicly reachable.
  • Account can’t publish via API. Meta notes that accounts connected to a Page that requires Page Publishing Authorization can’t publish until it’s completed.
  • YouTube returns invalidPublishAt. The publish time is invalid; check the date format and that it’s in the future.
  • YouTube upload quota exceeded. You’ve hit the daily upload quota for your project. Wait for it to reset or spread uploads across days.
  • Scheduled video didn’t go live. Check for a Community Guidelines strike in YouTube Studio.

Next steps

Sources

Facts checked against these sources on . Page updated . How we check facts

  1. about.fb.com/news/2024/02/labeling-ai-generated-images-on-facebook-instagram-and-threads/ (opens in a new tab)
  2. developers.facebook.com/docs/instagram-platform/content-publishing/ (opens in a new tab)
  3. developers.facebook.com/devpolicy/ (opens in a new tab)
  4. about.fb.com/news/2024/04/metas-approach-to-labeling-ai-generated-content-and-manipulated-media/ (opens in a new tab)
  5. developers.google.com/youtube/v3/docs/videos/insert (opens in a new tab)
  6. support.google.com/youtube/answer/1270709 (opens in a new tab)
  7. support.google.com/youtube/answer/14328491 (opens in a new tab)
  8. support.google.com/youtube/answer/2801973 (opens in a new tab)
  9. support.claude.com/en/articles/12111783-create-and-edit-files-with-claude (opens in a new tab)
  10. code.claude.com/docs/en/quickstart (opens in a new tab)

Related guides

All guides