https://yesapi.online/v1| Field | Value |
|---|---|
| Model | claude-opus-4-8 |
| API type | chat completions API |
POST https://yesapi.online/v1/chat/completions| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | - | Fixed value: claude-opus-4-8 |
prompt | string | No | - | Task prompt or instruction |
messages | array | Yes | - | Conversation messages for chat models |
stream | boolean | No | false | Enable streaming output for supported chat models |
callback_url | string | No | - | Callback URL for asynchronous media tasks |
{
"id": "task_or_response_example",
"model": "claude-opus-4-8",
"status": "succeeded",
"created": 1784534400
}| Field | Type | Description |
|---|---|---|
id | string | Request or task ID |
model | string | Model used for the request |
status | string | Task status for asynchronous APIs |
usage | object | Token or usage details when available |
error | object | Error details when the request fails |
| Status | Type | How to Fix |
|---|---|---|
400 | Invalid request | Check required fields and parameter formats |
401 | Unauthorized | Verify your API key and Authorization header |
402 | Insufficient balance | Check account balance or plan quota |
429 | Rate limited | Reduce concurrency or add retry backoff |
500 | Service error | Retry later and keep the request ID for support |
Note: This API page documents the unified YesAPI request format. Users need to provide their own YesAPI API key when testing. Model availability depends on the current YesAPI console status.
curl --location '/v1/messages' \
--header 'Content-Type: application/json' \
--data '{
"model": "claude-opus-4-8",
"messages": [
{
"role": "user",
"content": "Explain how to integrate YesAPI in three points"
}
],
"temperature": 0.7,
"stream": false,
"max_tokens": 1024
}'{
"id": "chatcmpl_example",
"object": "chat.completion",
"model": "claude-opus-4-8",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "You can integrate YesAPI with a Base URL, API key, and model name."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 32,
"completion_tokens": 24,
"total_tokens": 56
}
}