Claude Opus 4.7 API
Claude Opus 4.7 API with VezAPI. Explore model capabilities, credit pricing, request parameters, and integration examples.
Claude Opus 4.7 API documentation
Integrate Claude Opus 4.7 with your VezAPI key. The operations below share the same authentication and account balance.
Text-only requests require an integer max_tokens from 1 to 8,192. The JSON request limit is 64 KiB. Media, tools, thinking and prompt caching are currently unavailable.
https://api.vezapi.comSend Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.
Claude Opus 4.7
/claude/v1/messagesModel IDs: claude-opus-4-7
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | Model id for this page, e.g. `claude-opus-4-7`. Available ids are listed by `GET [see VezAPI documentation] Values: |
messagesrequired | array | Conversation messages in chronological order.
|
messages[].rolerequired | string | Values: |
messages[].contentrequired | string | Text content. Total JSON request size must not exceed 64 KiB. |
streamoptional | boolean | If set to true, the response is returned as an SSE stream. Default: |
max_tokensrequired | integer | Required output token limit, 1–8192. Only text-only requests without tools, thinking or caching are enabled. Default:
|
Request example
curl -X POST 'https://api.vezapi.com/claude/v1/messages' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "claude-opus-4-7",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'Responses and errors
HTTP 200
Request successful.
| Parameter | Type | Description & constraints |
|---|---|---|
roleoptional | string | Returned message role |
usageoptional | object | Usage information returned in the response |
usage.input_tokensoptional | integer | Input token count |
usage.output_tokensoptional | integer | Output token count |
usage.cache_creation_input_tokensoptional | integer | Cache creation input token count |
usage.cache_read_input_tokensoptional | integer | Cache read input token count |
usage.service_tieroptional | string | Service tier |
stop_reasonoptional | string | Reason why generation stopped |
modeloptional | string | Actual model version returned in the response |
idoptional | string | Unique message identifier |
credits_consumedoptional | number | Credits consumed by the request |
typeoptional | string | Top-level response object type |
contentoptional | array | Response content blocks |
content[].inputoptional | object | Tool input arguments |
content[].calleroptional | object | Tool caller metadata |
content[].caller.typeoptional | string | |
content[].nameoptional | string | Tool name |
content[].idoptional | string | Tool call identifier |
content[].typeoptional | string | Content block type |
HTTP 400
Bad Request - Invalid request parameters
| Parameter | Type | Description & constraints |
|---|---|---|
erroroptional | object | |
error.messageoptional | string | |
error.typeoptional | string |
HTTP 401
Unauthorized - Invalid or missing API key
| Parameter | Type | Description & constraints |
|---|---|---|
erroroptional | object | |
error.messageoptional | string | |
error.typeoptional | string |
Task status and callbacks
For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.
A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.
Files, logs and billing
Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.
Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.
Send a request using your VezAPI key. Successful generations use your account credits.
/claude/v1/messagesYour response will appear here.
Claude Opus 4.7 API pricing
Rates below are reference estimates; final deductions equal actual discounted consumption, one for one. At the standard pack rate, 1,000 credits ≈ $10. Larger packs reduce the effective credit price.
| Specification | Credits | Unit | USD reference |
|---|---|---|---|
| Claude-Opus-4-7, chat, Input | 285 | per million tokens | $2.85 |
| Claude-Opus-4-7, chat, Output | 1430 | per million tokens | $14.3 |