[metadata]
apple-mobile-web-app-status-bar-style: default
description: Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. The Messages…
mobile-web-app-capable: yes
og:description: Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. The Messages…
og:image: https://platform.claude.com/docs/og?type=api&locale=en&path=messages/create&design-rev=1
og:image:alt: Create a Message - Claude API Reference
og:image:height: 630
og:image:type: image/png
og:image:width: 1200
og:locale: en
og:site_name: Claude API Reference
og:title: Create a Message - Claude API Reference
og:type: website
og:url: https://platform.claude.com/docs/en/api/messages/create
twitter:card: summary_large_image
twitter:description: Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. The Messages…
twitter:image: https://platform.claude.com/docs/og?type=api&locale=en&path=messages/create&design-rev=1
twitter:title: Create a Message - Claude API Reference
viewport: width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover

[canonical-links]
https://platform.claude.com/docs/en/api/messages/create

[document-links]
AI agents: https://claude.com/solutions/agents
Admin: /docs/en/api/admin
Admin: /docs/en/manage-claude/admin-api
Anthropic: https://www.anthropic.com/company
Archive Tunnel: /docs/en/api/beta/tunnels/archive
Availability: https://www.anthropic.com/supported-countries
Best practices: /docs/en/about-claude/use-case-guides/overview
Beta headers: /docs/en/api/beta-headers
Blog: https://claude.com/blog
CLI, SDKs, and libraries: /docs/en/cli-sdks-libraries/overview
Careers: https://www.anthropic.com/careers
Claude API skill: /docs/en/agents-and-tools/agent-skills/claude-api-skill
Claude Platform Docs: /docs
Claude Platform Docs: /docs/en/home
Claude on AWS: https://claude.com/partners/amazon-bedrock
Claude on Google Cloud: https://claude.com/partners/google-cloud-vertex-ai
Code modernization: https://claude.com/solutions/code-modernization
Coding: https://claude.com/solutions/coding
Completions: /docs/en/api/completions
Compliance API: /docs/en/api/compliance
Connectors: https://claude.com/partners/mcp
Count tokens in a Message: /docs/en/api/beta/messages/count_tokens
Courses: https://claude.com/resources/courses
Create Enrollment URL: /docs/en/api/beta/user_profiles/create_enrollment_url
Create Skill: /docs/en/api/beta/skills/create
Create Tunnel: /docs/en/api/beta/tunnels/create
Create User Profile: /docs/en/api/beta/user_profiles/create
Create a Message: /docs/en/api/beta/messages/create
Create a Text Completion: /docs/en/api/completions/create
Customer stories: https://claude.com/customers
Customer support: https://claude.com/solutions/customer-support
Delete File: /docs/en/api/beta/files/delete
Delete Skill: /docs/en/api/beta/skills/delete
Discord: https://www.anthropic.com/discord
Download File: /docs/en/api/beta/files/download
Economic Futures: https://www.anthropic.com/economic-futures
Engineering at Anthropic: https://www.anthropic.com/engineering
Errors: /docs/en/api/errors
Events: https://www.anthropic.com/events
Features overview: /docs/en/api/overview
Files : /docs/en/api/beta/files
Financial services: https://claude.com/solutions/financial-services
Get File Metadata: /docs/en/api/beta/files/retrieve_metadata
Get Skill: /docs/en/api/beta/skills/retrieve
Get Tunnel: /docs/en/api/beta/tunnels/retrieve
Get User Profile: /docs/en/api/beta/user_profiles/retrieve
Get a Model: /docs/en/api/beta/models/retrieve
Government: https://claude.com/solutions/government
Higher education: https://claude.com/solutions/education
IAM actions (Claude Platform on AWS): /docs/en/api/claude-platform-on-aws-iam-actions
IP addresses: /docs/en/api/ip-addresses
K-12 teachers: https://claude.com/solutions/teachers
Life sciences: https://claude.com/solutions/life-sciences
List Files: /docs/en/api/beta/files/list
List Models: /docs/en/api/beta/models/list
List Skills: /docs/en/api/beta/skills/list
List Tunnels: /docs/en/api/beta/tunnels/list
List User Profiles: /docs/en/api/beta/user_profiles/list
Log in: /login?returnTo=%2Fdocs%2Fen%2Fapi%2Fmessages%2Fcreate
Managed Agents: /docs/en/managed-agents/overview
Messages: /docs/en/api/beta/messages
Messages: /docs/en/intro
Models & pricing: /docs/en/about-claude/models/overview
Models: /docs/en/api/beta/models
News: https://www.anthropic.com/news
Powered by Claude: https://claude.com/partners/powered-by-claude
Privacy policy: https://www.anthropic.com/legal/privacy
Rate limits: /docs/en/api/rate-limits
Release notes: /docs/en/release-notes/overview
Research: https://www.anthropic.com/research
Responsible Scaling Policy: https://www.anthropic.com/news/announcing-our-updated-responsible-scaling-policy
Responsible disclosure policy: https://www.anthropic.com/responsible-disclosure-policy
Reveal Tunnel Token: /docs/en/api/beta/tunnels/reveal_token
Rotate Tunnel Token: /docs/en/api/beta/tunnels/rotate_token
Security and compliance: https://trust.anthropic.com
Service partners: https://claude.com/partners/services
Service tiers: /docs/en/api/service-tiers
Skills : /docs/en/api/beta/skills
Startups program: https://claude.com/programs/startups
Status: https://status.claude.com/
Support: https://support.claude.com/
Supported regions: /docs/en/api/supported-regions
Terms of service: Commercial: https://www.anthropic.com/legal/commercial-terms
Terms of service: Consumer: https://www.anthropic.com/legal/consumer-terms
Transparency: https://www.anthropic.com/transparency
Trigger a routine: /docs/en/api/claude-code/routines-fire
Tunnels : /docs/en/api/beta/tunnels
Update User Profile: /docs/en/api/beta/user_profiles/update
Upload File: /docs/en/api/beta/files/upload
Usage policy: https://www.anthropic.com/legal/aup
Use cases: https://claude.com/resources/use-cases
User Profiles : /docs/en/api/beta/user_profiles
Versions: /docs/en/api/versioning
Webhooks : /docs/en/api/beta/webhooks
https://instagram.com/claudeai
https://www.linkedin.com/showcase/claude
https://www.threads.com/@claudeai
https://www.youtube.com/@anthropic-ai
https://x.com/claudeai
 API reference: /docs/en/api/overview
 Console: /

