Skip to main content
POST
Create message (Claude)

인증

Authorization
string
header
필수

Your DGrid API key. All endpoints use Authorization: Bearer <DGRID_API_KEY>.

헤더

anthropic-version
string
기본값:2023-06-01
필수

Anthropic API version header.

본문

application/json
model
string
필수

Model ID, such as claude-3-5-sonnet-20241022.

예시:

"claude-3-5-sonnet-20241022"

max_tokens
integer
필수

Maximum output token count.

예시:

1024

messages
object[]
필수

Conversation message list.

system
string

System instructions.

temperature
number

Sampling temperature.

top_p
number

Top-p sampling.

top_k
integer

Top-k sampling.

stop_sequences
string[]

Stop sequences.

stream
boolean

Enable streaming responses.

tools
object[]

Tool schema definitions.

tool_choice
object

Tool selection strategy.

응답

Claude message result.

id
string

Message identifier.

type
string

Always message.

role
string

Always assistant.

content
object[]

Returned content blocks.

model
string

Model that produced the output.

stop_reason
string

end_turn, max_tokens, stop_sequence, or tool_use.

usage
object

Token usage metadata.