POST
/
v1
/
embeddings
curl --request POST \
  --url https://fastapi.mymagic.ai/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "question": "<string>",
  "storage_provider": "<string>",
  "bucket_name": "<string>",
  "session": "<string>",
  "max_tokens": 123,
  "system_prompt": "<string>",
  "role_arn": "<string>",
  "region": "<string>",
  "return_output": true,
  "input_json_file": "<string>",
  "structured_output": "<string>"
}'
{
  "task_id": "<string>"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required

The model name to use for processing the question

question
string
required

The user's question to be processed

storage_provider
string
required

Storage where data is stored (e.g., 's3', 'gcs')

bucket_name
string

Name of the bucket for storing results

session
string
required

Session name for the request

max_tokens
integer
default: 10

Max output tokens for the response

system_prompt
string
default: Answer the question based only on the given content. Do not give explanations or examples. Do not continue generating more text after the answer.

Additional system prompt for processing the user's question

role_arn
string

AWS IAM role ARN for S3 access

region
string
default: eu-west-2

The region the bucket belongs to

return_output
boolean
default: false

Boolean indicating whether to return the output or not

input_json_file
string

The name of the input json file in your s3 bucket

structured_output
string

json schema for the response output

Response

200 - application/json
task_id
string
required

The task ID assigned to the submitted question