[content]
Create a Message - Claude API Reference
Claude Platform Docs
Messages
Managed Agents
Admin
Resources

Best practices
Models & pricing
CLI, SDKs, and libraries
Claude API skill
Release notes

API reference

English


Console
Log in


Search
Ctrl
K

Include beta APIs
Using the API
Features overview
Beta headers
Errors
Messages
Create a Message
Count tokens in a Message
Batches

Managed Agents

Agents

Environments

Sessions

Deployments

Deployment Runs

Vaults

Memory Stores

Dreams

Models
List Models
Get a Model
Files

Upload File
List Files
Download File
Get File Metadata
Delete File
Skills

Create Skill
List Skills
Get Skill
Delete Skill
Versions

Tunnels

Create Tunnel
Get Tunnel
List Tunnels
Archive Tunnel
Reveal Tunnel Token
Rotate Tunnel Token
Certificates

User Profiles

Create User Profile
List User Profiles
Get User Profile
Update User Profile
Create Enrollment URL
Webhooks

Admin
Organizations

Invites

Users

RBAC Groups


RBAC Roles


Workspaces

API Keys

External Keys

Usage Report

Cost Report

Analytics

Spend Limits

Rate Limits

Service Accounts

Federation Issuers

Federation Rules

MCP Tunnels


Compliance API
Activities

Organizations

Groups

Apps

Code

Completions
Create a Text Completion
Claude Code
Trigger a routine
Support & configuration
Rate limits
Service tiers
IAM actions (Claude Platform on AWS)
Versions
IP addresses
Supported regions

Console
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Claude Platform Docs


Solutions
AI agents
Code modernization
Coding
Customer support
Financial services
Government
Higher education
K-12 teachers
Life sciences
Partners
Claude on AWS
Claude on Google Cloud
Learn
Blog
Courses
Use cases
Connectors
Customer stories
Engineering at Anthropic
Events
Powered by Claude
Service partners
Startups program
Company
Anthropic
Careers
Economic Futures
Research
News
Responsible Scaling Policy
Security and compliance
Transparency
Learn
Blog
Courses
Use cases
Connectors
Customer stories
Engineering at Anthropic
Events
Powered by Claude
Service partners
Startups program
Help and security
Availability
Status
Support
Discord
Terms and policies
Privacy policy
Responsible disclosure policy
Terms of service: Commercial
Terms of service: Consumer
Usage policy
