AI Platform
Information about configuring Generative AI API.
Last updated
Was this helpful?
Information about configuring Generative AI API.
Last updated
Was this helpful?
Navigate to AI page from AI API Integration Tab. Click on "Open Service" button to enter configuration page and follow up with the confirmation.
To obtain the API key click on "View". You may have to enter your account password for verification.
API Domain: https://sgai.littlepig.cloud
Endpoint: /anthropic/v1/messages
Protocol: HTTPS
Request Method: POST
Request Body: Serialized JSON format
x-api-key
string
Authentication key from the Console.
Content-Type
string
Must be application/json
.
model
string
Yes
Claude model to use.
max_tokens
integer
Yes
Maximum tokens to generate.
messages
object[]
Yes
Conversation history (see Messages Format).
stream
boolean
No
Stream the response as Server-Sent Events.
system
string
No
System-level prompt.
temperature
number
No
0.0‑1.0; lower = more deterministic, higher = more creative.
top_p
number
No
Nucleus‑sampling ratio. Adjust either temperature
or top_p
.
tools
object[]
No
Definitions of external tools the model may call.
Each input message content may be either a single string or an array of content blocks, where each block has a specific type. Using a string for content is shorthand for an array of one content block of type "text". The following input messages are equivalent:
Supported image types: image/jpeg
, image/png
, image/gif
, image/webp
.
If you include tools in your API request, the model may return tool_use content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using tool_result content blocks.
name
string
Yes
Tool name.
description
string
No
What the tool does.
input_schema
object
Yes
JSON schema for the tool input.
content
Content blocks produced by Claude.
id
Message ID.
model
Model that generated the reply.
role
Always assistant
.
stop_reason
Why generation stopped (e.g. end_turn
).
usage.input_tokens
Tokens in the request.
usage.output_tokens
Tokens in the response.
stream=true
)content_block_delta
Partial token or tool‑input data.
error
Error details.
Example:
Tool invocation stream:
claude_3_haiku
$0.00025
$0.00125
claude_3_sonnet
$0.003
$0.015
claude_3_opus
$0.015
$0.075
claude_35_haiku
$0.0008
$0.004
claude_35_sonnet
$0.003
$0.015
claude_37_sonnet
$0.003
$0.015
The model pricing is subject to change. Please visit the page to view the latest pricing.
To disable API access, click on "Close Service" button in page.